diff --git a/app/src/main/assets/map_theme/streetcomplete-night.json b/app/src/main/assets/map_theme/streetcomplete-night.json index 63e8dc90ed..39d7d6144a 100644 --- a/app/src/main/assets/map_theme/streetcomplete-night.json +++ b/app/src/main/assets/map_theme/streetcomplete-night.json @@ -4,15 +4,15 @@ "sources": { "jawg-streets": { "type": "vector", - "tiles": ["https://tile.jawg.io/streets-v2+hillshade-v1/{z}/{x}/{y}.pbf?access-token=mL9X4SwxfsAGfojvGiion9hPKuGLKxPbogLyMbtakA2gJ3X88gcVlTSQ7OD6OfbZ"], + "tiles": ["https://tile.jawg.io/streets-v2+hillshade-v1/{z}/{x}/{y}.pbf?access-token=XQYxWyY9JsVlwq0XYXqB8OO4ttBTNxm46ITHHwPj5F6CX4JaaSMBkvmD8kCqn7z7"], "attribution": "© OSM contributors | © JawgMaps", "maxzoom": 16 } }, "transition": { "duration": 300, "delay": 0 }, "light": { "intensity": 0.2 }, - "glyphs": "asset://map_theme/glyphs/{fontstack}/{range}.pbf", - "sprite": "asset://map_theme/sprites", + "glyphs": "https://api.jawg.io/glyphs/{fontstack}/{range}.pbf", + "sprite": "https://streetcomplete.app/map-jawg/sprites", "layers": [ { "id": "background", "type": "background", "paint": {"background-color": "#2e2e48"}}, { "id": "landuse-town", "source": "jawg-streets", "source-layer": "landuse", "minzoom": 11.0, "filter": ["!", ["in", ["get", "class"], ["literal", ["pitch", "park", "grass", "cemetery", "wood", "scrub", "national_park"]]]], "type": "fill", "paint": { "fill-color": "#3d364e", "fill-opacity": ["interpolate", ["exponential", 2], ["zoom"], 11.0, 0.0, 12.0, 1.0]} }, @@ -32,6 +32,8 @@ { "id": "aeroways", "source": "jawg-streets", "source-layer": "aeroway", "filter": ["==", ["geometry-type"], "LineString"], "type": "line","paint": {"line-color": "#559", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 10.0, 1.0, 24.0, 8192.0]},"layout": {"line-join": "round"} }, { "id": "buildings", "source": "jawg-streets", "source-layer": "building", "minzoom": 15.0, "type": "fill", "paint": { "fill-color": "rgba(41,92,92,0.8)", "fill-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]} }, { "id": "buildings-outline", "source": "jawg-streets", "source-layer": "building", "minzoom": 15.5, "type": "line","paint": {"line-color": "rgba(31,82,82,0.8)", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.5, 0.0, 16.0, 1.0]} }, + { "id": "pedestrian-areas-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 16.0, "filter": ["all", ["in", ["get", "class"], ["literal", ["path", "street_limited"]]], ["==", ["geometry-type"], "Polygon"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "line","paint": {"line-color": "#547", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-offset": ["interpolate", ["exponential", 2], ["zoom"], 16.0, -0.5, 24.0, -64.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 0.0, 17.0, 1.0]} }, + { "id": "pedestrian-areas", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.0, "filter": ["all", ["in", ["get", "class"], ["literal", ["path", "street_limited"]]], ["==", ["geometry-type"], "Polygon"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "fill", "paint": { "fill-color": "#554e7e", "fill-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]} }, { "id": "pedestrian-tunnel-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["==", ["get", "class"], "street_limited"], ["==", ["get", "type"], "pedestrian"], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "tunnel"]], "type": "line","paint": {"line-color": "#547", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 13.0, 1.5, 16.0, 4.0, 24.0, 1024.0], "line-dasharray": [4, 4], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "butt", "line-join": "round"} }, { "id": "roads-service-tunnel-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["in", ["get", "class"], ["literal", ["service", "driveway"]]], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "tunnel"]], "type": "line","paint": {"line-color": "#547", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 13.0, 0.5, 16.0, 3.0, 24.0, 768.0], "line-dasharray": [4, 4], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "butt", "line-join": "round"} }, { "id": "roads-minor-tunnel-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["in", ["get", "class"], ["literal", ["street", "street_limited"]]], ["!=", ["get", "type"], "pedestrian"], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "tunnel"]], "type": "line","paint": {"line-color": "#547", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 11.0, 0.5, 16.0, 4.0, 24.0, 1024.0], "line-dasharray": [4, 4], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "butt", "line-join": "round"} }, @@ -54,10 +56,8 @@ { "id": "roads-major-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["==", ["get", "class"], "main"], ["==", ["geometry-type"], "LineString"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "line","paint": {"line-color": "#547", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 9.0, 1.0, 16.0, 6.0, 24.0, 1536.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, { "id": "motorways-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["==", ["get", "class"], "motorway"], ["==", ["geometry-type"], "LineString"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "line","paint": {"line-color": "#99f", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 8.0, 1.0, 16.0, 8.0, 24.0, 2048.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, { "id": "motorway-links-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["==", ["get", "class"], "motorway_link"], ["==", ["geometry-type"], "LineString"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "line","paint": {"line-color": "#99f", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 11.0, 1.0, 16.0, 4.0, 24.0, 1024.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, - { "id": "pedestrian-areas-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 16.0, "filter": ["all", ["in", ["get", "class"], ["literal", ["path", "street_limited"]]], ["==", ["geometry-type"], "Polygon"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "line","paint": {"line-color": "#547", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-offset": ["interpolate", ["exponential", 2], ["zoom"], 16.0, -0.5, 24.0, -64.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 0.0, 17.0, 1.0]} }, { "id": "paths", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["==", ["get", "class"], "path"], ["==", ["geometry-type"], "LineString"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "line","paint": {"line-color": "#547", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 14.0, 0.5, 16.0, 1.0, 24.0, 256.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, { "id": "steps", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["in", ["get", "class"], ["literal", ["path"]]], ["in", ["get", "type"], ["literal", ["steps"]]], ["==", ["geometry-type"], "LineString"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "line","paint": {"line-color": "#554e7e", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 14.0, 0.35, 16.0, 0.7, 24.0, 179.2], "line-dasharray": [0.6, 0.4]} }, - { "id": "pedestrian-areas", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.0, "filter": ["all", ["in", ["get", "class"], ["literal", ["path", "street_limited"]]], ["==", ["geometry-type"], "Polygon"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "fill", "paint": { "fill-color": "#554e7e", "fill-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]} }, { "id": "pedestrian", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["==", ["get", "class"], "street_limited"], ["==", ["get", "type"], "pedestrian"], ["==", ["geometry-type"], "LineString"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "line","paint": {"line-color": "#554e7e", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 13.0, 1.5, 16.0, 4.0, 24.0, 1024.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 14.0, 0.0, 15.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, { "id": "roads-service", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["in", ["get", "class"], ["literal", ["service", "driveway"]]], ["==", ["geometry-type"], "LineString"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "line","paint": {"line-color": "#559", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 13.0, 0.5, 16.0, 3.0, 24.0, 768.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 14.0, 0.0, 15.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, { "id": "roads-minor", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["in", ["get", "class"], ["literal", ["street", "street_limited"]]], ["!=", ["get", "type"], "pedestrian"], ["==", ["geometry-type"], "LineString"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "line","paint": {"line-color": "#559", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 11.0, 0.5, 16.0, 4.0, 24.0, 1024.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 12.0, 0.0, 13.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, @@ -76,16 +76,16 @@ { "id": "water-areas-bridge", "source": "jawg-streets", "source-layer": "water", "filter": ["==", ["get", "structure"], "bridge"], "type": "fill", "paint": { "fill-color": "#002"} }, { "id": "rivers-bridge", "source": "jawg-streets", "source-layer": "waterway", "minzoom": 10.0, "filter": ["all", ["in", ["get", "class"], ["literal", ["river", "canal"]]], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#002", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 10.0, 1.0, 16.0, 3.0, 24.0, 768.0]},"layout": {"line-cap": "round", "line-join": "round"} }, { "id": "streams-bridge", "source": "jawg-streets", "source-layer": "waterway", "minzoom": 10.0, "filter": ["all", ["in", ["get", "class"], ["literal", ["stream", "ditch", "drain"]]], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#002", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 256.0]},"layout": {"line-cap": "round", "line-join": "round"} }, + { "id": "pedestrian-areas-casing-bridge", "source": "jawg-streets", "source-layer": "road", "minzoom": 16.0, "filter": ["all", ["in", ["get", "class"], ["literal", ["path", "street_limited"]]], ["==", ["geometry-type"], "Polygon"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#547", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-offset": ["interpolate", ["exponential", 2], ["zoom"], 16.0, -0.5, 24.0, -64.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 0.0, 17.0, 1.0]} }, + { "id": "pedestrian-areas-bridge", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.0, "filter": ["all", ["in", ["get", "class"], ["literal", ["path", "street_limited"]]], ["==", ["geometry-type"], "Polygon"], ["==", ["get", "structure"], "bridge"]], "type": "fill", "paint": { "fill-color": "#554e7e", "fill-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]} }, { "id": "pedestrian-bridge-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["==", ["get", "class"], "street_limited"], ["==", ["get", "type"], "pedestrian"], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#547", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 13.0, 1.5, 16.0, 4.0, 24.0, 1024.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "butt", "line-join": "round"} }, { "id": "roads-service-bridge-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["in", ["get", "class"], ["literal", ["service", "driveway"]]], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#547", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 13.0, 0.5, 16.0, 3.0, 24.0, 768.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "butt", "line-join": "round"} }, { "id": "roads-minor-bridge-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["in", ["get", "class"], ["literal", ["street", "street_limited"]]], ["!=", ["get", "type"], "pedestrian"], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#547", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 11.0, 0.5, 16.0, 4.0, 24.0, 1024.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "butt", "line-join": "round"} }, { "id": "roads-major-bridge-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["==", ["get", "class"], "main"], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#547", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 9.0, 1.0, 16.0, 6.0, 24.0, 1536.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "butt", "line-join": "round"} }, { "id": "motorways-bridge-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["==", ["get", "class"], "motorway"], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#99f", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 8.0, 1.0, 16.0, 8.0, 24.0, 2048.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "butt", "line-join": "round"} }, { "id": "motorway-links-bridge-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["==", ["get", "class"], "motorway_link"], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#99f", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 11.0, 1.0, 16.0, 4.0, 24.0, 1024.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "butt", "line-join": "round"} }, - { "id": "pedestrian-areas-casing-bridge", "source": "jawg-streets", "source-layer": "road", "minzoom": 16.0, "filter": ["all", ["in", ["get", "class"], ["literal", ["path", "street_limited"]]], ["==", ["geometry-type"], "Polygon"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#547", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-offset": ["interpolate", ["exponential", 2], ["zoom"], 16.0, -0.5, 24.0, -64.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 0.0, 17.0, 1.0]} }, { "id": "paths-bridge", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["==", ["get", "class"], "path"], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#547", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 14.0, 0.5, 16.0, 1.0, 24.0, 256.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, { "id": "steps-bridge", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["in", ["get", "class"], ["literal", ["path"]]], ["in", ["get", "type"], ["literal", ["steps"]]], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#554e7e", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 14.0, 0.35, 16.0, 0.7, 24.0, 179.2], "line-dasharray": [0.6, 0.4]} }, - { "id": "pedestrian-areas-bridge", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.0, "filter": ["all", ["in", ["get", "class"], ["literal", ["path", "street_limited"]]], ["==", ["geometry-type"], "Polygon"], ["==", ["get", "structure"], "bridge"]], "type": "fill", "paint": { "fill-color": "#554e7e", "fill-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]} }, { "id": "pedestrian-bridge", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["==", ["get", "class"], "street_limited"], ["==", ["get", "type"], "pedestrian"], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#554e7e", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 13.0, 1.5, 16.0, 4.0, 24.0, 1024.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 14.0, 0.0, 15.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, { "id": "roads-service-bridge", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["in", ["get", "class"], ["literal", ["service", "driveway"]]], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#559", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 13.0, 0.5, 16.0, 3.0, 24.0, 768.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 14.0, 0.0, 15.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, { "id": "roads-minor-bridge", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["in", ["get", "class"], ["literal", ["street", "street_limited"]]], ["!=", ["get", "type"], "pedestrian"], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#559", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 11.0, 0.5, 16.0, 4.0, 24.0, 1024.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 12.0, 0.0, 13.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, diff --git a/app/src/main/assets/map_theme/streetcomplete.json b/app/src/main/assets/map_theme/streetcomplete.json index ea395b7e78..2c3221491c 100644 --- a/app/src/main/assets/map_theme/streetcomplete.json +++ b/app/src/main/assets/map_theme/streetcomplete.json @@ -4,15 +4,15 @@ "sources": { "jawg-streets": { "type": "vector", - "tiles": ["https://tile.jawg.io/streets-v2+hillshade-v1/{z}/{x}/{y}.pbf?access-token=mL9X4SwxfsAGfojvGiion9hPKuGLKxPbogLyMbtakA2gJ3X88gcVlTSQ7OD6OfbZ"], + "tiles": ["https://tile.jawg.io/streets-v2+hillshade-v1/{z}/{x}/{y}.pbf?access-token=XQYxWyY9JsVlwq0XYXqB8OO4ttBTNxm46ITHHwPj5F6CX4JaaSMBkvmD8kCqn7z7"], "attribution": "© OSM contributors | © JawgMaps", "maxzoom": 16 } }, "transition": { "duration": 300, "delay": 0 }, "light": { "intensity": 0.2 }, - "glyphs": "asset://map_theme/glyphs/{fontstack}/{range}.pbf", - "sprite": "asset://map_theme/sprites", + "glyphs": "https://api.jawg.io/glyphs/{fontstack}/{range}.pbf", + "sprite": "https://streetcomplete.app/map-jawg/sprites", "layers": [ { "id": "background", "type": "background", "paint": {"background-color": "#f3eacc"}}, { "id": "landuse-town", "source": "jawg-streets", "source-layer": "landuse", "minzoom": 11.0, "filter": ["!", ["in", ["get", "class"], ["literal", ["pitch", "park", "grass", "cemetery", "wood", "scrub", "national_park"]]]], "type": "fill", "paint": { "fill-color": "#f3dacd", "fill-opacity": ["interpolate", ["exponential", 2], ["zoom"], 11.0, 0.0, 12.0, 1.0]} }, @@ -32,6 +32,8 @@ { "id": "aeroways", "source": "jawg-streets", "source-layer": "aeroway", "filter": ["==", ["geometry-type"], "LineString"], "type": "line","paint": {"line-color": "#fff", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 10.0, 1.0, 24.0, 8192.0]},"layout": {"line-join": "round"} }, { "id": "buildings", "source": "jawg-streets", "source-layer": "building", "minzoom": 15.0, "type": "fill", "paint": { "fill-color": "rgb(204,214,238)", "fill-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]} }, { "id": "buildings-outline", "source": "jawg-streets", "source-layer": "building", "minzoom": 15.5, "type": "line","paint": {"line-color": "rgb(185,195,217)", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.5, 0.0, 16.0, 1.0]} }, + { "id": "pedestrian-areas-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 16.0, "filter": ["all", ["in", ["get", "class"], ["literal", ["path", "street_limited"]]], ["==", ["geometry-type"], "Polygon"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "line","paint": {"line-color": "#ca9", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-offset": ["interpolate", ["exponential", 2], ["zoom"], 16.0, -0.5, 24.0, -64.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 0.0, 17.0, 1.0]} }, + { "id": "pedestrian-areas", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.0, "filter": ["all", ["in", ["get", "class"], ["literal", ["path", "street_limited"]]], ["==", ["geometry-type"], "Polygon"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "fill", "paint": { "fill-color": "#f6eee6", "fill-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]} }, { "id": "pedestrian-tunnel-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["==", ["get", "class"], "street_limited"], ["==", ["get", "type"], "pedestrian"], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "tunnel"]], "type": "line","paint": {"line-color": "#ca9", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 13.0, 1.5, 16.0, 4.0, 24.0, 1024.0], "line-dasharray": [4, 4], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "butt", "line-join": "round"} }, { "id": "roads-service-tunnel-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["in", ["get", "class"], ["literal", ["service", "driveway"]]], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "tunnel"]], "type": "line","paint": {"line-color": "#ca9", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 13.0, 0.5, 16.0, 3.0, 24.0, 768.0], "line-dasharray": [4, 4], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "butt", "line-join": "round"} }, { "id": "roads-minor-tunnel-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["in", ["get", "class"], ["literal", ["street", "street_limited"]]], ["!=", ["get", "type"], "pedestrian"], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "tunnel"]], "type": "line","paint": {"line-color": "#ca9", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 11.0, 0.5, 16.0, 4.0, 24.0, 1024.0], "line-dasharray": [4, 4], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "butt", "line-join": "round"} }, @@ -54,10 +56,8 @@ { "id": "roads-major-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["==", ["get", "class"], "main"], ["==", ["geometry-type"], "LineString"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "line","paint": {"line-color": "#ca9", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 9.0, 1.0, 16.0, 6.0, 24.0, 1536.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, { "id": "motorways-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["==", ["get", "class"], "motorway"], ["==", ["geometry-type"], "LineString"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "line","paint": {"line-color": "#a88", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 8.0, 1.0, 16.0, 8.0, 24.0, 2048.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, { "id": "motorway-links-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["==", ["get", "class"], "motorway_link"], ["==", ["geometry-type"], "LineString"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "line","paint": {"line-color": "#a88", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 11.0, 1.0, 16.0, 4.0, 24.0, 1024.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, - { "id": "pedestrian-areas-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 16.0, "filter": ["all", ["in", ["get", "class"], ["literal", ["path", "street_limited"]]], ["==", ["geometry-type"], "Polygon"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "line","paint": {"line-color": "#ca9", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-offset": ["interpolate", ["exponential", 2], ["zoom"], 16.0, -0.5, 24.0, -64.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 0.0, 17.0, 1.0]} }, { "id": "paths", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["==", ["get", "class"], "path"], ["==", ["geometry-type"], "LineString"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "line","paint": {"line-color": "#ca9", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 14.0, 0.5, 16.0, 1.0, 24.0, 256.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, { "id": "steps", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["in", ["get", "class"], ["literal", ["path"]]], ["in", ["get", "type"], ["literal", ["steps"]]], ["==", ["geometry-type"], "LineString"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "line","paint": {"line-color": "#f6eee6", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 14.0, 0.35, 16.0, 0.7, 24.0, 179.2], "line-dasharray": [0.6, 0.4]} }, - { "id": "pedestrian-areas", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.0, "filter": ["all", ["in", ["get", "class"], ["literal", ["path", "street_limited"]]], ["==", ["geometry-type"], "Polygon"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "fill", "paint": { "fill-color": "#f6eee6", "fill-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]} }, { "id": "pedestrian", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["==", ["get", "class"], "street_limited"], ["==", ["get", "type"], "pedestrian"], ["==", ["geometry-type"], "LineString"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "line","paint": {"line-color": "#f6eee6", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 13.0, 1.5, 16.0, 4.0, 24.0, 1024.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 14.0, 0.0, 15.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, { "id": "roads-service", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["in", ["get", "class"], ["literal", ["service", "driveway"]]], ["==", ["geometry-type"], "LineString"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "line","paint": {"line-color": "#fff", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 13.0, 0.5, 16.0, 3.0, 24.0, 768.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 14.0, 0.0, 15.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, { "id": "roads-minor", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["in", ["get", "class"], ["literal", ["street", "street_limited"]]], ["!=", ["get", "type"], "pedestrian"], ["==", ["geometry-type"], "LineString"], ["!", ["in", ["get", "structure"], ["literal", ["bridge", "tunnel"]]]]], "type": "line","paint": {"line-color": "#fff", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 11.0, 0.5, 16.0, 4.0, 24.0, 1024.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 12.0, 0.0, 13.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, @@ -76,16 +76,16 @@ { "id": "water-areas-bridge", "source": "jawg-streets", "source-layer": "water", "filter": ["==", ["get", "structure"], "bridge"], "type": "fill", "paint": { "fill-color": "#68d"} }, { "id": "rivers-bridge", "source": "jawg-streets", "source-layer": "waterway", "minzoom": 10.0, "filter": ["all", ["in", ["get", "class"], ["literal", ["river", "canal"]]], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#68d", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 10.0, 1.0, 16.0, 3.0, 24.0, 768.0]},"layout": {"line-cap": "round", "line-join": "round"} }, { "id": "streams-bridge", "source": "jawg-streets", "source-layer": "waterway", "minzoom": 10.0, "filter": ["all", ["in", ["get", "class"], ["literal", ["stream", "ditch", "drain"]]], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#68d", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 256.0]},"layout": {"line-cap": "round", "line-join": "round"} }, + { "id": "pedestrian-areas-casing-bridge", "source": "jawg-streets", "source-layer": "road", "minzoom": 16.0, "filter": ["all", ["in", ["get", "class"], ["literal", ["path", "street_limited"]]], ["==", ["geometry-type"], "Polygon"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#ca9", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-offset": ["interpolate", ["exponential", 2], ["zoom"], 16.0, -0.5, 24.0, -64.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 0.0, 17.0, 1.0]} }, + { "id": "pedestrian-areas-bridge", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.0, "filter": ["all", ["in", ["get", "class"], ["literal", ["path", "street_limited"]]], ["==", ["geometry-type"], "Polygon"], ["==", ["get", "structure"], "bridge"]], "type": "fill", "paint": { "fill-color": "#f6eee6", "fill-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]} }, { "id": "pedestrian-bridge-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["==", ["get", "class"], "street_limited"], ["==", ["get", "type"], "pedestrian"], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#ca9", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 13.0, 1.5, 16.0, 4.0, 24.0, 1024.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "butt", "line-join": "round"} }, { "id": "roads-service-bridge-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["in", ["get", "class"], ["literal", ["service", "driveway"]]], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#ca9", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 13.0, 0.5, 16.0, 3.0, 24.0, 768.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "butt", "line-join": "round"} }, { "id": "roads-minor-bridge-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["in", ["get", "class"], ["literal", ["street", "street_limited"]]], ["!=", ["get", "type"], "pedestrian"], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#ca9", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 11.0, 0.5, 16.0, 4.0, 24.0, 1024.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "butt", "line-join": "round"} }, { "id": "roads-major-bridge-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["==", ["get", "class"], "main"], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#ca9", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 9.0, 1.0, 16.0, 6.0, 24.0, 1536.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "butt", "line-join": "round"} }, { "id": "motorways-bridge-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["==", ["get", "class"], "motorway"], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#a88", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 8.0, 1.0, 16.0, 8.0, 24.0, 2048.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "butt", "line-join": "round"} }, { "id": "motorway-links-bridge-casing", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.5, "filter": ["all", ["==", ["get", "class"], "motorway_link"], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#a88", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 11.0, 1.0, 16.0, 4.0, 24.0, 1024.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "butt", "line-join": "round"} }, - { "id": "pedestrian-areas-casing-bridge", "source": "jawg-streets", "source-layer": "road", "minzoom": 16.0, "filter": ["all", ["in", ["get", "class"], ["literal", ["path", "street_limited"]]], ["==", ["geometry-type"], "Polygon"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#ca9", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 1.0, 24.0, 128.0], "line-offset": ["interpolate", ["exponential", 2], ["zoom"], 16.0, -0.5, 24.0, -64.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 16.0, 0.0, 17.0, 1.0]} }, { "id": "paths-bridge", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["==", ["get", "class"], "path"], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#ca9", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 14.0, 0.5, 16.0, 1.0, 24.0, 256.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, { "id": "steps-bridge", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["in", ["get", "class"], ["literal", ["path"]]], ["in", ["get", "type"], ["literal", ["steps"]]], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#f6eee6", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 14.0, 0.35, 16.0, 0.7, 24.0, 179.2], "line-dasharray": [0.6, 0.4]} }, - { "id": "pedestrian-areas-bridge", "source": "jawg-streets", "source-layer": "road", "minzoom": 15.0, "filter": ["all", ["in", ["get", "class"], ["literal", ["path", "street_limited"]]], ["==", ["geometry-type"], "Polygon"], ["==", ["get", "structure"], "bridge"]], "type": "fill", "paint": { "fill-color": "#f6eee6", "fill-opacity": ["interpolate", ["exponential", 2], ["zoom"], 15.0, 0.0, 16.0, 1.0]} }, { "id": "pedestrian-bridge", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["==", ["get", "class"], "street_limited"], ["==", ["get", "type"], "pedestrian"], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#f6eee6", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 13.0, 1.5, 16.0, 4.0, 24.0, 1024.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 14.0, 0.0, 15.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, { "id": "roads-service-bridge", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["in", ["get", "class"], ["literal", ["service", "driveway"]]], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#fff", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 13.0, 0.5, 16.0, 3.0, 24.0, 768.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 14.0, 0.0, 15.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, { "id": "roads-minor-bridge", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["in", ["get", "class"], ["literal", ["street", "street_limited"]]], ["!=", ["get", "type"], "pedestrian"], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#fff", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 11.0, 0.5, 16.0, 4.0, 24.0, 1024.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 12.0, 0.0, 13.0, 1.0]},"layout": {"line-cap": "round", "line-join": "round"} }, diff --git a/app/src/main/java/de/westnordost/streetcomplete/osm/bicycle_in_pedestrian_street/BicycleInPedestrianStreet.kt b/app/src/main/java/de/westnordost/streetcomplete/osm/bicycle_in_pedestrian_street/BicycleInPedestrianStreet.kt new file mode 100644 index 0000000000..f01330ebb1 --- /dev/null +++ b/app/src/main/java/de/westnordost/streetcomplete/osm/bicycle_in_pedestrian_street/BicycleInPedestrianStreet.kt @@ -0,0 +1,59 @@ +package de.westnordost.streetcomplete.osm.bicycle_in_pedestrian_street + +import de.westnordost.streetcomplete.osm.Tags +import de.westnordost.streetcomplete.osm.bicycle_in_pedestrian_street.BicycleInPedestrianStreet.* + +enum class BicycleInPedestrianStreet { + /** Pedestrian area also designated for pedestrians (like shared-use path) */ + DESIGNATED, + /** Bicycles explicitly allowed in pedestrian area */ + ALLOWED, + /** Bicycles explicitly not allowed in pedestrian area */ + NOT_ALLOWED, + /** Nothing is signed about bicycles in pedestrian area (probably disallowed, but depends on + * legislation */ + NOT_SIGNED +} + +fun parseBicycleInPedestrianStreet(tags: Map): BicycleInPedestrianStreet? { + val bicycleSigned = tags["bicycle:signed"] == "yes" + return when { + tags["highway"] != "pedestrian" -> null + tags["bicycle"] == "designated" -> DESIGNATED + tags["bicycle"] in yesButNotDesignated && bicycleSigned -> ALLOWED + tags["bicycle"] in noCycling && bicycleSigned -> NOT_ALLOWED + else -> NOT_SIGNED + } +} + +private val yesButNotDesignated = setOf( + "yes", "permissive", "private", "destination", "customers", "permit" +) + +private val noCycling = setOf( + "no", "dismount" +) + +fun BicycleInPedestrianStreet.applyTo(tags: Tags) { + // note the implementation is quite similar to that in SeparateCyclewayCreator + when (this) { + DESIGNATED -> { + tags["bicycle"] = "designated" + // if bicycle:signed is explicitly no, set it to yes + if (tags["bicycle:signed"] == "no") tags["bicycle:signed"] = "yes" + } + ALLOWED -> { + tags["bicycle"] = "yes" + tags["bicycle:signed"] = "yes" + } + NOT_ALLOWED -> { + if (tags["bicycle"] !in noCycling) tags["bicycle"] = "no" + tags["bicycle:signed"] = "yes" + } + NOT_SIGNED -> { + // only remove if designated before, it might still be allowed by legislation! + if (tags["bicycle"] == "designated") tags.remove("bicycle") + tags.remove("bicycle:signed") + } + } +} diff --git a/app/src/main/java/de/westnordost/streetcomplete/overlays/cycleway/CyclewayOverlay.kt b/app/src/main/java/de/westnordost/streetcomplete/overlays/cycleway/CyclewayOverlay.kt index ff3d426937..e885320d3a 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/overlays/cycleway/CyclewayOverlay.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/overlays/cycleway/CyclewayOverlay.kt @@ -94,17 +94,36 @@ private fun SeparateCycleway?.getColor() = when (this) { private fun getStreetCyclewayStyle(element: Element, countryInfo: CountryInfo): PolylineStyle { val isLeftHandTraffic = countryInfo.isLeftHandTraffic val cycleways = parseCyclewaySides(element.tags, isLeftHandTraffic) - val isBicycleBoulevard = parseBicycleBoulevard(element.tags) == BicycleBoulevard.YES val isNoCyclewayExpectedLeft = { cyclewayTaggingNotExpected(element, false, isLeftHandTraffic) } val isNoCyclewayExpectedRight = { cyclewayTaggingNotExpected(element, true, isLeftHandTraffic) } return PolylineStyle( - stroke = if (isBicycleBoulevard) StrokeStyle(Color.GOLD, dashed = true) else null, + stroke = getStreetStrokeStyle(element.tags), strokeLeft = cycleways?.left?.cycleway.getStyle(countryInfo, isNoCyclewayExpectedLeft), strokeRight = cycleways?.right?.cycleway.getStyle(countryInfo, isNoCyclewayExpectedRight) ) } +private fun getStreetStrokeStyle(tags: Map): StrokeStyle? { + val isBicycleBoulevard = parseBicycleBoulevard(tags) == BicycleBoulevard.YES + val isPedestrian = tags["highway"] == "pedestrian" + val isBicycleDesignated = tags["bicycle"] == "designated" + val isBicycleOk = tags["bicycle"] == "yes" && tags["bicycle:signed"] == "yes" + + return when { + isBicycleBoulevard -> + StrokeStyle(Color.GOLD, dashed = true) + isPedestrian && isBicycleDesignated -> + StrokeStyle(Color.CYAN) + isPedestrian && isBicycleOk -> + StrokeStyle(Color.AQUAMARINE) + isPedestrian -> + StrokeStyle(Color.BLACK) + else -> + null + } +} + private val cyclewayTaggingNotExpectedFilter by lazy { """ ways with highway ~ track|living_street|pedestrian|service|motorway_link|motorway|busway diff --git a/app/src/main/java/de/westnordost/streetcomplete/overlays/cycleway/StreetCyclewayOverlayForm.kt b/app/src/main/java/de/westnordost/streetcomplete/overlays/cycleway/StreetCyclewayOverlayForm.kt index 865591fdaf..3cefd25da3 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/overlays/cycleway/StreetCyclewayOverlayForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/overlays/cycleway/StreetCyclewayOverlayForm.kt @@ -11,6 +11,9 @@ import de.westnordost.streetcomplete.osm.Direction import de.westnordost.streetcomplete.osm.bicycle_boulevard.BicycleBoulevard import de.westnordost.streetcomplete.osm.bicycle_boulevard.applyTo import de.westnordost.streetcomplete.osm.bicycle_boulevard.parseBicycleBoulevard +import de.westnordost.streetcomplete.osm.bicycle_in_pedestrian_street.BicycleInPedestrianStreet +import de.westnordost.streetcomplete.osm.bicycle_in_pedestrian_street.applyTo +import de.westnordost.streetcomplete.osm.bicycle_in_pedestrian_street.parseBicycleInPedestrianStreet import de.westnordost.streetcomplete.osm.cycleway.Cycleway import de.westnordost.streetcomplete.osm.cycleway.CyclewayAndDirection import de.westnordost.streetcomplete.osm.cycleway.LeftAndRightCycleway @@ -34,7 +37,10 @@ import kotlinx.serialization.json.Json class StreetCyclewayOverlayForm : AStreetSideSelectOverlayForm() { + override val contentLayoutResId = R.layout.fragment_overlay_cycleway + override val otherAnswers: List get() = + createSwitchBicycleInPedestrianZoneAnswers() + listOfNotNull( createSwitchBicycleBoulevardAnswer(), createReverseCyclewayDirectionAnswer() @@ -42,7 +48,9 @@ class StreetCyclewayOverlayForm : AStreetSideSelectOverlayForm if (item.direction == Direction.BOTH) { @@ -80,13 +88,23 @@ class StreetCyclewayOverlayForm : AStreetSideSelectOverlayForm { + if (bicycleInPedestrianStreet == null) return listOf() - private fun removeBicycleBoulevard() { - bicycleBoulevard = BicycleBoulevard.NO - updateBicycleBoulevard() + val result = mutableListOf() + if (bicycleInPedestrianStreet != BicycleInPedestrianStreet.DESIGNATED) { + result.add(AnswerItem(R.string.pedestrian_zone_designated) { + bicycleInPedestrianStreet = BicycleInPedestrianStreet.DESIGNATED + updateStreetSign() + }) + } + if (bicycleInPedestrianStreet != BicycleInPedestrianStreet.ALLOWED) { + result.add(AnswerItem(R.string.pedestrian_zone_allowed_sign) { + bicycleInPedestrianStreet = BicycleInPedestrianStreet.ALLOWED + updateStreetSign() + }) + } + if (bicycleInPedestrianStreet != BicycleInPedestrianStreet.NOT_SIGNED) { + result.add(AnswerItem(R.string.pedestrian_zone_no_sign) { + bicycleInPedestrianStreet = BicycleInPedestrianStreet.NOT_SIGNED + updateStreetSign() + }) + } + return result } - private fun addBicycleBoulevard() { - bicycleBoulevard = BicycleBoulevard.YES - updateBicycleBoulevard() - } + private fun createSwitchBicycleBoulevardAnswer(): IAnswerItem? = + when (bicycleBoulevard) { + BicycleBoulevard.YES -> + AnswerItem2(getString(R.string.bicycle_boulevard_is_not_a, getString(R.string.bicycle_boulevard))) { + bicycleBoulevard = BicycleBoulevard.NO + updateStreetSign() + } + BicycleBoulevard.NO -> + // don't allow pedestrian roads to be tagged as bicycle roads + // (should rather be R.string.pedestrian_zone_designated + if (element!!.tags["highway"] != "pedestrian") { + AnswerItem2(getString(R.string.bicycle_boulevard_is_a, getString(R.string.bicycle_boulevard))) { + bicycleBoulevard = BicycleBoulevard.YES + updateStreetSign() + } + } else { + null + } + } - private fun updateBicycleBoulevard() { - val bicycleBoulevardSignView = requireView().findViewById(R.id.signBicycleBoulevard) - if (bicycleBoulevard == BicycleBoulevard.YES) { - if (bicycleBoulevardSignView == null) { - layoutInflater.inflate( - R.layout.sign_bicycle_boulevard, - requireView().findViewById(R.id.content), true - ) - } - } else { - (bicycleBoulevardSignView?.parent as? ViewGroup)?.removeView(bicycleBoulevardSignView) + private fun updateStreetSign() { + val signContainer = requireView().findViewById(R.id.signContainer) + signContainer.removeAllViews() + + if (bicycleInPedestrianStreet == BicycleInPedestrianStreet.ALLOWED) { + layoutInflater.inflate(R.layout.sign_bicycles_ok, signContainer, true) + } else if (bicycleInPedestrianStreet == BicycleInPedestrianStreet.DESIGNATED) { + layoutInflater.inflate(R.layout.sign_bicycle_and_pedestrians, signContainer, true) + } else if (bicycleBoulevard == BicycleBoulevard.YES) { + layoutInflater.inflate(R.layout.sign_bicycle_boulevard, signContainer, true) } checkIsFormComplete() } /* ------------------------------ reverse cycleway direction -------------------------------- */ - private fun createReverseCyclewayDirectionAnswer(): IAnswerItem? = - if (bicycleBoulevard == BicycleBoulevard.YES) { - null - } else { - AnswerItem(R.string.cycleway_reverse_direction, ::selectReverseCyclewayDirection) - } + private fun createReverseCyclewayDirectionAnswer(): IAnswerItem = + AnswerItem(R.string.cycleway_reverse_direction, ::selectReverseCyclewayDirection) private fun selectReverseCyclewayDirection() { confirmSelectReverseCyclewayDirection { @@ -193,18 +226,12 @@ class StreetCyclewayOverlayForm : AStreetSideSelectOverlayForm(str) @@ -249,5 +279,6 @@ class StreetCyclewayOverlayForm : AStreetSideSelectOverlayForm diff --git a/app/src/main/res/drawable/pedestrian_and_bicycle_white.xml b/app/src/main/res/drawable/pedestrian_and_bicycle_white.xml new file mode 100644 index 0000000000..bcc6bab057 --- /dev/null +++ b/app/src/main/res/drawable/pedestrian_and_bicycle_white.xml @@ -0,0 +1,15 @@ + + + + diff --git a/app/src/main/res/layout/fragment_overlay_cycleway.xml b/app/src/main/res/layout/fragment_overlay_cycleway.xml new file mode 100644 index 0000000000..36b9cab796 --- /dev/null +++ b/app/src/main/res/layout/fragment_overlay_cycleway.xml @@ -0,0 +1,17 @@ + + + + + + + + diff --git a/app/src/main/res/layout/sign_bicycle_and_pedestrians.xml b/app/src/main/res/layout/sign_bicycle_and_pedestrians.xml new file mode 100644 index 0000000000..212bae8f5f --- /dev/null +++ b/app/src/main/res/layout/sign_bicycle_and_pedestrians.xml @@ -0,0 +1,15 @@ + + + + + + diff --git a/app/src/main/res/layout/sign_bicycle_boulevard.xml b/app/src/main/res/layout/sign_bicycle_boulevard.xml index 99fe6f3860..4b910a34f7 100644 --- a/app/src/main/res/layout/sign_bicycle_boulevard.xml +++ b/app/src/main/res/layout/sign_bicycle_boulevard.xml @@ -1,41 +1,26 @@ - + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + android:background="@drawable/background_rectangular_sign_blue" + android:showDividers="middle" + android:divider="@drawable/space_8dp" + android:padding="16dp" + android:gravity="center"> - + app:srcCompat="@drawable/bicycle_white"/> - - - - - + - + diff --git a/app/src/main/res/layout/sign_bicycles_ok.xml b/app/src/main/res/layout/sign_bicycles_ok.xml new file mode 100644 index 0000000000..0f1467ddf0 --- /dev/null +++ b/app/src/main/res/layout/sign_bicycles_ok.xml @@ -0,0 +1,28 @@ + + + + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ceb6737c91..7017fc0258 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1362,7 +1362,7 @@ If there are no signs along the whole street which apply for the highlighted sec What’s the royal cypher on this postbox? No royal cypher is visible The Crown of Scotland - + How is this power line attached? Supported from above Fixed horizontally @@ -1704,6 +1704,9 @@ Partially means that a wheelchair can enter and use the restroom, but no handrai It’s a %1$s It’s not a %1$s Bicycle boulevard + Designated for cycling here + A sign allows cycling here + No explicit sign about cycling here A sign explicitly prohibits cycling Footway, but a sign allows cycling diff --git a/app/src/test/java/de/westnordost/streetcomplete/osm/bicycle_in_pedestrian_street/BicycleInPedestrianStreetKtTest.kt b/app/src/test/java/de/westnordost/streetcomplete/osm/bicycle_in_pedestrian_street/BicycleInPedestrianStreetKtTest.kt new file mode 100644 index 0000000000..bdea5147a5 --- /dev/null +++ b/app/src/test/java/de/westnordost/streetcomplete/osm/bicycle_in_pedestrian_street/BicycleInPedestrianStreetKtTest.kt @@ -0,0 +1,162 @@ +package de.westnordost.streetcomplete.osm.bicycle_in_pedestrian_street + +import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapChangesBuilder +import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd +import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryChange +import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryDelete +import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify +import de.westnordost.streetcomplete.osm.bicycle_in_pedestrian_street.BicycleInPedestrianStreet.* + +import kotlin.test.Test +import kotlin.test.assertEquals + +class BicycleInPedestrianStreetKtTest { + + @Test fun create() { + assertEquals( + null, + parseBicycleInPedestrianStreet(mapOf("highway" to "residential")) + ) + assertEquals( + NOT_SIGNED, + parseBicycleInPedestrianStreet(mapOf("highway" to "pedestrian")) + ) + assertEquals( + NOT_SIGNED, + parseBicycleInPedestrianStreet(mapOf( + "highway" to "pedestrian", + "bicycle" to "yes", + )) + ) + assertEquals( + NOT_SIGNED, + parseBicycleInPedestrianStreet(mapOf( + "highway" to "pedestrian", + "bicycle" to "no", + )) + ) + assertEquals( + ALLOWED, + parseBicycleInPedestrianStreet(mapOf( + "highway" to "pedestrian", + "bicycle:signed" to "yes", + "bicycle" to "yes", + )) + ) + assertEquals( + NOT_ALLOWED, + parseBicycleInPedestrianStreet(mapOf( + "highway" to "pedestrian", + "bicycle:signed" to "yes", + "bicycle" to "no", + )) + ) + assertEquals( + NOT_ALLOWED, + parseBicycleInPedestrianStreet(mapOf( + "highway" to "pedestrian", + "bicycle:signed" to "yes", + "bicycle" to "dismount", + )) + ) + assertEquals( + DESIGNATED, + parseBicycleInPedestrianStreet(mapOf( + "highway" to "pedestrian", + "bicycle" to "designated", + )) + ) + } + + @Test fun `apply designated`() { + assertEquals( + setOf( + StringMapEntryAdd("bicycle", "designated") + ), + DESIGNATED.appliedTo(mapOf()) + ) + assertEquals( + setOf( + StringMapEntryModify("bicycle", "no", "designated") + ), + DESIGNATED.appliedTo(mapOf("bicycle" to "no")) + ) + assertEquals( + setOf( + StringMapEntryAdd("bicycle", "designated"), + StringMapEntryModify("bicycle:signed", "no", "yes") + ), + DESIGNATED.appliedTo(mapOf("bicycle:signed" to "no")) + ) + } + + @Test fun `apply allowed`() { + assertEquals( + setOf( + StringMapEntryAdd("bicycle", "yes"), + StringMapEntryAdd("bicycle:signed", "yes"), + ), + ALLOWED.appliedTo(mapOf()) + ) + assertEquals( + setOf( + StringMapEntryModify("bicycle", "no", "yes"), + StringMapEntryModify("bicycle:signed", "no", "yes"), + ), + ALLOWED.appliedTo(mapOf("bicycle" to "no", "bicycle:signed" to "no")) + ) + } + + @Test fun `apply not allowed`() { + assertEquals( + setOf( + StringMapEntryAdd("bicycle", "no"), + StringMapEntryAdd("bicycle:signed", "yes"), + ), + NOT_ALLOWED.appliedTo(mapOf()) + ) + assertEquals( + setOf( + StringMapEntryModify("bicycle", "yes", "no"), + StringMapEntryModify("bicycle:signed", "no", "yes"), + ), + NOT_ALLOWED.appliedTo(mapOf("bicycle" to "yes", "bicycle:signed" to "no")) + ) + assertEquals( + setOf( + StringMapEntryModify("bicycle:signed", "yes", "yes"), + ), + NOT_ALLOWED.appliedTo(mapOf("bicycle" to "dismount", "bicycle:signed" to "yes")) + ) + } + + @Test fun `apply not signed`() { + assertEquals( + setOf(), + NOT_SIGNED.appliedTo(mapOf()) + ) + assertEquals( + setOf( + StringMapEntryDelete("bicycle:signed", "yes"), + ), + NOT_SIGNED.appliedTo(mapOf("bicycle:signed" to "yes")) + ) + // bicycle=yes is not changed + assertEquals( + setOf(), + NOT_SIGNED.appliedTo(mapOf("bicycle" to "yes")) + ) + assertEquals( + setOf( + StringMapEntryDelete("bicycle", "designated"), + ), + NOT_SIGNED.appliedTo(mapOf("bicycle" to "designated")) + ) + } +} + +private fun BicycleInPedestrianStreet.appliedTo(tags: Map): Set { + val cb = StringMapChangesBuilder(tags) + applyTo(cb) + return cb.create().changes +}