完成初版
This commit is contained in:
@@ -128,7 +128,7 @@
|
||||
methods: {
|
||||
initMap() {
|
||||
this.map = L.map('map').setView([30.2856, 109.4783], 13);
|
||||
L.tileLayer('http://localhost:3080/seeyon/seeyonExtend/assetsMap/map/{z}/{x}/{y}/tile.png', { maxZoom: 18, minZoom: 8 }).addTo(this.map);
|
||||
L.tileLayer('http://sz.esdci.cn:52100/seeyon/seeyonExtend/assetsMap/map/{z}/{x}/{y}/tile.png', { maxZoom: 18, minZoom: 8 }).addTo(this.map);
|
||||
var self = this;
|
||||
setTimeout(function() { self.map.invalidateSize(); }, 100);
|
||||
|
||||
@@ -142,8 +142,8 @@
|
||||
|
||||
// 点击地图:放大到18级,回写经纬度
|
||||
this.map.on('click', function(e) {
|
||||
var clickLat = parseFloat(e.latlng.lat.toFixed(6));
|
||||
var clickLng = parseFloat(e.latlng.lng.toFixed(6));
|
||||
var clickLat = parseFloat(e.latlng.lat.toFixed(8));
|
||||
var clickLng = parseFloat(e.latlng.lng.toFixed(8));
|
||||
self.lat = clickLat + '';
|
||||
self.lng = clickLng + '';
|
||||
self.placeMarker(clickLat, clickLng);
|
||||
|
||||
Reference in New Issue
Block a user