On Aug 27, 6:34 am, Steve <[EMAIL PROTECTED]> wrote:
> Hello i used this example:http://econym.googlepages.com/example_categories.htm
>
> this is the web page:http://arche-nova.org/version6/spender_map/markers.html
>
> there have to be 2 kind of markers. blue and red one's
>
> but he shows only the blue one
>
> i guess the bug is in this area:
>
> ....
>         //alert(btype);
>
>                         geocoder.getLatLng(address, function(point) {
>                         if (!point) {
>                         //alert(address + " not found");
>                         } else {
>                         var Amarker = new GMarker(point, customIcons[btype]);
>                         map.addOverlay(Amarker);
>                         }
>             });
> ....
>
> The funny thing is, if i uncomment the first alert. the script runs
> well and shows me 2 red markers. he also alerts me the right btypes (2
> times "2" the rest "1"). if i put a alert inside the else, he tells me
> only btype's of "1" :/

You seem to be missing the asynchronous nature of geocoding.  It would
be more deterministic if you geocoded the points offline and store the
latitude and longitude in your database.
Part 2 Asynchronous I/O
http://econym.googlepages.com/async.htm

>
> maybe i handled some variables wrong. i dunno
>
> please help and sorry for my bad english :)
--~--~---------~--~----~------------~-------~--~----~
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