Commit 7c4ec9667cdc6ee3f9b7913640d2c361aacdaa60
1 parent
27cc8f16
Exists in
dev
fix:天地图初始化修改
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
frontend/front/src/views/pages/enterpriseGasStation/enterpriseGasMap/index.vue
... | ... | @@ -432,12 +432,12 @@ export default { |
432 | 432 | // center: this.centerPoint,//初始化地图中心点 |
433 | 433 | // }); |
434 | 434 | // ===========天地图代码============== |
435 | - // if(!this.map){ | |
435 | + if(!this.map){ | |
436 | 436 | // 防止二次初始化导致拖拽失效 |
437 | 437 | this.map = new T.Map('mapContainer',{ |
438 | 438 | projection: 'EPSG:900913' |
439 | 439 | }); |
440 | - // } | |
440 | + } | |
441 | 441 | this.map.centerAndZoom(new T.LngLat(this.centerPoint[0], this.centerPoint[1]), 15); |
442 | 442 | //允许鼠标双击放大地图 |
443 | 443 | this.map.enableScrollWheelZoom(); | ... | ... |