Changing a few style thresholds

This commit is contained in:
Eric van der Vlist 2023-01-31 11:56:06 +01:00
parent 046c4e47d5
commit 92c2d37e3b
3 changed files with 88 additions and 10 deletions

View File

@ -369,14 +369,14 @@ const styles = {
new Point(getCenter(feature.getGeometry().getExtent())) new Point(getCenter(feature.getGeometry().getExtent()))
); );
} }
if (getZoomInteger() < 14) { if (getZoomInteger() < 16) {
return null; return null;
} }
const highlightedTagValue = getHighlightedTagValue(feature); const highlightedTagValue = getHighlightedTagValue(feature);
const isHighlightedFeature = !!highlightedTagValue; const isHighlightedFeature = !!highlightedTagValue;
if ( if (
(isHighlightedFeature && getZoomInteger() < 14) || (isHighlightedFeature && getZoomInteger() < 16) ||
(!isHighlightedFeature && getZoomInteger() < 16) (!isHighlightedFeature && getZoomInteger() < 18)
) { ) {
return null; return null;
} }

View File

@ -112,12 +112,12 @@ export const Overlays: Component<Props> = ({ map }) => {
// const vectorTileSource = constructSource(); // const vectorTileSource = constructSource();
const vectorTileSource = new VectorTileSource({ 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/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/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: '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', // url: 'https://geo.dyomedea.com/services/spain/tiles/{z}/{x}/{y}.pbf',
// format: new GeoJSON({ dataProjection: 'EPSG:900913' }), format: new GeoJSON({ dataProjection: 'EPSG:900913' }),
format: new MVT({ featureClass: Feature }), // format: new MVT({ featureClass: Feature }),
maxZoom: 15, maxZoom: 15,
tileSize: 256, tileSize: 256,
}); });
@ -142,7 +142,7 @@ export const Overlays: Component<Props> = ({ map }) => {
// feature, // feature,
// }); // });
if ( if (
getZoomInteger() < 14 && getZoomInteger() < 16 &&
getVectorTileFeatureType(feature) === 'poi' && getVectorTileFeatureType(feature) === 'poi' &&
isHighlighted(feature) isHighlighted(feature)
) { ) {

View File

@ -42,10 +42,88 @@
"type": "circle", "type": "circle",
"source": "dyomedea", "source": "dyomedea",
"source-layer": "planet_osm_point", "source-layer": "planet_osm_point",
"minzoom": 10, "minzoom": 11,
"filter": [ "filter": [
"any", "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" }, "layout": { "visibility": "visible" },
"paint": { "paint": {