diff --git a/src/components/gpx/styles.ts b/src/components/gpx/styles.ts index 1b564fe..6f67be3 100644 --- a/src/components/gpx/styles.ts +++ b/src/components/gpx/styles.ts @@ -369,14 +369,14 @@ const styles = { new Point(getCenter(feature.getGeometry().getExtent())) ); } - if (getZoomInteger() < 14) { + if (getZoomInteger() < 16) { return null; } const highlightedTagValue = getHighlightedTagValue(feature); const isHighlightedFeature = !!highlightedTagValue; if ( - (isHighlightedFeature && getZoomInteger() < 14) || - (!isHighlightedFeature && getZoomInteger() < 16) + (isHighlightedFeature && getZoomInteger() < 16) || + (!isHighlightedFeature && getZoomInteger() < 18) ) { return null; } diff --git a/src/components/overlays/Overlays.tsx b/src/components/overlays/Overlays.tsx index 0920850..1422e0b 100644 --- a/src/components/overlays/Overlays.tsx +++ b/src/components/overlays/Overlays.tsx @@ -112,12 +112,12 @@ export const Overlays: Component = ({ map }) => { // const vectorTileSource = constructSource(); const vectorTileSource = new VectorTileSource({ - // url: 'https://geo.dyomedea.com/geoserver/gwc/service/wmts/rest/hiking/EPSG:900913/EPSG:900913:{z}/{y}/{x}?format=application/json;type=geojson', - url: 'https://geo.dyomedea.com/geoserver/gwc/service/wmts/rest/hiking/EPSG:900913/EPSG:900913:{z}/{y}/{x}?format=application/vnd.mapbox-vector-tile', + url: 'https://geo.dyomedea.com/geoserver/gwc/service/wmts/rest/hiking/EPSG:900913/EPSG:900913:{z}/{y}/{x}?format=application/json;type=geojson', + // url: 'https://geo.dyomedea.com/geoserver/gwc/service/wmts/rest/hiking/EPSG:900913/EPSG:900913:{z}/{y}/{x}?format=application/vnd.mapbox-vector-tile', // url: 'http://localhost:8080/geoserver/gwc/service/tms/1.0.0/test%3Atransportation@EPSG%3A900913@pbf/{z}/{x}/{-y}.pbf', // url: 'https://geo.dyomedea.com/services/spain/tiles/{z}/{x}/{y}.pbf', - // format: new GeoJSON({ dataProjection: 'EPSG:900913' }), - format: new MVT({ featureClass: Feature }), + format: new GeoJSON({ dataProjection: 'EPSG:900913' }), + // format: new MVT({ featureClass: Feature }), maxZoom: 15, tileSize: 256, }); @@ -142,7 +142,7 @@ export const Overlays: Component = ({ map }) => { // feature, // }); if ( - getZoomInteger() < 14 && + getZoomInteger() < 16 && getVectorTileFeatureType(feature) === 'poi' && isHighlighted(feature) ) { diff --git a/src/styles/hiking.json b/src/styles/hiking.json index d56118e..f117cf6 100644 --- a/src/styles/hiking.json +++ b/src/styles/hiking.json @@ -42,10 +42,88 @@ "type": "circle", "source": "dyomedea", "source-layer": "planet_osm_point", - "minzoom": 10, + "minzoom": 11, "filter": [ "any", - ["in", "amenity", "bar", "fast_food", "food_court", "pub", "restaurant"] + [ + "in", + "amenity", + "bar", + "fast_food", + "food_court", + "pub", + "restaurant", + "cafe", + "atm", + "bank", + "doctors", + "hospital", + "pharmacy", + "police", + "fire_station", + "drinking_water", + "water_point", + "waste_basket", + "waste_disposal", + "vending_machine" + ], + [ + "in", + "shop", + "bakery", + "butcher", + "cheese", + "chocolate", + "convenience", + "dairy", + "farm", + "greengrocer", + "health_food", + "pasta", + "pastry", + "seafood", + "water", + "department_store", + "general", + "mall", + "supermarket", + "wholesale", + "outdoor", + "laundry" + ], + [ + "in", + "tourism", + "hotel", + "alpine_hut", + "apartment", + "camp_site", + "chalet", + "guest_house", + "hostel", + "motel", + "wilderness_hut", + "viewpoint" + ], + ["in", "waterway", "waterfall"], + [ + "in", + "natural", + "peak", + "cave_entrance", + "volcano", + "arch", + "arete", + "fumarole", + "rock", + "saddle", + "sinkhole", + "stone", + "glacier", + "spring", + "hot_spring", + "geyser" + ] ], "layout": { "visibility": "visible" }, "paint": {