What is the Proper Way to Destroy a Map Instance?

前端 未结 7 1526
旧巷少年郎
旧巷少年郎 2020-11-27 13:18

I recently developed an html5 mobile application. The application was a single page where navigation hash change events replaced the entire DOM. One section of the applicati

7条回答
  •  自闭症患者
    2020-11-27 13:25

    The official answer is you don't. Map instances in a single page application should be reused and not destroyed then recreated.

    For some single page applications, this may mean re-architecting the solution such that once a map is created it may be hidden or disconnected from the DOM, but it is never destroyed/recreated.

提交回复
热议问题