Following our Earth Day talk with colleagues working with NOAA, I am trying to render some of their map data in Leaflet. Despite following patterns that we’re previously working, I am unsuccessful at rendering the maps. Can you help?
When you open your dev tools you can see tons of 404 errors for the tile URLs that you construct. Apparently coast.noaa.gov does not support the z/y/x format, but instead expects a bounding box.
Here’s an example set of parameters as sent by the application in your first link:
This should give you the bounding box which you can then work into your arcgis URL. I have to dive deeper into the leaflet docs. Haven’t found an implementation yet where the bounds would get passed to a callback.
For those interested: @mootari is sleuthing through this one, but it’s turning out not to be the easiest nut to crack! The notebook is changing and @mootari’s introduced a lot of great clean-up, which is a great resource for those working with Leaflet maps in Observable. We’ll keep you updated if / when we hit on a solution (well, when Fabian hits it )
OK, got it working by switching to module imports via https://jspm.org/ (jspm.dev).
My working theory is that leaflet and esri-leaflet referenced different instances of LatLngBounds, which caused an instantiation to fail when toLatLngBounds() checks the instance type of a passed argument.
Amazing! Thank you for all the time you invested into this! I’ll update our events page, reference this discussion, and also will render out a few different maps to keep the conversation going. Thank you so much!