ok, I feel very silly. When I would click the polygons on the map, it would come back with a "hello" (expected) then it would have a list of buildings...I couldn't recognize the pattern and more importantly why it was showing multiple labels. So I looked again at the map.openInfoWindow(....), turns out I was referencing the Labels array. not the label that was passed.
Thanks for all the help. I understand it is cumbersome, but I appreciate the patients and helpfulness. On Dec 6, 7:20 pm, daniel <[EMAIL PROTECTED]> wrote: > Thanks for all the insights. I am still learning both the api and > javascript, so thank you for bearing with me. > > Here is a link to my current map. > > http://dajohnson1s.dvrdns.org/map/daniel.html > > Rossko, > > Agreed, I had thought about that while I was getting everything over > to the server. > > I need to keep track of what is what when I am reading it from the > xml. and tag it. > > Because even if I get this problem solved, it only creates another, > because then I would need to "know" what polygon is clicked in order > to traverse the label array to get the appropriate name. My current > method I am unable to do so. > > On Dec 6, 6:40 pm, Rossko <[EMAIL PROTECTED]> wrote: > > > Typical form of a general-purpose click listener ; > > > GEvent.addListener(map, "click", function(overlay, latlng, > > clicklatlng) { ..... > > > If a polygon is clicked, you get the overlay handle and a clicklatlng > > object (latlng will be null). > > > If you've tagged your polygons somehow when creating them, you could > > use the tag to look up whatever stuff you want to go in the > > infowindow. Then you can open an infowindow on the map, planted at > > the clicklatlng. > > > Remember to have the listener do something sensible (nothing perhaps) > > if the bare map is clicked, or a marker or zoom overlay is clicked, > > etc. > > > An alternative approach is to set listeners on each individual poly. > > > 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 -~----------~----~----~----~------~----~------~--~---
