Showing a marker at a geo:-url in Android Maps

后端 未结 3 631
耶瑟儿~
耶瑟儿~ 2021-01-01 00:46

Is it possible not only to have Google Maps on Android show a given coordinate in the Maps Application but have also a marker (or pin) set at the location?

I read th

相关标签:
3条回答
  • 2021-01-01 01:00

    try this:

    http://maps.google.com/?saddr=34.052222,-118.243611

    and to get the complete route between two points:

    http://maps.google.com/?saddr=34.052222,-118.243611&daddr=37.322778,-122.031944

    0 讨论(0)
  • 2021-01-01 01:07

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

    it is displaying a marker on my nexus 5.

    0 讨论(0)
  • 2021-01-01 01:24

    It works with the follwoing url:

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

    The reverse geo coded address is shown.

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

    Note: it should be noted that the original question was in regards to the the geo: URI to launch the Google Maps app (see Android Developer Reference Intents List, whereas this answer might launch a web view with the Google Maps website depending on what App the user chooses for this Intent.

    0 讨论(0)
提交回复
热议问题