On Nov 10, 8:17 am, Alejo <[EMAIL PROTECTED]> wrote: > I am trying to answer in this post, but after trying for some times, > the message doesn't appear even after hours, so I'm sorry I have to > open a new thread. > > http://groups.google.com/group/Google-Maps-API/browse_thread/thread/5... > > Hi everybody, > > I also have conflicts between PdMarker and Marker Manager (from the > Google Maps API). > > When I want to add the markers to the map I do the following: > > var marker = new PdMarker(point, options); > markerMgr.addMarker(marker, 0); > > The problems appear when I want to remove the markers from the map: > > //Remove markers > var first=true; > for (var i=0; i<markers.length; i++){ > var m = markers[i]; > if(m != null){ > if (first==true) { > m.removeAllBinds(); > first=false; > } > map.removeOverlay(m); > m.remove(1); > google.maps.Event.clearInstanceListeners (m); > }} > > markers.clear(); > > After iterating some markers and deleting them correctly, I get this > error: > > map is undefined > http://localhost:8080/gmapsPdmarker.js > Line 268 > > The error is in the method removeMarkerFromMapList(); > > and then the markers stop working (can't add or remove them more). > > Could you give me some ideas? Thank you in advance.
1. follow the suggested posting guidelines: http://groups.google.com/group/Google-Maps-API/web/suggested-posting-guidelines and post a link (I know you are developing locally, but if you don't have a web site yet, there are free sites out there) 2. make the map variable global (if that doesn't help see #1). -- Larry 2. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
