Open arroui opened 3 months ago
Since this requires installing a different library I think the best approach would be a separate package as well. In theory, we could have the code in this repo if needed, or not, depends on what you believe would be the best approach. I'm not deeply familiar with the directions library, but if all one need is to initialize it, I'm not sure this fancy directive is worth all the trouble, a simple instruction in the readme may solve this, wouldn't it?
I agree, Simply initialising it with the load event is better. A section in the ReadMe about plug-ins would help ?
<mgl-map
(mapLoad)="setDirections($event)"
>
setDirections(map: any) {
this.directions = new MapLibreGlDirections(map)
map.addControl(this.directions);
}
We can add it to the showcase I guess. Might require some other changes, but it would have the most impact I believe.
But readme can work as well I guess.
I'd like some indications on the best way to do this.
I would like to integrate the plug-in here https://github.com/maplibre/maplibre-gl-directions In the documentation, there is two control :
Both depends on an instance of MapLibreGlDirections My questions are :
This is the code I've tried so far :