feat(rover): add ESRI satellite imagery as base-layer option
This commit is contained in:
parent
5a4129ffca
commit
5e1155f9da
1 changed files with 6 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue