Issue
I use the following code to show location on default google maps application , but the pointer on the map is showing the latitude and logitude values which I dont want .. Also would it be possible to drop a custom pin on the default google maps app ?
String uriBegin = "geo:" + Latitude + "," + Longitude;
String query =Latitude + "," + Longitude ;
String encodedQuery = Uri.encode(query);
String uriString = uriBegin + "?q=" + encodedQuery + "&z=16";
//String uriString = "?q=" + encodedQuery ;
Uri uri = Uri.parse(uriString);
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, uri);
startActivity(intent);
Solution
if you check this link
You will find:
geo:0,0?q=lat,lng(label) Show the map at the given longitude and latitude with a string label. Example: "geo:0,0?q=34.99,-106.61(Treasure)"
P.S. I don't think you can use a custom marker inside Google maps application.
String uriBegin = "geo:" + Latitude + "," + Longitude;
String query =Latitude + "," + Longitude ;
String encodedQuery = Uri.encode(query);
String uriString = uriBegin + "?q=" + encodedQuery + "(Anylabelyouwant)" + "&z=16";
//String uriString = "?q=" + encodedQuery ;
Uri uri = Uri.parse(uriString);
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, uri);
startActivity(intent);
Answered By - Shereef Marzouk
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.