Marker display in geo: -url on Android maps

Is it possible for Google Maps on Android to display the given coordinate in the Maps application, but also has a marker (or contact) in place?

I read the documentation at https://developer.android.com/guide/appendix/g-app-intents.html , but that allows me to set the zoom level.

I am now using the following code to show the location in Google Maps on Android:

Double lat = 53.3; Double lng = 13.4; final String uriString = "geo:" + lat + ',' + lng + "?z=15"; Intent showOnMapIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(uriString)); startActivity(showOnMapIntent); 

Is it possible to have a marker or do I need to use MapActivity? Where can I find complete documentation on the url parameters that the Maps application understands?

Can I use a different URL prefix? For example, https://maps.google.de/maps ? "? Maps have an intent filter that matches this scheme / host / pathPrefix. Where can I find documentation on what parameters Google Maps for Android really supports this URL?

+6
source share
3 answers

It works with the following URL:

 final String uriString = "http://maps.google.com/maps?q=" + lat + ',' + lng + "("+ label +")&z=15"; 

The return geocoded address is displayed.

I found the documentation for the supported options here . This is not the documentation for Androids Google Maps, but what I tried works.

Note. It should be noted that the original question concerned the geo-text: URI for launching the Google Maps application (see the list of links for Android Developer developers , whereas this answer may launch web browsing from the Google Maps website depending on which application the user chooses to of this intention.

+9
source

Dirk, have you tried geo:0,0?q=lat,lng ?

it displays a marker on my link 5.

+6
source

Source: https://habr.com/ru/post/916605/