Commit 70f4a1d4 authored by 高晓帆's avatar 高晓帆

fix

parent 37e3fb16
This diff is collapsed.
This diff is collapsed.
...@@ -39,6 +39,7 @@ export default class DeckNew { ...@@ -39,6 +39,7 @@ export default class DeckNew {
this.creatPolygon = this.creatPolygon.bind(this); this.creatPolygon = this.creatPolygon.bind(this);
this.setLayerSortName = this.setLayerSortName.bind(this); this.setLayerSortName = this.setLayerSortName.bind(this);
this.setPitch = this.setPitch.bind(this); this.setPitch = this.setPitch.bind(this);
this.removeLayer = this.removeLayer.bind(this);
} }
initLayer() { initLayer() {
this.layerSort() this.layerSort()
......
...@@ -236,6 +236,10 @@ function dealMapPath(value, layerName, color) { ...@@ -236,6 +236,10 @@ function dealMapPath(value, layerName, color) {
// map.setLayerSortName('bufferLayer', layerName + 'Buffer') // map.setLayerSortName('bufferLayer', layerName + 'Buffer')
map.createGeoJsonLayer(obj, attr, layerName + 'Buffer') map.createGeoJsonLayer(obj, attr, layerName + 'Buffer')
mapLayers[`${layerName}Buffer`] = `${layerName}Buffer` mapLayers[`${layerName}Buffer`] = `${layerName}Buffer`
} else {
// console.log(map)
value!=null&&map.removeLayer('map', layerName)
value!=null&&map.removeLayer('map', layerName + 'Buffer')
} }
} }
......
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