开发者

Google Maps API - Event Listeners

开发者 https://www.devze.com 2022-12-24 19:13 出处:网络
Is it necessary to remove Event listeners in when using google maps javascript 开发者_StackOverflow中文版api?

Is it necessary to remove Event listeners in when using google maps javascript 开发者_StackOverflow中文版api? "assume that code is working fine"

In other words do even listeners hinder website performance in such a way that one should ALWAYS remove/minimized unused listeners.

Thanks


I assume you talk about GEvent's from the Google Maps API. Personally, I haven't had any difficulties with them.

Nor have I had any problems with adding say jQuery .mouseup() on the map canvas to trigger map events, although I recommend using GEvent's for triggering and handling map-related stuff.

Edit: It'd be interesting with some profiling on having a simple map canvas, and see if other actions and performance is affected by removing GEvents.

0

精彩评论

暂无评论...
验证码 换一张
取 消