On Mar 7, 12:19 pm, AnthonyP <[email protected]> wrote: > It still doesn't fix anything my code... I want to have the map zoom > to fit the makrers on the map, but I also need it to clear everything > when someone runs another search on the map.
You need to tell the clusterer that you want it to stop managing them: myCluster.removeMarkers(); (and myCluster needs to be global) -- Larry > > -Tony > > On Mar 7, 2:17 pm, AnthonyP <[email protected]> wrote: > > > Here's a little more info... It appears to be the following code: > > > if (totalcount > 0) { > > map.setZoom(map.getBoundsZoomLevel(bounds)); > > map.setCenter(bounds.getCenter()); > > > } > > > Once these lines are commented out, of course, the map does not pan > > and zoom to fit the markers but if you follow the same procedures from > > above, the clearOverlays(); code works like a champ. > > > See here for the change:http://tinyurl.com/anzxon > > > On Mar 7, 1:46 pm, Anthony <[email protected]> wrote: > > > > Map:http://tinyurl.com/clux3w > > > > Duplicate: Load map, click the date select input box and choose March > > > 1. Click Submit. The map should reload (the markers will disappear), > > > and then span and zoom to show 2 markers for that date. However, if > > > you span over to where the initial 6 markers were at, they're still > > > there. > > > > Here's a link to the XML generated for March 1 > > > 09:http://tinyurl.com/bcx94u > > > (so it is only pulling 2 markers) > > > > Next to the submit button, I've added a button to execute > > > map.clearOverlays() which will succesfully remove all the overlays on > > > the map (even those managed by ClusterMarker. > > > > Is it more of the markers reappearing (somehow) or clearOverlays just > > > not working? > > > > Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
