Open NathanWhitmore opened 1 year ago
The Esri.OceanBasemap got retired:
and a new endpoint created (from Ocean_Basemap
to Ocean/World_Ocean_Base
), which seems to be updated in leaflet-providers on Feb 10, 2023:
This line could be edited:
But better to update the whole file to latest with PR. I don't have time at the moment to do this.
After a bit more exploration, I discovered:
variant
name changed from:
Ocean_Basemap
Ocean/World_Ocean_Base
for surface + Ocean/World_Ocean_Reference
for labelslibs
(or inline) upon rendering to html. The source for the leaflet-providers_{version}.js
actually comes from the leaflet.providers R package, which can pull the latest leaflet-providers - npm via unpkg.com, eg https://unpkg.com/leaflet-providers@1.13.0/leaflet-providers.js. However, the npm package has not been updated for a year, so it doesn't reflect the latest fix for Esri.OceanBasemap
at leaflet-extras/leaflet-providers: leaflet-providers.js#L472 .leaflet-providers.js
gets updated on npm, here's a reasonable workaround to manually set the proper variant
while giving you the option of separately displaying Base imagery vs Reference labels and borders:leaflet() |>
# add base: blue bathymetry and light brown/green topography
addProviderTiles(
"Esri.OceanBasemap",
options = providerTileOptions(
variant = "Ocean/World_Ocean_Base")) |>
# add reference: placename labels and borders
addProviderTiles(
"Esri.OceanBasemap",
options = providerTileOptions(
variant = "Ocean/World_Ocean_Reference"))
Hi there. Unfortunately, the Esri.OceanBasemap tile option is no longer rendering via addProviderTiles (I've tried on my machine R version 4.2.0 and via Posit Cloud 4.2.2). Other tiles continue to render as expected. The code worked fine a few weeks ago.
This code now just renders a blank map:
However, I can get the ocean basemap via the leaflet.esri package which suggests the issue may not be on the map server side.
Any thoughts?