Add Marker function with Google Maps API v2 android

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

I m using the new function addMarker googlemaps api for android.

map.addMarker(new MarkerOptions()
        .position(new LatLng(40.417325, 40.417325))
        .title("Hello!"));

works great, but my question is, how I can place the marker indicating a search string instead of indicating the parameters of longitude and latitude?

something like:

"virgen de lujan 42, seville, spain"

Answers

You would have to find the latitude and longitude associated with that "search string", using geocoding. There is a Geocoder class in Android and a variety of other geocoding Web services available to you.

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/13962656/add-marker-function-with-google-maps-api-v2-android

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils