Leaflet 地图开发–Leaflet Map noConflict—全局开关

Leaflet 地图开发–Leaflet Map noConflict—全局开关

This method restores the L global variable to the original value it had before Leaflet inclusion, and returns the real Leaflet namespace so you can put it elsewhere, like this:

此方法将L全局变量恢复为包含传单之前的原始值,并返回真正的传单命名空间,以便您可以将其放在其他位置,如下所示:

<script src='libs/l.js'>
<!-- L points to some other library -->

<script src='leaflet.js'>
<!-- you include Leaflet, it replaces the L variable to Leaflet namespace -->

<script>
var Leaflet = L.noConflict();
// now L points to that other library again, and you can use Leaflet.Map etc.
</script>
5 1 投票
文章评分
订阅评论
提醒
0 评论
最旧
最新 最多投票
内联反馈
查看所有评论
0
希望看到您的想法,请您发表评论x