I`m trying to implement a map that loads a KML file to display a number of markers. Then, when the user clicks on the marker it calculates and displays directions to a destination. I`m fairly new at this, so bear with me if I've made some stupid fundamental mistake or missed an important bit of documentation.
I've got the basic map functionality working, as can bee seen here: http://homepage.ntlworld.com/dr_wadd/map_test.html In this version of the map, the user can click on any of the blue icons as many times as they like, with the route information displayed updating accordingly. However, as soon as I also display the polyline on the route, it only becomes possible to click on a blue marker once. As soon as the polyline is displayed the click events for the KML markers no longer fire. This is even the case after I've removed the polyline directions from the map using the reset button. There's an example of the broken version here. http://homepage.ntlworld.com/dr_wadd/map_test2.html If I`m displaying the route as polylines, the only way I can get the markers to work again is to destroy the map and re-initialise it from scratch, which doesn't strike me as a particularly elegant solution. Even if I explicitly re-add the click handlers nothing happens, which suggests to me that on some internal level the API isn't considering the KML markers to be clickable after this as happened. I`m guessing I`m doing something wrong here, but I can't work out for the life of me what it is. Can anyone suggest any solutions to this issue. Many 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.
