feat(rover): add ESRI satellite imagery as base-layer option

This commit is contained in:
Graham McIntire 2026-04-26 11:52:12 -05:00
parent 5a4129ffca
commit 5e1155f9da
No known key found for this signature in database
GPG key ID: F4ABF488E6029E59

View file

@ -19,6 +19,7 @@ interface RoverMapHook extends ViewHook {
map: L.Map
osmLayer: L.TileLayer
topoLayer: L.TileLayer | null
satelliteLayer: L.TileLayer
hillshadeLayer: L.TileLayer
layersControl: L.Control.Layers
stations: Station[]
@ -116,6 +117,10 @@ export const RoverMap: Partial<RoverMapHook> = {
this.topoLayer = L.tileLayer("https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png", {
maxZoom: 17
})
this.satelliteLayer = L.tileLayer(
"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
{ maxZoom: 19 }
)
this.hillshadeLayer = L.tileLayer(
"https://services.arcgisonline.com/ArcGIS/rest/services/Elevation/World_Hillshade/MapServer/tile/{z}/{y}/{x}",
{ maxZoom: 16, opacity: 0.45 }
@ -125,7 +130,7 @@ export const RoverMap: Partial<RoverMapHook> = {
this.hillshadeLayer.addTo(map)
this.layersControl = L.control.layers(
{ "OSM": this.osmLayer, "Topo": this.topoLayer },
{ "OSM": this.osmLayer, "Topo": this.topoLayer, "Satellite": this.satelliteLayer },
{ "Hillshade": this.hillshadeLayer, "Grid squares": this.gridLayer },
{ position: "topright" }
).addTo(map)