HandsOnDataViz / leaflet-maps-with-google-sheets

Customize Leaflet maps with a linked Google Sheets template and GeoJSON data on GitHub
https://handsondataviz.github.io/leaflet-maps-with-google-sheets/
MIT License
141 stars 580 forks source link

ESRI Feature Service? #130

Open cyrusgis opened 1 year ago

cyrusgis commented 1 year ago

I was curious if it's possible to add a polygon layer using ESRI feature service url instead of uploading a geojson file to github repo? If so, how would I implement the layer into the legend and the ability to turn it on/off? Thanks!

JackDougherty commented 1 year ago

To my knowledge, Leaflet Maps with Google Sheets is not designed to display polygon layers using ESRI feature service URL, but am checking with developer @ilyankou

In our Google Sheet template > Polygons > Polygon GeoJSON URL (row 6), see that you can insert a Polygon file pathname in your GitHub repo, or external web address

If you wish to rewrite the JavaScript to work with ESRI feature service URL, see the Load GeoJSON section of our code

ilyankou commented 1 year ago

Hi @cyrusgis

@JackDougherty is right - our template doesn't currently support loading Esri or WMS tiles, but it is possible in principle with some JavaScript magic and a few dozen lines of code: