On Jul 29, 6:43 pm, bagelxjames <[email protected]> wrote: > I have a script and i need it to set the markers address in the middle > of another function. > > heres an example: > > function myFunction(){ > var marker... > > marker.index = ... > > marker.address = geocode(); > > } > > how can i get the geocode function to return the address. > > but geo.getLocations(marker.getLatLng(), );
You need to rethink your design. The geocoder is asynchronous, it sends off a request to the server and the code keeps executing. Sometime later the results come back and the call back function is called. Post a link to your map and we might be able to suggest alternate ways of accomplishing your goal. -- Larry --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
