微信小程序 map 组件 marker 数量超过 499 报如下错误:
[渲染层错误] MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 501 move listeners added. Use emitter.setMaxListeners() to increase limit
at e.o.addListener (https://map.qq.com/api/gljs?v=1.exp&key=6GUBZ-WOJKX-J7H46-7WVQI-E7A66-UTB4X&callback=__map_jssdk_init:11:71956)
at wl.value (https://map.qq.com/api/gljs?v=1.exp&key=6GUBZ-WOJKX-J7H46-7WVQI-E7A66-UTB4X&callback=__map_jssdk_init:17:226697)
at wl.value (https://map.qq.com/api/gljs?v=1.exp&key=6GUBZ-WOJKX-J7H46-7WVQI-E7A66-UTB4X&callback=__map_jssdk_init:17:227493)
at new wl (http://127.0.0.1:43967/__pageframe__/__dev__/WAWebview.js?t=wechat&s=1658976045582&v=2.25.1:1:1439232)
at Array.forEach (<anonymous>)
at l.updateMultiMarker (http://127.0.0.1:43967/__pageframe__/__dev__/WAWebview.js?t=wechat&s=1658976045582&v=2.25.1:1:1448516)
at http://127.0.0.1:43967/__pageframe__/__dev__/WAWebview.js?t=wechat&s=1658976045582&v=2.25.1:1:1447843(env: macOS,mp,1.05.2204250; lib: 2.25.1)
通常显示 1000+ 个 marker,最多不超过 10000 个。
请先使用真机调试