最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Google Maps JavaScript API V3 - UnloadDeconstructorDeleteRemove - Stack Overflow

programmeradmin1浏览0评论

I can't find any way to remove and clean up a Google map when using the V3 API.

I've got it running in an AJAX site so I want to kill it off pletely without the page having to be reloaded.

I was hoping for a .unload() or .deconstruct() method, but can't seem to find one.

Any thoughts?

I can't find any way to remove and clean up a Google map when using the V3 API.

I've got it running in an AJAX site so I want to kill it off pletely without the page having to be reloaded.

I was hoping for a .unload() or .deconstruct() method, but can't seem to find one.

Any thoughts?

Share Improve this question edited Aug 21, 2012 at 14:55 sth 230k56 gold badges287 silver badges370 bronze badges asked Feb 24, 2012 at 18:17 Jamie GJamie G 1,7433 gold badges21 silver badges44 bronze badges 2
  • There is no such thing. V2 had GUnload(). Did you think about loading map into the iframe? – Cheery Commented Feb 24, 2012 at 19:30
  • Interesting idea, using it via an iframe would make cleaning it up nice and easy. It would mean reworking some of my website's controls though. Will certainly do this if I run out of other options! Thanks – Jamie G Commented Feb 26, 2012 at 10:23
Add a ment  | 

1 Answer 1

Reset to default 8

The V3 API should do a much better job managing it's memory. Does simply destroying the div that holds the map not meet your needs?

发布评论

评论列表(0)

  1. 暂无评论