client: do stops layer above all (?)
client: stops only once and pointer-events
This commit is contained in:
@@ -154,6 +154,7 @@ export default class MhdMapClient {
|
|||||||
this.currentLinePointsRenderer = L.canvas({ padding: 0.5 }).addTo(this.map);
|
this.currentLinePointsRenderer = L.canvas({ padding: 0.5 }).addTo(this.map);
|
||||||
this.currentVehicleTrace = new L.LayerGroup().addTo(this.map);
|
this.currentVehicleTrace = new L.LayerGroup().addTo(this.map);
|
||||||
this.currentVehicleTraceRenderer = L.canvas({ padding: 0.5 }).addTo(this.map);
|
this.currentVehicleTraceRenderer = L.canvas({ padding: 0.5 }).addTo(this.map);
|
||||||
|
this.currentVehicleTraceRenderer._container.style.pointerEvents = 'none';
|
||||||
//this.currentLinePointsRenderer = L.canvas({ padding: 0.5 });
|
//this.currentLinePointsRenderer = L.canvas({ padding: 0.5 });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -230,6 +231,9 @@ export default class MhdMapClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateStops(stops) {
|
updateStops(stops) {
|
||||||
|
if (this.markerLayers.hasOwnProperty('stop'))
|
||||||
|
return;
|
||||||
|
|
||||||
const markers = [];
|
const markers = [];
|
||||||
|
|
||||||
for (let stop of stops) {
|
for (let stop of stops) {
|
||||||
@@ -251,7 +255,7 @@ export default class MhdMapClient {
|
|||||||
data: {
|
data: {
|
||||||
stop: stop,
|
stop: stop,
|
||||||
},
|
},
|
||||||
renderer: this.currentVehicleTraceRenderer,
|
renderer: this.currentLinePointsRenderer,
|
||||||
color: '#0F95D8',
|
color: '#0F95D8',
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
fill: true,
|
fill: true,
|
||||||
@@ -263,7 +267,6 @@ export default class MhdMapClient {
|
|||||||
markers.push(newMarker);
|
markers.push(newMarker);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('stops', stops);
|
|
||||||
if (this.markerLayers.hasOwnProperty('stop')) {
|
if (this.markerLayers.hasOwnProperty('stop')) {
|
||||||
this.markerLayers['stop'].clearLayers();
|
this.markerLayers['stop'].clearLayers();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user