优化地图功能的开关
parent
ee62f17170
commit
afe2450a14
|
@ -12,26 +12,7 @@
|
||||||
<script type="text/javascript" src="./static/js/jessibuca/jessibuca.js"></script>
|
<script type="text/javascript" src="./static/js/jessibuca/jessibuca.js"></script>
|
||||||
<script type="text/javascript" src="./static/js/EasyWasmPlayer.js"></script>
|
<script type="text/javascript" src="./static/js/EasyWasmPlayer.js"></script>
|
||||||
<script type="text/javascript" src="./static/js/ZLMRTCClient.js"></script>
|
<script type="text/javascript" src="./static/js/ZLMRTCClient.js"></script>
|
||||||
|
<script type="text/javascript" src="./static/js/mapConfig.js"></script>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<!-- built files will be auto injected -->
|
|
||||||
<script>
|
|
||||||
// map组件全局参数, 注释此内容可以关闭地图功能
|
|
||||||
window.mapParam = {
|
|
||||||
// 坐标系 GCJ-02 WGS-84,
|
|
||||||
coordinateSystem: "GCJ-02",
|
|
||||||
// 地图瓦片地址
|
|
||||||
tilesUrl: "http://webrd0{1-4}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1&style=8",
|
|
||||||
// 瓦片大小
|
|
||||||
tileSize: 256,
|
|
||||||
// 默认层级
|
|
||||||
zoom:10,
|
|
||||||
// 默认地图中心点
|
|
||||||
center:[116.41020, 39.915119],
|
|
||||||
// 地图最大层级
|
|
||||||
maxZoom:18,
|
|
||||||
// 地图最小层级
|
|
||||||
minZoom: 3
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -59,7 +59,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
onOff: typeof window.mapParam !== "undefined",
|
onOff: typeof window.mapParam !== "undefined" && window.mapParam.enable,
|
||||||
deviceService: new DeviceService(),
|
deviceService: new DeviceService(),
|
||||||
layer: null,
|
layer: null,
|
||||||
lineLayer: null,
|
lineLayer: null,
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
// map组件全局参数, 注释此内容可以关闭地图功能
|
||||||
|
window.mapParam = {
|
||||||
|
// 开启/关闭地图功能
|
||||||
|
enable: true,
|
||||||
|
// 坐标系 GCJ-02 WGS-84,
|
||||||
|
coordinateSystem: "GCJ-02",
|
||||||
|
// 地图瓦片地址
|
||||||
|
tilesUrl: "http://webrd0{1-4}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1&style=8",
|
||||||
|
// 瓦片大小
|
||||||
|
tileSize: 256,
|
||||||
|
// 默认层级
|
||||||
|
zoom:10,
|
||||||
|
// 默认地图中心点
|
||||||
|
center:[116.41020, 39.915119],
|
||||||
|
// 地图最大层级
|
||||||
|
maxZoom:18,
|
||||||
|
// 地图最小层级
|
||||||
|
minZoom: 3
|
||||||
|
}
|
Loading…
Reference in New Issue