views:

74

answers:

2

I want to get a new map not using refush the webpage.

thanks

and has easy way to get all Overlays on the map?

A: 

Look the google map api documentation

And in particular: clearOverlays()

Gaby
thanks, but my company is using v3
zjm1126
+2  A: 

In the v2 API, there was the clearOverlays() method as Gaby pointed out. However, this method is not present if the v3 API. If I remember correctly, this omission was intentional to keep the library lightweight.

Therefore, with the v3 API, you have to keep a reference of your overlays, and then call setMap(null) on each overlay.

Daniel Vassallo