摘要: <template> <div id="app"> <div id="Map" ref="map"></div> </div> </template> <script> import "ol/ol.css"; import VectorSource from "ol/source/Vector"; 阅读全文
posted @ 2021-08-02 15:07 xiao前端 阅读(664) 评论(0) 推荐(0)
摘要: <template> <div id="map" ref="rootmap"></div> </template> <script> import "ol/ol.css"; import { get as getProjection } from "ol/proj"; import { getWid 阅读全文
posted @ 2021-08-02 14:57 xiao前端 阅读(1000) 评论(1) 推荐(0)
摘要: <template> <div id="map" ref="map"></div> </template> <script> import "ol/ol.css"; import TileLayer from "ol/layer/Tile"; import OSM from "ol/source/O 阅读全文
posted @ 2021-08-02 12:01 xiao前端 阅读(1083) 评论(0) 推荐(0)
摘要: 1) fullscreen全屏控件 写法一: import { FullScreen } from "ol/control"; this.map.addControl(new FullScreen()); 写法二: import { defaults as defaultControls, Full 阅读全文
posted @ 2021-07-29 09:23 xiao前端 阅读(691) 评论(0) 推荐(0)
摘要: (一)安装 1. cnpm i -s ol (二)地图组件 1 <template> 2 <div id="map" ref="map"></div> 3 </template> 4 5 <script> 6 import "ol/ol.css"; 7 import TileLayer from " 阅读全文
posted @ 2021-07-27 21:56 xiao前端 阅读(2668) 评论(1) 推荐(1)