geocoder is returning previously stored value when click on a marker

后端 未结 1 659
感情败类
感情败类 2020-12-22 12:09

I\'m implementing geocoder using google map api v3 (javascript). I\'m putting mutiple markers and when i click on marker i want the corresponding address to come in the inf

相关标签:
1条回答
  • 2020-12-22 12:50

    Geocoding is asynchronous. You have to use the returned value inside the callback from the geocoder.

    What is happening:

    1. you send off a request to the geocoder.
    2. you display the response
    3. the response comes back from the geocoder
    4. you send off another request to the geocoder
    5. you display the response to the first request
    6. the response comes back from the geocoder to the second request
    0 讨论(0)
提交回复
热议问题