How to access the map properties?

Hello,

so I want to add my own overlays and baselayers to my local copy of the OpenRouteService-App (https://github.com/GIScience/openrouteservice-app).
I managed to add a third icon in the sidebar on the left and create a panel when that icon is clicked, as shown in the picture below.
panel
But I can’t wrap my head around on how to access the map properties. How can i use the module of the app/components/ors-map/ors-map.js in other modules?

Hi @Mono,
We are using leaflet controls to add overlays and basemaps.

They are added here in ors-map.js

They are initiated before as Leaflet tilelayers.

There is currently no “dynamic” way to add overlays and basemaps.
But you can take a look at Leaflet controls in general or look at how the geometries are added when a route is returned.

Have fun developing :slight_smile:

Cheers, Amandus