|
@@ -169,42 +169,42 @@ export default {
|
|
|
center: [this.centerpointLat, this.centerpointLon],//[43.876540660858154,125.24094343185425],
|
|
|
zoom: this.zoom,
|
|
|
crs: window.L.CRS.EPSG4326,
|
|
|
- zoomControl: true,
|
|
|
+ zoomControl: false,
|
|
|
doubleClickZoom: false,
|
|
|
layers: this.layers,
|
|
|
attributionControl: false,
|
|
|
logoControl: false,
|
|
|
}).on({"dblclick": this.callbackFunction});
|
|
|
- this.editableLayers = new window.L.FeatureGroup().addTo(this.map);
|
|
|
- let options = {
|
|
|
- position: 'topleft',
|
|
|
- draw: {
|
|
|
- polyline: null,
|
|
|
- polygon: {},
|
|
|
- circlemarker: null,
|
|
|
- circle: null,
|
|
|
- rectangle: {},
|
|
|
- marker: null,
|
|
|
- remove: false
|
|
|
- }
|
|
|
- };
|
|
|
- let drawControl = new window.L.Control.Draw(options);
|
|
|
- this.map.addControl(drawControl);
|
|
|
- this.map.on(window.L.Draw.Event.CREATED, function (e) {
|
|
|
-
|
|
|
- let type = e.layerType;
|
|
|
- let layer = e.layer;
|
|
|
-
|
|
|
- _that.editableLayers.clearLayers();
|
|
|
- _that.editableLayers.addLayer(layer);
|
|
|
-
|
|
|
- switch (type) {
|
|
|
- case 'polygon':
|
|
|
- case 'rectangle':
|
|
|
- _that.kuangXuan(layer._latlngs);
|
|
|
- break;
|
|
|
- }
|
|
|
- });
|
|
|
+ // this.editableLayers = new window.L.FeatureGroup().addTo(this.map);
|
|
|
+ // let options = {
|
|
|
+ // position: 'topleft',
|
|
|
+ // draw: {
|
|
|
+ // polyline: null,
|
|
|
+ // polygon: {},
|
|
|
+ // circlemarker: null,
|
|
|
+ // circle: null,
|
|
|
+ // rectangle: {},
|
|
|
+ // marker: null,
|
|
|
+ // remove: false
|
|
|
+ // }
|
|
|
+ // };
|
|
|
+ // let drawControl = new window.L.Control.Draw(options);
|
|
|
+ // this.map.addControl(drawControl);
|
|
|
+ // this.map.on(window.L.Draw.Event.CREATED, function (e) {
|
|
|
+ //
|
|
|
+ // let type = e.layerType;
|
|
|
+ // let layer = e.layer;
|
|
|
+ //
|
|
|
+ // // _that.editableLayers.clearLayers();
|
|
|
+ // // _that.editableLayers.addLayer(layer);
|
|
|
+ //
|
|
|
+ // switch (type) {
|
|
|
+ // case 'polygon':
|
|
|
+ // case 'rectangle':
|
|
|
+ // _that.kuangXuan(layer._latlngs);
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
this.initSjd();
|
|
|
},
|
|
|
callbackFunction: function (e) {
|