Closed walkerjeffd closed 9 months ago
Thanks this works. It looks like there is no way to set which layer is the default basemap without writing a function that retrieves the layer control after the HTML is created. I did not want to have the NOAA Nautical chart be shown as the starting basemap, and ideally it would also not be the first layer shown in the layer control box. My only option was to sort layers, but that seems to make things worse.
The nautical charts are the top entry, but not shown by default when the map loads.
I found a new nautical charts basemap here: https://nauticalcharts.noaa.gov/data/gis-data-and-services.html#enc-display-services
I just tried it on a basic leaflet map, and got it to work with this configuration:
The one hitch is that you need to add it using the WMS Tile Layer (l-wms-tile-layer) instead of a regular Tile Layer (l-tile-layer).
Probably easiest to add a second list of basemaps in
/lib/constants.js
(e.g.,basemapsWms
) that would just have this one in it, then add the<l-wms-tile-layer>
below the<l-tile-layer>
in theMapView
component.It's definitely slower than the other basemaps, but there's nothing we can do about it on our end.