Hi-- I've built a map that adds markers from a db (I know, pretty
unusual! :))

The strange thing is that apparently randomly the addOverlay function
fails on some objects, though the marker appears to be valid. The lat/
long in the DB checks out, and the same record returns a valid marker
and is mapable in other areas of the site.

Here's a snip of the sample code with an alert that gets triggered by
a known bad item:

for (var i = 0; i < jsonData.length; i++) {

                if (jsonData[i].lat_pos != 0 && jsonData[i].long_pos !
= 0) {

                    // create the marker

                    var marker = createMarker(jsonData[i]);

                    map.addOverlay(marker);

                    if(jsonData[i].id == 2161){

                        if(!map.addOverlay(marker)){
                                   alert('add overlay not working!');

                        }else{

                            alert('add overlay working!');



                    }

                }

            }

And here's the link to the page:
http://crankpeddler.com/index.php?option=com_iproperty&view=advsearch&Itemid=98

You can hit the "preview" button in the table list, and in theory it
should open an info window based on the marker created by the loop
above-- but some markers don't get added to the map, and I'm not sure
why.

Thanks for any help.
-- 
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