简体   繁体   中英

How to make places in Google Maps to be objects like maps.google.com with Google Maps API in Android?

When using maps.google.com, places like parks,bus stations, restaurants are objects and we can mouse-hover to display the place's detail. See image : http://i.stack.imgur.com/xfRDo.png

But we can't do that with only Google Maps API. See image : http://i.stack.imgur.com/SU9uC.png

Thank in advance !

ps1 : The default Maps application in Andoird also has this feature.

You are welcome to use an Overlay , or override onTouchEvent() in a custom subclass of MapView , to find out when the user taps the screen. You are welcome to use a Projection to determine the latitude and longitude of where the user tapped. You are welcome to pass that data to some Web service that can tell you what is at that location. And you are welcome to display those results in some form (eg, Toast ).

However, none of that is built into the Google Maps SDK add-on for Android.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM