Starting Google Maps App with provided location and marker

前端 未结 2 1161
无人及你
无人及你 2020-12-30 02:48

From my app I would like to start the Google Maps App with a provided location and a marker. The marker should indicate, that there is something on that given location.

2条回答
  •  醉梦人生
    2020-12-30 03:12

    Try starting Google Maps using the same intent, but with a URI of the format:

    geo:34.067214,-118.349332?q=410+Hauser+Boulevard,+Los+Angeles,+CA
    

    i.e. geo:0,0?q=street+address

    The application should then actually show a point at that address. If you do not have the address, you may have to use a service to translate it to an address for this to work.

    -

    The other option is to embed a MapView in your application and add a marker within that. A tutorial for using MapViews / Markers with-in your application can be found at http://mobiforge.com/developing/story/using-google-maps-android.

提交回复
热议问题