Leaflet.AutoLayers
Leaflet.AutoLayers copied to clipboard
mapServers is not returning layers to control
Currently I am just trying to pull back the layers from the service in the snippet below. Nothing is being return when I view the control in the DOM (also below). My leaflet version is 1.6.0. Can someone provide me some guidance on this issue?
`var config = { selectedOverlays: [], mapServers: { "url": "http://services.arcgisonline.com/arcgis/rest/services", "dictionary": "http://services.arcgisonline.com/arcgis/rest/services?f=pjson", "tileUrl": "/MapServer/tile/{z}/{y}/{x}", "name": "ArcGIS Online", "type": "esri" },
};
L.control.autolayers(config).addTo(map)`
Are you getting any console error messages?
I may need an update to bring it up to 1.7 or later compatibility.
I am not getting a console error at all.
Maybe not related but I see console errors in the demo here:
https://aebadirad.github.io/Leaflet.AutoLayers/example/index.html