Yup, it shows the latitude and longitude of the address! So how do I make it save that as a variable I can call outside of the callback and function?
On Feb 6, 5:06 pm, Rossko <[email protected]> wrote: > > ... I know that the geocoder is > > Asynchronus and I have a callback function for it. But inside the > > callback function the variables don't seem to get changed. > > They do, but you are not testing them inside the callback function > > geocoder.getLocations(fullform, function(response){ > var place = response.Placemark[0]; > point = place.Point.coordinates; > ... etc > }); > alert(point); > > When you understand that the alert is executed BEFORE the results have > returned and 'point' has been defined, you'll have grasped the > difficult asynchronous concept. > Put another alert at the end of, but inside, the callback to see what > happens. -- 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.
