update dashboard
This commit is contained in:
@ -272,6 +272,7 @@
|
|||||||
<p class="text-bold mb-0">Engine Status</p>
|
<p class="text-bold mb-0">Engine Status</p>
|
||||||
<p id="infoVehicles-engineStatus" class="text-muted mb-0">Idling</p>
|
<p id="infoVehicles-engineStatus" class="text-muted mb-0">Idling</p>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{{-- <li class="list-group-item p-1 px-2">
|
{{-- <li class="list-group-item p-1 px-2">
|
||||||
<p class="text-bold mb-0">Durasi Berhenti (<span id="infoVehicles-idlingUnit">min</span>)</p>
|
<p class="text-bold mb-0">Durasi Berhenti (<span id="infoVehicles-idlingUnit">min</span>)</p>
|
||||||
<p id="infoVehicles-idlingDuration" class="text-muted mb-0">2946</p>
|
<p id="infoVehicles-idlingDuration" class="text-muted mb-0">2946</p>
|
||||||
@ -408,10 +409,11 @@
|
|||||||
<label class="text-muted">From</label>
|
<label class="text-muted">From</label>
|
||||||
<input class="form-control" id="historyStartDate">
|
<input class="form-control" id="historyStartDate">
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-2">
|
||||||
<label class="text-muted">To</label>
|
<label class="text-muted">To</label>
|
||||||
<input class="form-control" id="historyEndDate">
|
<input class="form-control" id="historyEndDate">
|
||||||
</div>
|
</div>
|
||||||
|
<button class="btn btn-primary btn-sm w-100 mb-3" id="historySearch">Search</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="infoMove-plots" class="infoMove-plots">
|
<div id="infoMove-plots" class="infoMove-plots">
|
||||||
{{-- <a href="#" class="plotMove-item">
|
{{-- <a href="#" class="plotMove-item">
|
||||||
@ -513,6 +515,13 @@
|
|||||||
<span class="badge p-1 ps-3 pe-3 bg-danger me-2">Stopped</span>
|
<span class="badge p-1 ps-3 pe-3 bg-danger me-2">Stopped</span>
|
||||||
<span class="badge p-1 ps-3 pe-3 bg-warning me-2">Idling</span>
|
<span class="badge p-1 ps-3 pe-3 bg-warning me-2">Idling</span>
|
||||||
<span class="badge p-1 ps-3 pe-3 bg-success">Moving</span>
|
<span class="badge p-1 ps-3 pe-3 bg-success">Moving</span>
|
||||||
|
</div>
|
||||||
|
<div class="col text-end" id="tripInfo">
|
||||||
|
<span class="badge p-1 ps-3 pe-3 bg-info me-2" style="background-color:#C0392B !important;">Trip 1</span>
|
||||||
|
<span class="badge p-1 ps-3 pe-3 bg-info me-2" style="background-color:#2980B9 !important;">Trip 2</span>
|
||||||
|
<span class="badge p-1 ps-3 pe-3 bg-info me-2" style="background-color:#27AE60 !important;">Trip 3</span>
|
||||||
|
<span class="badge p-1 ps-3 pe-3 bg-info me-2" style="background-color:#D35400 !important;">Trip 4</span>
|
||||||
|
<span class="badge p-1 ps-3 pe-3 bg-info me-2" style="background-color:#F39C12 !important;">Trip 5</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -941,7 +950,7 @@
|
|||||||
waypoints: latLngs.reverse(), // reverse to make first point as start
|
waypoints: latLngs.reverse(), // reverse to make first point as start
|
||||||
// router: L.Routing.osrmv1(),
|
// router: L.Routing.osrmv1(),
|
||||||
router: L.Routing.osrmv1({
|
router: L.Routing.osrmv1({
|
||||||
serviceUrl: "https://brilianapps.britimorleste.tl/osrm-backend/route/v1",
|
serviceUrl: "https://brilianapps.britimorleste.tl:5001/route/v1",
|
||||||
}),
|
}),
|
||||||
show: false,
|
show: false,
|
||||||
itinerary: null, // 👈 completely removes the panel
|
itinerary: null, // 👈 completely removes the panel
|
||||||
@ -950,7 +959,7 @@
|
|||||||
routeWhileDragging: false, // optional: don’t reroute while dragging
|
routeWhileDragging: false, // optional: don’t reroute while dragging
|
||||||
createMarker: () => null,
|
createMarker: () => null,
|
||||||
lineOptions:{
|
lineOptions:{
|
||||||
styles: [{ color: locs[0]?.options?.color, weight: 5, opacity: 0.7 }],
|
styles: [{ color: locs[0]?.options?.color, weight: 3, opacity: 0.7 }],
|
||||||
},
|
},
|
||||||
}).addTo(Leaflet.map)
|
}).addTo(Leaflet.map)
|
||||||
|
|
||||||
@ -1505,7 +1514,14 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
eventFilterHistoryDate: function() {
|
eventFilterHistoryDate: function() {
|
||||||
$('#historyStartDate, #historyEndDate').on('change', function(e) {
|
$('#historySearch').on('click', function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
// console.log("change history date", this.id, this.value);
|
||||||
|
const value = this.value;
|
||||||
|
const id = this.id;
|
||||||
|
if(State[id] == moment(value, "DD-MM-YYYY HH:mm").unix())
|
||||||
|
return false;
|
||||||
|
|
||||||
const date0 = moment($('#historyStartDate').val(), "DD-MM-YYYY HH:mm")
|
const date0 = moment($('#historyStartDate').val(), "DD-MM-YYYY HH:mm")
|
||||||
const date1 = moment($('#historyEndDate').val(), "DD-MM-YYYY HH:mm")
|
const date1 = moment($('#historyEndDate').val(), "DD-MM-YYYY HH:mm")
|
||||||
const {
|
const {
|
||||||
@ -2637,95 +2653,95 @@
|
|||||||
Trucks.routeStartEndGroupTrip(truckRoutes);
|
Trucks.routeStartEndGroupTrip(truckRoutes);
|
||||||
},
|
},
|
||||||
// routeStartEnd: function(truckRoutes) {
|
// routeStartEnd: function(truckRoutes) {
|
||||||
// let key_length = truckRoutes.length;
|
// let key_length = truckRoutes.length;
|
||||||
// let polyTruckRoutes = truckRoutes.map((obj, key) => {
|
// let polyTruckRoutes = truckRoutes.map((obj, key) => {
|
||||||
|
|
||||||
// obj.key_index = key + 1 // key_length - key;
|
// obj.key_index = key + 1 // key_length - key;
|
||||||
// // lists per detail info movement
|
// // lists per detail info movement
|
||||||
// Menu.showToListMovement(obj);
|
// Menu.showToListMovement(obj);
|
||||||
// return {
|
// return {
|
||||||
// lat: obj.latitude,
|
// lat: obj.latitude,
|
||||||
// lng: obj.longitude,
|
// lng: obj.longitude,
|
||||||
// options: {
|
// options: {
|
||||||
// // polyline
|
// // polyline
|
||||||
// smoothFactor: 1.0,
|
// smoothFactor: 1.0,
|
||||||
// noClip: true,
|
// noClip: true,
|
||||||
// bubblingMouseEvents: false,
|
// bubblingMouseEvents: false,
|
||||||
// // circle
|
// // circle
|
||||||
// radius: 5,
|
// radius: 5,
|
||||||
// // markerOpacity: 0
|
// // markerOpacity: 0
|
||||||
// },
|
// },
|
||||||
// // circle
|
// // circle
|
||||||
// // label: `<b>${obj.key_index}</b><br>${obj.nopol1} ${obj.nopol2} ${obj.nopol3}<br>${moment.unix(obj?.lst_loc_crt).format('DD MMM YYYY HH:mm')}<br>Speed: ${(typeof obj.speed != 'undefined') ? obj.speed : '0'}<br>${Number(obj.latitude).toFixed(5)} - ${Number(obj.longitude).toFixed(6)}<br>${decodeURIComponent(obj?.fulladdress || 'address')}`,
|
// // label: `<b>${obj.key_index}</b><br>${obj.nopol1} ${obj.nopol2} ${obj.nopol3}<br>${moment.unix(obj?.lst_loc_crt).format('DD MMM YYYY HH:mm')}<br>Speed: ${(typeof obj.speed != 'undefined') ? obj.speed : '0'}<br>${Number(obj.latitude).toFixed(5)} - ${Number(obj.longitude).toFixed(6)}<br>${decodeURIComponent(obj?.fulladdress || 'address')}`,
|
||||||
// // label: `<b>${obj.nopol1} ${obj.nopol2} ${obj.nopol3}</b><br>${moment.unix(obj?.lst_loc_crt).format('DD MMM YYYY HH:mm')}<br>${decodeURIComponent(obj?.fulladdress || 'address')}`,
|
// // label: `<b>${obj.nopol1} ${obj.nopol2} ${obj.nopol3}</b><br>${moment.unix(obj?.lst_loc_crt).format('DD MMM YYYY HH:mm')}<br>${decodeURIComponent(obj?.fulladdress || 'address')}`,
|
||||||
// label: `<b>${obj.nopol1} ${obj.nopol2} ${obj.nopol3}</b><br>${moment.unix(obj?.lst_loc_crt_d).format('DD MMM YYYY HH:mm:ss')}<br>${decodeURIComponent(obj?.fulladdress || 'address')}`,
|
// label: `<b>${obj.nopol1} ${obj.nopol2} ${obj.nopol3}</b><br>${moment.unix(obj?.lst_loc_crt_d).format('DD MMM YYYY HH:mm:ss')}<br>${decodeURIComponent(obj?.fulladdress || 'address')}`,
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// let polyline = Leaflet.addPolylines(polyTruckRoutes);
|
// let polyline = Leaflet.addPolylines(polyTruckRoutes);
|
||||||
// Leaflet.map.fitBounds(polyline.getBounds());
|
// Leaflet.map.fitBounds(polyline.getBounds());
|
||||||
// // let ctrWaypoint = Leaflet.addWaypoints(polyTruckRoutes.slice(0, 100))
|
// // let ctrWaypoint = Leaflet.addWaypoints(polyTruckRoutes.slice(0, 100))
|
||||||
|
|
||||||
// Leaflet.addCircles(polyTruckRoutes, function(circle, i) {
|
// Leaflet.addCircles(polyTruckRoutes, function(circle, i) {
|
||||||
// window.addEventListener('eventRemoveRouteStartEnd', function handler(e) {
|
// window.addEventListener('eventRemoveRouteStartEnd', function handler(e) {
|
||||||
// circle.remove();
|
// circle.remove();
|
||||||
// });
|
// });
|
||||||
// circle.on('click', function() {
|
// circle.on('click', function() {
|
||||||
// PgBar.syncToPlotTravelHistory(i);
|
// PgBar.syncToPlotTravelHistory(i);
|
||||||
// })
|
// })
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// let start = truckRoutes.at(-1);
|
// let start = truckRoutes.at(-1);
|
||||||
// let finish = truckRoutes.at(0);
|
// let finish = truckRoutes.at(0);
|
||||||
// // ${(start?.city_text || start?.state_tex || 'address't)} - ${(start?.postcode || 'postcode')}
|
// // ${(start?.city_text || start?.state_tex || 'address't)} - ${(start?.postcode || 'postcode')}
|
||||||
// // ${(finish?.city_text || finish?.state_text || 'address')} - ${(finish?.postcode || 'postcode')}
|
// // ${(finish?.city_text || finish?.state_text || 'address')} - ${(finish?.postcode || 'postcode')}
|
||||||
// let startMarker = Leaflet.addMarkers({
|
// let startMarker = Leaflet.addMarkers({
|
||||||
// lat: start.latitude,
|
// lat: start.latitude,
|
||||||
// lng: start.longitude,
|
// lng: start.longitude,
|
||||||
// label: `<b>Start Poin</b><br>${start.nopol1} ${start.nopol2} ${start.nopol3}<br>${moment.unix(start?.lst_loc_crt).format('DD MMM YYYY HH:mm')}<br>Speed: ${(typeof start.lst_speed != 'undefined') ? start.lst_speed : '0'}<br>${Number(start.latitude).toFixed(5)},${Number(start.longitude).toFixed(6)}<br>${decodeURIComponent(start.fulladdress || 'address')}`,
|
// label: `<b>Start Poin</b><br>${start.nopol1} ${start.nopol2} ${start.nopol3}<br>${moment.unix(start?.lst_loc_crt).format('DD MMM YYYY HH:mm')}<br>Speed: ${(typeof start.lst_speed != 'undefined') ? start.lst_speed : '0'}<br>${Number(start.latitude).toFixed(5)},${Number(start.longitude).toFixed(6)}<br>${decodeURIComponent(start.fulladdress || 'address')}`,
|
||||||
// // label: `<b>Start Poin</b><br>${start.nopol1} ${start.nopol2} ${start.nopol3}<br>${moment.unix(start?.lst_loc_crt_d).utcOffset(9 * 60).format('DD MMM YYYY HH:mm:ss')}<br>Speed: ${(typeof start.lst_speed != 'undefined') ? start.lst_speed : '0'}<br>${Number(start.latitude).toFixed(5)},${Number(start.longitude).toFixed(6)}<br>${decodeURIComponent(start.fulladdress || 'address')}`,
|
// // label: `<b>Start Poin</b><br>${start.nopol1} ${start.nopol2} ${start.nopol3}<br>${moment.unix(start?.lst_loc_crt_d).utcOffset(9 * 60).format('DD MMM YYYY HH:mm:ss')}<br>Speed: ${(typeof start.lst_speed != 'undefined') ? start.lst_speed : '0'}<br>${Number(start.latitude).toFixed(5)},${Number(start.longitude).toFixed(6)}<br>${decodeURIComponent(start.fulladdress || 'address')}`,
|
||||||
// options: {
|
// options: {
|
||||||
// icon: Icon.titikAwal(),
|
// icon: Icon.titikAwal(),
|
||||||
// // rotationAngle: 290
|
// // rotationAngle: 290
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
// let finishMarker = Leaflet.addMarkers({
|
// let finishMarker = Leaflet.addMarkers({
|
||||||
// lat: finish.latitude,
|
// lat: finish.latitude,
|
||||||
// lng: finish.longitude,
|
// lng: finish.longitude,
|
||||||
// label: `<b>End Poin</b><br>${finish.nopol1} ${finish.nopol2} ${finish.nopol3}<br>${moment.unix(finish?.lst_loc_crt).format('DD MMM YYYY HH:mm')}<br>Speed: ${(typeof finish.lst_speed != 'undefined') ? finish.lst_speed : '0'}<br>${Number(finish.latitude).toFixed(5)},${Number(finish.longitude).toFixed(6)}<br>${decodeURIComponent(finish.fulladdress || 'address')}`,
|
// label: `<b>End Poin</b><br>${finish.nopol1} ${finish.nopol2} ${finish.nopol3}<br>${moment.unix(finish?.lst_loc_crt).format('DD MMM YYYY HH:mm')}<br>Speed: ${(typeof finish.lst_speed != 'undefined') ? finish.lst_speed : '0'}<br>${Number(finish.latitude).toFixed(5)},${Number(finish.longitude).toFixed(6)}<br>${decodeURIComponent(finish.fulladdress || 'address')}`,
|
||||||
// //label: `<b>End Poin</b><br>${finish.nopol1} ${finish.nopol2} ${finish.nopol3}<br>${moment.unix(finish?.lst_loc_crt_d).utcOffset(9 * 60).format('DD MMM YYYY HH:mm:ss')}<br>Speed: ${(typeof finish.lst_speed != 'undefined') ? finish.lst_speed : '0'}<br>${Number(finish.latitude).toFixed(5)},${Number(finish.longitude).toFixed(6)}<br>${decodeURIComponent(finish.fulladdress || 'address')}`,
|
// //label: `<b>End Poin</b><br>${finish.nopol1} ${finish.nopol2} ${finish.nopol3}<br>${moment.unix(finish?.lst_loc_crt_d).utcOffset(9 * 60).format('DD MMM YYYY HH:mm:ss')}<br>Speed: ${(typeof finish.lst_speed != 'undefined') ? finish.lst_speed : '0'}<br>${Number(finish.latitude).toFixed(5)},${Number(finish.longitude).toFixed(6)}<br>${decodeURIComponent(finish.fulladdress || 'address')}`,
|
||||||
// options: {
|
// options: {
|
||||||
// icon: Icon.titikAkhir()
|
// icon: Icon.titikAkhir()
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// // remove marker, circle, event listener and all about this marker
|
// // remove marker, circle, event listener and all about this marker
|
||||||
// State.eventRemoveRouteStartEnd = new CustomEvent('eventRemoveRouteStartEnd', {
|
// State.eventRemoveRouteStartEnd = new CustomEvent('eventRemoveRouteStartEnd', {
|
||||||
// startMarker,
|
// startMarker,
|
||||||
// finishMarker,
|
// finishMarker,
|
||||||
// polyline,
|
// polyline,
|
||||||
// polyline,
|
// polyline,
|
||||||
// });
|
// });
|
||||||
// window.addEventListener('eventRemoveRouteStartEnd', function handler(e) {
|
// window.addEventListener('eventRemoveRouteStartEnd', function handler(e) {
|
||||||
// startMarker.removeEventListener('click');
|
// startMarker.removeEventListener('click');
|
||||||
// startMarker.removeEventListener('moveend');
|
// startMarker.removeEventListener('moveend');
|
||||||
// startMarker.remove();
|
// startMarker.remove();
|
||||||
// finishMarker.removeEventListener('click');
|
// finishMarker.removeEventListener('click');
|
||||||
// finishMarker.removeEventListener('moveend');
|
// finishMarker.removeEventListener('moveend');
|
||||||
// finishMarker.remove();
|
// finishMarker.remove();
|
||||||
// polyline.remove();
|
// polyline.remove();
|
||||||
// e.currentTarget.removeEventListener(e.type,
|
// e.currentTarget.removeEventListener(e.type,
|
||||||
// handler); // window.removeEventListener('remove', this.handler, true);
|
// handler); // window.removeEventListener('remove', this.handler, true);
|
||||||
// State.eventRemoveRouteStartEnd = null;
|
// State.eventRemoveRouteStartEnd = null;
|
||||||
// State.inShowLastMove = null;
|
// State.inShowLastMove = null;
|
||||||
|
|
||||||
// PgBar.tglMenuPlayback(false);
|
// PgBar.tglMenuPlayback(false);
|
||||||
// PgBar.reset();
|
// PgBar.reset();
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// PgBar.setMinMax(0, truckRoutes.length - 1);
|
// PgBar.setMinMax(0, truckRoutes.length - 1);
|
||||||
// },
|
// },
|
||||||
routeStartEndGroupTrip: function(truckRoutes) {
|
routeStartEndGroupTrip: function(truckRoutes) {
|
||||||
const colors = [
|
const colors = [
|
||||||
"#2980B9", // Dark Blue
|
"#2980B9", // Dark Blue
|
||||||
"#C0392B", // Dark Red
|
"#C0392B", // Dark Red
|
||||||
@ -2780,29 +2796,61 @@
|
|||||||
})
|
})
|
||||||
// console.log("truckRoutes update", polyTruckRoutes);
|
// console.log("truckRoutes update", polyTruckRoutes);
|
||||||
|
|
||||||
polyTruckRoutes.forEach((poly, idx) => {
|
polyTruckRoutes.forEach(async (poly, idx) => {
|
||||||
// console.log("poly", poly);
|
// console.log("poly", poly);
|
||||||
let polyline = Leaflet.addRoutes(poly)
|
let polyline = Leaflet.addRoutes(poly)
|
||||||
// let polyline = Leaflet.addPolylines(poly)
|
// let polyline = Leaflet.addPolylines(poly)
|
||||||
// if(idx == 0)
|
|
||||||
// Leaflet.map.fitBounds(polyline.getBounds());
|
|
||||||
|
|
||||||
|
// let circlesStartStop = []
|
||||||
|
// Leaflet.addCircles(poly, function(circle, i) {
|
||||||
|
// if(i == 0 || i == (polyTruckRoutes.length - 1))
|
||||||
|
// circlesStartStop.push(circle)
|
||||||
|
|
||||||
// let circlesStartStop = [...poly.filter((p, i) => i == 0 || i == (poly.length - 1))]
|
// window.addEventListener('eventRemoveRouteStartEnd', function handler(e) {
|
||||||
let circlesStartStop = []
|
// circle.remove();
|
||||||
// console.log("circlesStartStop", circlesStartStop);
|
// });
|
||||||
|
// circle.on('click', function() {
|
||||||
Leaflet.addCircles(poly, function(circle, i) {
|
// PgBar.syncToPlotTravelHistory(i);
|
||||||
if(i == 0 || i == (polyTruckRoutes.length - 1))
|
// })
|
||||||
circlesStartStop.push(circle)
|
// });
|
||||||
|
function addCirclesAsync(poly) {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
let circles = [];
|
||||||
|
|
||||||
window.addEventListener('eventRemoveRouteStartEnd', function handler(e) {
|
Leaflet.addCircles(poly, function(circle, i) {
|
||||||
circle.remove();
|
if (i === 0 || i === (poly.length - 1)) {
|
||||||
|
circles.push(circle);
|
||||||
|
}
|
||||||
|
|
||||||
|
circle.on('click', function() {
|
||||||
|
PgBar.syncToPlotTravelHistory(i);
|
||||||
|
});
|
||||||
|
|
||||||
|
// ✅ When last point processed, resolve
|
||||||
|
if (i === poly.length - 1) {
|
||||||
|
resolve(circles);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
circle.on('click', function() {
|
}
|
||||||
PgBar.syncToPlotTravelHistory(i);
|
|
||||||
})
|
let circlesStartStop = [];
|
||||||
});
|
for (let [idx, poly] of polyTruckRoutes.entries()) {
|
||||||
|
let polyline = Leaflet.addRoutes(poly);
|
||||||
|
|
||||||
|
// wait for all circles
|
||||||
|
circlesStartStop = await addCirclesAsync(poly);
|
||||||
|
|
||||||
|
// keep event + removal logic here
|
||||||
|
State.eventRemoveRouteStartEnd = new CustomEvent('eventRemoveRouteStartEnd', {
|
||||||
|
detail: { polyline, circlesStartStop }
|
||||||
|
});
|
||||||
|
|
||||||
|
window.addEventListener('eventRemoveRouteStartEnd', function(e) {
|
||||||
|
polyline.remove();
|
||||||
|
circlesStartStop.forEach(c => c.remove());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// // remove marker, circle, event listener and all about this marker
|
// // remove marker, circle, event listener and all about this marker
|
||||||
State.eventRemoveRouteStartEnd = new CustomEvent('eventRemoveRouteStartEnd', {
|
State.eventRemoveRouteStartEnd = new CustomEvent('eventRemoveRouteStartEnd', {
|
||||||
@ -2813,28 +2861,12 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
window.addEventListener('eventRemoveRouteStartEnd', function (e) {
|
window.addEventListener('eventRemoveRouteStartEnd', function (e) {
|
||||||
// console.log("circlesStartStop", circlesStartStop);
|
|
||||||
polyline.remove();
|
polyline.remove();
|
||||||
circlesStartStop.forEach(c => c.remove())
|
circlesStartStop.forEach(c => c.remove())
|
||||||
});
|
});
|
||||||
// State.eventRemoveRouteStartEnd = new CustomEvent('eventRemoveRouteStartEnd', {
|
|
||||||
// polyline,
|
|
||||||
// circlesStartStop,
|
|
||||||
// });
|
|
||||||
// console.log("polyline", polyline);
|
|
||||||
// console.log("circlesStartStop", circlesStartStop);
|
|
||||||
// console.log("State.eventRemoveRouteStartEnd", State.eventRemoveRouteStartEnd);
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
window.addEventListener('eventRemoveRouteStartEnd', function handler(e) {
|
window.addEventListener('eventRemoveRouteStartEnd', function handler(e) {
|
||||||
// startMarker.removeEventListener('click');
|
|
||||||
// startMarker.removeEventListener('moveend');
|
|
||||||
// startMarker.remove();
|
|
||||||
// finishMarker.removeEventListener('click');
|
|
||||||
// finishMarker.removeEventListener('moveend');
|
|
||||||
// finishMarker.remove();
|
|
||||||
// polyline.remove();
|
|
||||||
e.currentTarget.removeEventListener(e.type,
|
e.currentTarget.removeEventListener(e.type,
|
||||||
handler); // window.removeEventListener('remove', this.handler, true);
|
handler); // window.removeEventListener('remove', this.handler, true);
|
||||||
State.eventRemoveRouteStartEnd = null;
|
State.eventRemoveRouteStartEnd = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user