It looks like your JSON objects have an ID. If that ID is unique, then just keep an array of those. When your bounds change, first check to see if the new markers are in the array. If they are - they are on the map.
Chad Killingsworth On Apr 24, 9:05 pm, jnbdz <[email protected]> wrote: > Hi, > > I was able to code with Google Maps API v3, a small app. that gets the > markers from JSON string send from the server every time the bound > changes. The markers appear but if I change the view bound it reloads > the same markers... So they are there in double... > > So is there a way to know if the marker is already on the map? If yes > just not load it on the map another time. > > There is I would believe another way of approaching the problem... It > is to remove all the markers from the map then load the fresh new ones > from the server... It would work... But I want to make a editor where > my friend can change the place of the markers and I don't want them to > be changed or remove or replace... > > Here is the link of my > demo:http://jean-nicolas.name/labs/google_maps/google_map_v3_2.html > > Thanks in advance for you time. > > -- > You received this message because you are subscribed to the Google Groups > "Google Maps JavaScript API v3" 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 > athttp://groups.google.com/group/google-maps-js-api-v3?hl=en. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" 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-js-api-v3?hl=en.
