- 🇩🇰Denmark ressa Copenhagen
I can't get the switcher to work.
I created a custom, following the method from the README file:
Apart from using any of the "off-the-shelf" maps, you can also assemble your
own map from the available layers at the Leaflet More Maps configuration page:
admin/config/system/leaflet-more-maps. A layer switcher will automatically appear
in the upper right-hand corner of the map.To reproduce:
Create Custom map
- Open "Leaflet More Maps" (/admin/config/system/leaflet-more-maps)
- Create a "Custom map #1 layer selection", name: "CustMap"
- Check
esri-world_topo_map
andesri-world_street_map
- Save
Add to a content type display
- Open "Manage display" (/admin/structure/types/manage/article/display)
- Open a Geofield field
- Set Format to "Leaflet map"
- Click on the settings icon to the right
- Open "Leaflet Map Tiles Layer" dropdown
- See that there is no "CustMap" ...
Or am I doing it wrong, and need to set it somewhere else? In that case, perhaps the README instructions can be updated, and the correct steps included?
Also, if I go to the "Leaflet Demo page" (/admin/config/system/leaflet-more-maps/demo), I see a lot of these errors. Maybe a clue?
Uncaught DOMException: Document.querySelectorAll: '#~CustMap' is not a valid selector
- 🇩🇰Denmark ressa Copenhagen
After getting a reply from @berramou I tried again, and for some reason the Layer switcher is shown. Great!
- Status changed to Needs review
about 1 year ago 10:34am 14 October 2023 - 🇩🇰Denmark ressa Copenhagen
I updated the README with, after getting some great tips from @berramou.
-
berramou →
committed eb0999ca on 2.1.x
Issue #2819431 by mErilainen: Document how custom maps and layer...
-
berramou →
committed eb0999ca on 2.1.x
- Status changed to Fixed
6 months ago 4:08pm 28 May 2024 Automatically closed - issue fixed for 2 weeks with no activity.