mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
sped up the router
This commit is contained in:
parent
413a89a0bb
commit
143f3107e1
1 changed files with 8 additions and 3 deletions
|
@ -40,6 +40,7 @@ export class Router {
|
||||||
serviceUrl: CLIENT.OSRM_URL,
|
serviceUrl: CLIENT.OSRM_URL,
|
||||||
profile: 'bike',
|
profile: 'bike',
|
||||||
fitSelectedRoutes: false,
|
fitSelectedRoutes: false,
|
||||||
|
showAlternatives: false,
|
||||||
routeLine,
|
routeLine,
|
||||||
altLineOptions: {
|
altLineOptions: {
|
||||||
styles: [{ color: '#4597d0', opacity: 1, weight: 3 }]
|
styles: [{ color: '#4597d0', opacity: 1, weight: 3 }]
|
||||||
|
@ -50,9 +51,13 @@ export class Router {
|
||||||
draggable: true,
|
draggable: true,
|
||||||
icon: this.createWaypointMarker(),
|
icon: this.createWaypointMarker(),
|
||||||
}),
|
}),
|
||||||
routeWhileDragging: true,
|
routeWhileDragging: false,
|
||||||
}),
|
}),
|
||||||
routeWhileDragging: true
|
routeWhileDragging: false,
|
||||||
|
routingOptions: {
|
||||||
|
geometryOnly: false,
|
||||||
|
},
|
||||||
|
useHints: false,
|
||||||
}).on('waypointschanged', this.updateWaypointsCount);
|
}).on('waypointschanged', this.updateWaypointsCount);
|
||||||
|
|
||||||
this.router.addTo(map);
|
this.router.addTo(map);
|
||||||
|
@ -87,7 +92,7 @@ export class Router {
|
||||||
}
|
}
|
||||||
|
|
||||||
window.removeEventListener('mouseup', this.unlockPropagations);
|
window.removeEventListener('mouseup', this.unlockPropagations);
|
||||||
setTimeout(() => this.lockMapClicks(false), 300);
|
setTimeout(() => this.lockMapClicks(false), 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
startFrom = (latlngs: ILatLng): void => {
|
startFrom = (latlngs: ILatLng): void => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue