I need to perform some tasks with google map,
1. first I need the user to be able to place only one marker
2. Then retrieve the city and other details such as street address
Does anyone know about this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I wrote a minimal example to show how you could achieve what you’re looking for:
To your first point: Create only one instance of
Markerand update itsLatLngupon user interaction (done inperformReverseLookup()).Your second question: After performing the reverse lookup you can get the
Placemarkobject out of thelocationsarray and retrieve details like the address.