Commit 6b56a95d authored by 郭铭瑶's avatar 郭铭瑶 🤘

换新版地图包

parent a806f94d
...@@ -18,10 +18,7 @@ ...@@ -18,10 +18,7 @@
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
</body> </body>
<script src="./static/hls.js"></script> <script src="./static/hls.js"></script>
<!-- 下面是开发用 --> <script src="./static/shanghaiwuye_gis_map_api_3.2.210421/SMap.min.js"></script>
<script src="./static/SMap.min.js"></script>
<!-- 下面是生产用 -->
<!-- <script src="./static/esm/SMap.min.js"></script> -->
<script src="./static/Plugins.min.js"></script> <script src="./static/Plugins.min.js"></script>
</html> </html>
...@@ -21,16 +21,18 @@ export default { ...@@ -21,16 +21,18 @@ export default {
}, },
methods: { methods: {
initMap() { initMap() {
new SMap.Network().setNet(this.$api.MAP_NET)
this.map = new SMap.Map('mapContainer', { this.map = new SMap.Map('mapContainer', {
viewMode: '2D', viewMode: '2D',
// center: [0, 0], // center: [0, 0],
// zoom: 4, // zoom: 4,
// zooms: [1, 12], // zooms: [1, 12],
mapStyle: 'smap://styles/dark', mapStyle: 'smap://styles/dark',
appKey: 'ACF69EDK17LON63GHPF081',
}).on(SMap.MapEvent.maploaded, () => { }).on(SMap.MapEvent.maploaded, () => {
// this.map.hideXQ_Poly() // this.map.hideXQ_Poly()
this.map.hideXQ_Point() // this.map.hideXQ_Point()
this.map.hideMPZ() // this.map.hideMPZ()
this.addListener() this.addListener()
this.$emit('complete') this.$emit('complete')
}) })
......
let MAP_NET = ''
let BASE_URL = '' let BASE_URL = ''
const DATA_URL = 'http://10.89.1.208:10005' const DATA_URL = 'http://10.89.1.208:10005'
switch (process.env.NODE_ENV) { switch (process.env.NODE_ENV) {
case 'production': case 'production':
MAP_NET = 'affairs' // 政务网地图
BASE_URL = 'http://10.89.4.164:18080/api' BASE_URL = 'http://10.89.4.164:18080/api'
// BASE_URL = 'http://yangpu.hm.omniview.pro/api' // BASE_URL = 'http://yangpu.hm.omniview.pro/api' // 废弃
break break
default: default:
BASE_URL = 'http://yangpu.hm.omniview.pro/api' MAP_NET = 'internet' // 互联网网地图
BASE_URL = 'http://yangpu-hm.omniview.pro/api/v2'
// BASE_URL = 'http://yangpu.hm.omniview.pro/api' // 废弃
} }
export default { export default {
MAP_NET,
BASE_URL, BASE_URL,
DATA_URL, DATA_URL,
GET_HANDLE_LIST: '/service-special-ddd/public/alarm/index', // 联勤联动列表 GET_HANDLE_LIST: '/service-special-ddd/public/alarm/index', // 联勤联动列表
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
new SMap.Network().setNet(网络参数);
网络参数包括以下几个值:
'internet':表示互联网2D;
'affairs':表示政务网2D;
'local3D':表示局域网3D;
'affairs3D':表示政务网3D;
'njdl':表示南京东路政务网3D;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment