> Sorry link to my site with my data > > www.rpetechnologies.com/unitfinder/demo.php
Difficult to see what you want to happen, as much of the 'duplicate handling' code is commented out. Guessing that createMarker() is supposed to set a new 'first' marker. And that if a 'duplicate' marker is detected, addTab() is supposed to be run instead to add an infowindow tab to the existing marker, instead of plotting a new marker. The switching on duplicate detection all seems to be inhibited at the moment. Looking at your addTab() code, it tests the existing .htmls custom property of a marker, and if it isn't an array (of tabs) yet, we go off down the path of making it so. Then make two identical new tabs (why?), and the complete result ends up in marker.tabs[]. Then it adds a click listener to the marker - why? The marker already has a perfectly good one from when it was first created. That just needs to be modified to deal with whatever it finds in .htmls or .tabs If we run addTab() on the same marker again, e.g. a third duplicate point, it tests marker.htmls to see if its an array ... upps here we go wrong. marker.htmls is still the same as it ever was, so we end up trashing any existing .tabs and creating a new tabs array for only the first and last tab. Personally I think you should use only .tabs even when there is only one, and discard .htmls - I think thats confusing. Where creating .htmls now, just set your first .tabs[] instead. Every time you want a new tab, just push it on. Much less likely to go wrong. And only one click listener needed. cheers, Ross K --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
