leaflet系列一 加载基本地图

首先 新建一个html页面,在head标签下加入如下js

然后在body元素下添加div,id=‘map’

加入如下js代码

最后在浏览器查看 大功告成

需要用到的css

 body {
            width: 100%;
            height: 100%;
        }

        #map {
            position: absolute;
            top: 0;
            bottom: 0;
            right: 0;
            left: 0;
        }

转载自:https://blog.csdn.net/u010303603/article/details/81559639

You may also like...

退出移动版