Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions packages/base/layer_gallery.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@
"maxZoom": 9,
"minZoom": 1,
"urlParameters": {
"maxZoom": 9,
"variant": "MODIS_Terra_CorrectedReflectance_TrueColor",
"time": "2026-02-02",
"time": "2026-02-04",
"tilematrixset": "GoogleMapsCompatible_Level",
"format": "jpg",
"tilematrixset": "GoogleMapsCompatible_Level"
"maxZoom": 9
}
},
"layerParameters": { "opacity": 1 },
Expand All @@ -139,11 +139,11 @@
"maxZoom": 9,
"minZoom": 1,
"urlParameters": {
"maxZoom": 9,
"variant": "MODIS_Terra_CorrectedReflectance_Bands367",
"time": "2026-02-02",
"time": "2026-02-04",
"tilematrixset": "GoogleMapsCompatible_Level",
"format": "jpg",
"tilematrixset": "GoogleMapsCompatible_Level"
"maxZoom": 9
}
},
"layerParameters": { "opacity": 1 },
Expand All @@ -160,11 +160,11 @@
"maxZoom": 8,
"minZoom": 1,
"urlParameters": {
"maxZoom": 8,
"variant": "VIIRS_CityLights_2012",
"time": "2026-02-02",
"time": "2026-02-04",
"tilematrixset": "GoogleMapsCompatible_Level",
"format": "jpg",
"tilematrixset": "GoogleMapsCompatible_Level"
"maxZoom": 8
}
},
"layerParameters": { "opacity": 1 },
Expand All @@ -181,11 +181,11 @@
"maxZoom": 7,
"minZoom": 1,
"urlParameters": {
"maxZoom": 7,
"variant": "MODIS_Terra_Land_Surface_Temp_Day",
"time": "2026-02-02",
"time": "2026-02-04",
"tilematrixset": "GoogleMapsCompatible_Level",
"format": "png",
"tilematrixset": "GoogleMapsCompatible_Level"
"maxZoom": 7
}
},
"layerParameters": { "opacity": 1 },
Expand All @@ -202,11 +202,11 @@
"maxZoom": 8,
"minZoom": 1,
"urlParameters": {
"maxZoom": 8,
"variant": "MODIS_Terra_NDSI_Snow_Cover",
"time": "2026-02-02",
"time": "2026-02-04",
"tilematrixset": "GoogleMapsCompatible_Level",
"format": "png",
"tilematrixset": "GoogleMapsCompatible_Level"
"maxZoom": 8
}
},
"layerParameters": { "opacity": 1 },
Expand All @@ -223,11 +223,11 @@
"maxZoom": 6,
"minZoom": 1,
"urlParameters": {
"maxZoom": 6,
"variant": "MODIS_Terra_Aerosol",
"time": "2026-02-02",
"time": "2026-02-04",
"tilematrixset": "GoogleMapsCompatible_Level",
"format": "png",
"tilematrixset": "GoogleMapsCompatible_Level"
"maxZoom": 6
}
},
"layerParameters": { "opacity": 1 },
Expand All @@ -244,11 +244,11 @@
"maxZoom": 7,
"minZoom": 1,
"urlParameters": {
"maxZoom": 7,
"variant": "MODIS_Terra_L2_Chlorophyll_A",
"time": "2026-02-02",
"time": "2026-02-04",
"tilematrixset": "GoogleMapsCompatible_Level",
"format": "png",
"tilematrixset": "GoogleMapsCompatible_Level"
"maxZoom": 7
}
},
"layerParameters": { "opacity": 1 },
Expand All @@ -264,7 +264,7 @@
"attribution": "Imagery provided by services from the Global Imagery Browse Services (GIBS), operated by the NASA/GSFC/Earth Science Data and Information System (ESDIS) with funding provided by NASA/HQ.",
"maxZoom": 9,
"minZoom": 0,
"urlParameters": { "time": "2026-02-02" }
"urlParameters": { "time": "2026-02-04" }
},
"layerParameters": { "opacity": 1 },
"description": "Imagery provided by services from the Global Imagery Browse Services (GIBS), operated by the NASA/GSFC/Earth Science Data and Information System (ESDIS) with funding provided by NASA/HQ."
Expand All @@ -279,7 +279,7 @@
"attribution": "Imagery provided by services from the Global Imagery Browse Services (GIBS), operated by the NASA/GSFC/Earth Science Data and Information System (ESDIS) with funding provided by NASA/HQ.",
"maxZoom": 9,
"minZoom": 0,
"urlParameters": { "time": "2026-02-02" }
"urlParameters": { "time": "2026-02-04" }
},
"layerParameters": { "opacity": 1 },
"description": "Imagery provided by services from the Global Imagery Browse Services (GIBS), operated by the NASA/GSFC/Earth Science Data and Information System (ESDIS) with funding provided by NASA/HQ."
Expand All @@ -294,7 +294,7 @@
"attribution": "Imagery provided by services from the Global Imagery Browse Services (GIBS), operated by the NASA/GSFC/Earth Science Data and Information System (ESDIS) with funding provided by NASA/HQ.",
"maxZoom": 9,
"minZoom": 0,
"urlParameters": { "time": "2026-02-02" }
"urlParameters": { "time": "2026-02-04" }
},
"layerParameters": { "opacity": 1 },
"description": "Imagery provided by services from the Global Imagery Browse Services (GIBS), operated by the NASA/GSFC/Earth Science Data and Information System (ESDIS) with funding provided by NASA/HQ."
Expand All @@ -309,7 +309,7 @@
"attribution": "Imagery provided by services from the Global Imagery Browse Services (GIBS), operated by the NASA/GSFC/Earth Science Data and Information System (ESDIS) with funding provided by NASA/HQ.",
"maxZoom": 9,
"minZoom": 0,
"urlParameters": { "time": "2026-02-02" }
"urlParameters": { "time": "2026-02-04" }
},
"layerParameters": { "opacity": 1 },
"description": "Imagery provided by services from the Global Imagery Browse Services (GIBS), operated by the NASA/GSFC/Earth Science Data and Information System (ESDIS) with funding provided by NASA/HQ."
Expand Down Expand Up @@ -785,7 +785,7 @@
"minZoom": 0,
"urlParameters": {}
},
"layerParameters": { "opacity": 1 },
"layerParameters": { "opacity": 1, "symbologyState": {} },
"description": "\u00a9 Geologic data \u00a9 <a href=https://macrostrat.org>Macrostrat vector layer</a> (CC\u2011BY 4.0)"
}
}
Expand Down
21 changes: 17 additions & 4 deletions packages/base/layer_gallery_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ def download_thumbnail(url_template, name, position, tile_size, **url_parameters
file_path = download_thumbnail(
url_template, provider_key, position, tile_size, **url_parameters
)

if provider_value["layerType"] == "VectorTileLayer":
layerParameters = {"opacity": 1, "symbologyState": {}}
else:
layerParameters = {"opacity": 1}
provider_gallery[provider_key] = {
"thumbnailPath": file_path,
"name": provider_key,
Expand All @@ -232,7 +235,7 @@ def download_thumbnail(url_template, name, position, tile_size, **url_parameters
"minZoom": xyzprovider.get("min_zoom") or 0,
"urlParameters": dict_keys_to_camel(url_template),
},
"layerParameters": {"opacity": 1},
"layerParameters": layerParameters,
}

elif config_is_flat and not xyz_is_flat:
Expand All @@ -254,6 +257,11 @@ def download_thumbnail(url_template, name, position, tile_size, **url_parameters
url_template, name, position, tile_size, **url_parameters
)

if provider_value["layerType"] == "VectorTileLayer":
layerParameters = {"opacity": 1, "symbologyState": {}}
else:
layerParameters = {"opacity": 1}

providers_maps[map_name] = {
"thumbnailPath": file_path,
"name": provider_key + "." + map_name,
Expand All @@ -266,7 +274,7 @@ def download_thumbnail(url_template, name, position, tile_size, **url_parameters
"minZoom": tile_provider.get("min_zoom") or 0,
"urlParameters": dict_keys_to_camel(url_parameters),
},
"layerParameters": {"opacity": 1},
"layerParameters": layerParameters,
"description": tile_provider.get("attribution"),
}

Expand All @@ -291,6 +299,11 @@ def download_thumbnail(url_template, name, position, tile_size, **url_parameters
url_template, name, position, tile_size, **url_parameters
)

if map_config["layerType"] == "VectorTileLayer":
layerParameters = {"opacity": 1, "symbologyState": {}}
else:
layerParameters = {"opacity": 1}

providers_maps[map_name] = {
"thumbnailPath": file_path,
"name": provider_key + "." + map_name,
Expand All @@ -303,7 +316,7 @@ def download_thumbnail(url_template, name, position, tile_size, **url_parameters
"minZoom": tile_provider.get("min_zoom") or 0,
"urlParameters": dict_keys_to_camel(url_parameters),
},
"layerParameters": {"opacity": 1},
"layerParameters": layerParameters,
"description": tile_provider.get("attribution"),
}

Expand Down
38 changes: 38 additions & 0 deletions packages/schema/src/schema/project/layers/vectorTileLayer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,44 @@
"multipleOf": 0.1,
"minimum": 0,
"maximum": 1
},
"symbologyState": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future us, it would be great to not have to maintain those duplications

"type": "object",
"description": "The state of the symbology panel options",
"required": ["renderType"],
"properties": {
"renderType": {
"type": "string",
"enum": ["Single Symbol", "Graduated", "Categorized"]
},
"value": {
"type": "string"
},
"method": {
"type": "string",
"enum": ["color", "radius"]
},
"colorRamp": {
"type": "string",
"default": "viridis"
},
"nClasses": {
"type": "string",
"default": "9"
},
"mode": {
"type": "string",
"default": "equal interval",
"enum": [
"quantile",
"equal interval",
"jenks",
"pretty",
"logarithmic"
]
}
},
"additionalProperties": false
}
}
}
Loading