aletrn commited on
Commit
fc84cc0
·
1 Parent(s): 2438f17

[feat] (frontend) add nextzen terrain xyz provider as DEM raster source

Browse files
static/src/components/PagePredictionMap.vue CHANGED
@@ -209,10 +209,20 @@ const getCurrentBasemap = (url: string, providersArray: ServiceTiles) => {
209
  onMounted(async () => {
210
  const osmTile = tileLayer.provider(OpenStreetMap)
211
  let localVarSatellite: SourceTileType = import.meta.env.VITE_SATELLITE_NAME ? String(import.meta.env.VITE_SATELLITE_NAME) : Satellite
 
212
  const satelliteTile = tileLayer.provider(localVarSatellite)
 
 
 
 
 
 
 
 
213
 
214
  let baseMaps: ServiceTiles = { OpenStreetMap: osmTile }
215
  baseMaps[localVarSatellite] = satelliteTile
 
216
  currentBaseMapNameRef.value = OpenStreetMap
217
 
218
  map = LeafletMap('map', {
 
209
  onMounted(async () => {
210
  const osmTile = tileLayer.provider(OpenStreetMap)
211
  let localVarSatellite: SourceTileType = import.meta.env.VITE_SATELLITE_NAME ? String(import.meta.env.VITE_SATELLITE_NAME) : Satellite
212
+ let localVarTerrain: SourceTileType = "nextzen.terrarium"
213
  const satelliteTile = tileLayer.provider(localVarSatellite)
214
+ const terrainTile = new LTileLayer(
215
+ "https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png", {
216
+ id: localVarTerrain,
217
+ attribution: "<a href='https://nextzen.org'>nextzen</a>," +
218
+ "<a href='https://registry.opendata.aws/terrain-tiles/'>Mapzen Terrain Tiles - AWS opendata registry</a>," +
219
+ "<a href='https://github.com/tilezen/joerd/blob/master/docs/attribution.md'>Mapzen Source Attributions</a>."
220
+ }
221
+ )
222
 
223
  let baseMaps: ServiceTiles = { OpenStreetMap: osmTile }
224
  baseMaps[localVarSatellite] = satelliteTile
225
+ baseMaps[localVarTerrain] = terrainTile
226
  currentBaseMapNameRef.value = OpenStreetMap
227
 
228
  map = LeafletMap('map', {