Drop pin in MapView
I read this: Disable Google Maps default output from my Android app? and all the same. But there is no pin on the map after I call: startActivity (new Intent (Intent.ACTION_VIEW, uri));
The map is focused on this uri location, but not a single pin fell on the map.
So the question arises: How can I delete a contact on the card?
+2
a source to share
1 answer
You need to add something to search for too (q param). If all you have is lon / lat, specify it twice:
Uri uri = Uri.parse("geo:36.4248,-5.14495?z=14&q=36.4248,-5.14495");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
Note that the z parameter is optional.
You can also tag the output by adding it in parentheses after q lon ie
Uri uri = Uri.parse("geo:36.4248,-5.14495?z=14&q=36.4248,-5.14495(My+pin+label)");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
+7
a source to share