aebadirad / Leaflet.AutoLayers

A dynamic leaflet layers control that pulls from multiple mapservers and manages basemaps and overlays plus order
MIT License
31 stars 21 forks source link

mapServers is not returning layers to control #14

Open lrpatterson opened 4 years ago

lrpatterson commented 4 years ago

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)`

image

aebadirad commented 4 years ago

Are you getting any console error messages?

I may need an update to bring it up to 1.7 or later compatibility.

lrpatterson commented 4 years ago

I am not getting a console error at all.

valerio-bozzolan commented 2 years ago

Maybe not related but I see console errors in the demo here:

https://aebadirad.github.io/Leaflet.AutoLayers/example/index.html

Screenshot_2022_02_14_214723