diff --git a/demos/01_circle.html b/demos/01_circle.html index cb43185a1b..3236c5aa79 100644 --- a/demos/01_circle.html +++ b/demos/01_circle.html @@ -47,7 +47,7 @@ opacity: 0.9 }).render(); - scene.TextLayer({ + const layer2 = scene.PointLayer({ zIndex: 5 }) .source(data) @@ -73,7 +73,6 @@ - const popup = new L7.Popup({anchor:'left'}).setText('hello world') const marker = new L7.Marker({color:'blue'}) .setLnglat( [120.19382669582967, 30.258134]) diff --git a/demos/01_point_circle.html b/demos/01_point_circle.html index 8014217389..dd49aafa4c 100644 --- a/demos/01_point_circle.html +++ b/demos/01_point_circle.html @@ -54,7 +54,7 @@ window.scene = scene; scene.on('loaded', () => { $.get('https://gw.alipayobjects.com/os/rmsportal/epnZEheZeDgsiSjSPcCv.json', data => { console.log(data); - const circleLayer = = scene.PointLayer({ + const circleLayer = scene.PointLayer({ zIndex: 0, }) .source(data,{ @@ -70,8 +70,8 @@ scene.on('loaded', () => { opacity: 1 }) .render(); - - scene.TextLayer({ + + scene.PointLayer({ zIndex: 5 }) .source(circleLayer.layerSource) @@ -91,7 +91,8 @@ scene.on('loaded', () => { }) .render(); -}); + + }); }); diff --git a/src/core/layer.js b/src/core/layer.js index 6a1250b82e..a4c37c6000 100644 --- a/src/core/layer.js +++ b/src/core/layer.js @@ -608,7 +608,7 @@ export default class Layer extends Base { */ destroy() { this.removeAllListeners(); - this.clearAllInteractions(); + this.get('interacionController').clearAllInteractions(); this.clearMapEvent(); if (this._object3D.type === 'composer') { this.remove(this._object3D); @@ -639,7 +639,6 @@ export default class Layer extends Base { } } this.layerMesh.geometry = null; - this.layerMesh.material.dispose(); this.layerMesh.material = null; if (this._pickingMesh) { this._pickingMesh.children[0].geometry = null;