feat(deckgl): add support for OpenStreetMap as our new default and make "tile-providers" more configurable (#33603)

Co-authored-by: Maxime Beauchemin <maximebeauchemin@gmail.com>
This commit is contained in:
Paul Lavacquery
2025-07-08 23:04:10 +02:00
committed by GitHub
parent 85034b9748
commit d951158ce6
17 changed files with 1644 additions and 107 deletions

View File

@@ -194,7 +194,7 @@ def load_deck_dash() -> None: # pylint: disable=too-many-statements
"datasource": "5__table",
"granularity_sqla": None,
"groupby": [],
"mapbox_style": "mapbox://styles/mapbox/light-v9",
"mapbox_style": "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
"multiplier": 10,
"point_radius_fixed": {"type": "metric", "value": "count"},
"point_unit": "square_m",
@@ -229,7 +229,7 @@ def load_deck_dash() -> None: # pylint: disable=too-many-statements
"point_unit": "square_m",
"row_limit": 5000,
"spatial": {"type": "latlong", "lonCol": "LON", "latCol": "LAT"},
"mapbox_style": "mapbox://styles/mapbox/dark-v9",
"mapbox_style": "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
"granularity_sqla": None,
"size": "count",
"viz_type": "deck_screengrid",
@@ -263,7 +263,7 @@ def load_deck_dash() -> None: # pylint: disable=too-many-statements
slice_data = {
"spatial": {"type": "latlong", "lonCol": "LON", "latCol": "LAT"},
"row_limit": 5000,
"mapbox_style": "mapbox://styles/mapbox/streets-v9",
"mapbox_style": "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
"granularity_sqla": None,
"size": "count",
"viz_type": "deck_hex",
@@ -300,7 +300,7 @@ def load_deck_dash() -> None: # pylint: disable=too-many-statements
"autozoom": False,
"spatial": {"type": "latlong", "lonCol": "LON", "latCol": "LAT"},
"row_limit": 5000,
"mapbox_style": "mapbox://styles/mapbox/satellite-streets-v9",
"mapbox_style": "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
"granularity_sqla": None,
"size": "count",
"viz_type": "deck_grid",
@@ -367,7 +367,7 @@ def load_deck_dash() -> None: # pylint: disable=too-many-statements
},
"line_type": "json",
"linear_color_scheme": "oranges",
"mapbox_style": "mapbox://styles/mapbox/light-v9",
"mapbox_style": "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
"viewport": {
"longitude": -122.43388541747726,
"latitude": 37.752020331384834,
@@ -442,7 +442,7 @@ def load_deck_dash() -> None: # pylint: disable=too-many-statements
"lonCol": "LONGITUDE_DEST",
},
"row_limit": 5000,
"mapbox_style": "mapbox://styles/mapbox/light-v9",
"mapbox_style": "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
"viewport": {
"altitude": 1.5,
"bearing": 8.546256357301871,
@@ -486,7 +486,7 @@ def load_deck_dash() -> None: # pylint: disable=too-many-statements
"line_column": "path_json",
"line_type": "json",
"row_limit": 5000,
"mapbox_style": "mapbox://styles/mapbox/light-v9",
"mapbox_style": "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
"viewport": {
"longitude": -122.18885402582598,
"latitude": 37.73671752604488,

View File

@@ -107,18 +107,18 @@ def load_long_lat_data(only_metadata: bool = False, force: bool = False) -> None
"granularity_sqla": "day",
"since": "2014-01-01",
"until": "now",
"viz_type": "mapbox",
"viz_type": "osm",
"all_columns_x": "LON",
"all_columns_y": "LAT",
"mapbox_style": "mapbox://styles/mapbox/light-v9",
"mapbox_style": "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
"all_columns": ["occupancy"],
"row_limit": 500000,
}
logger.debug("Creating a slice")
slc = Slice(
slice_name="Mapbox Long/Lat",
viz_type="mapbox",
slice_name="OSM Long/Lat",
viz_type="osm",
datasource_type=DatasourceType.TABLE,
datasource_id=tbl.id,
params=get_slice_json(slice_data),

View File

@@ -47,7 +47,7 @@ def load_misc_dashboard() -> None:
"meta": {
"chartId": 3969,
"height": 69,
"sliceName": "Mapbox Long/Lat",
"sliceName": "OSM Long/Lat",
"uuid": "164efe31-295b-4408-aaa6-2f4bfb58a212",
"width": 4
},