Launch Google Maps app

Posted by oriharel on Stack Overflow See other posts from Stack Overflow or by oriharel
Published on 2010-03-31T13:25:24Z Indexed on 2010/03/31 13:53 UTC
Read the original article Hit count: 416

Hi, I'm trying to launch Google maps from my application. I'm using:

GeoPoint center = _mapView.getMapCenter(); 

Uri uri = Uri.parse("geo:"+center.getLatitudeE6()+","+center.getLongitudeE6()); 

Log.d(LOG_TAG, "Launching Google Maps with Uri: ("+uri+")"); 
Intent intent = new Intent(Intent.ACTION_VIEW, uri);

startActivity(intent); 

I tested it with a map centered on somewhere in NYC, however Google maps opens not centered there. I followed Android Developer's site reference to use: "geo:latitude,longitude" pattern.

the log that you see prints:

Launching Google Maps with Uri: (geo:40763500,-73979305) 

anyone knows what can be the problem?

© Stack Overflow or respective owner

Related posts about android

Related posts about google-maps