If you look on this page (http://tijmensmit.com/gmap/xml.php), and
select New Zealand and set the date from 07/01/2011 till 07/31/2011
two markers will show up. But if you look at the output in the console
in firebug, you can see that there are actually 3 markers. There are
duplicate ones for the bottom one in Nelson.
What I would like to do is add the content from the duplicate
infowindow to the existing infowindow of the marker that already
exists on the same spot. What happens now if you click on the marker
is that you will see who is present in a country between the selected
dates. Eventually you get more then 1 person in the some location, so
to me it makes sense to add them the the already existing infowindow
and eventually show a list of people.
The problem is that I don't know how to get that to work, and if its
even possible.
I have the check working for duplicate markers, and it does raise the
alert when a duplicate position is found, but I'm unable get the
content of the current or duplicate marker. I tried different
combinations with the getContent function, the code below is the last
attempt.
if (markers[i].getPosition().equals(marker.getPosition())) {
// alert('duplicate found');
//alert(markers[i].getContent());
}
Is it even possible to do what I want? Or is there a better way to
filter out duplicate markers and add the content from the duplicate
one to the existing one? Also, would it be better to check for
duplicates in php, before building the json output, or do it just
before putting the markers on the map?
Thanks :)
--
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.