Geocoding is asynchronous, and your "html" variable changes between the
time that you send the geocoding request and the time that the repl;y
comes back.

See http://econym.org.uk/gmap/async.htm if you're not familiar with the
concept.

The easiest solution is to avoid using the geocoder for known points.

E.g. replace
      var address = "1225 N Valley Mills Dr., Waco, TX 76710()";
      geocoder.getLatLng(address, function(point) {
        if (point) {
          var marker = createMarker(point, 2, html);
with
      var point = new GLatLng(31.530868,-97.188088);
      var marker = createMarker(point, 2, html);

As well as being easy to code, this solution also runs faster, uses less
memory, won't fail if the geocoder behaviour changes, and you can add
more markers without any risk of hitting the geocoder speed limit.

-- 
Mike Williams
http://econym.org.uk/gmap



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to