diff --git a/src/components/gpx/styles.ts b/src/components/gpx/styles.ts index b2ef8fb..1b564fe 100644 --- a/src/components/gpx/styles.ts +++ b/src/components/gpx/styles.ts @@ -320,7 +320,7 @@ const styles = { }), }, getParameters: (feature: Feature) => { - let tags = feature.get('tags'); + // let tags = feature.get('tags'); // try { // tags = JSON.parse(feature.get('tags')); // } catch (error) { @@ -332,19 +332,17 @@ const styles = { // feature, // }); // } - if (getZoomInteger() < 12 && !['iwn', 'nwn'].includes(tags.network)) { + const network = feature.get('network'); + if (getZoomInteger() < 12 && !['iwn', 'nwn'].includes(network)) { return null; } - if ( - getZoomInteger() < 14 && - !['iwn', 'nwn', 'lwn'].includes(tags.network) - ) { + if (getZoomInteger() < 14 && !['iwn', 'nwn', 'lwn'].includes(network)) { return null; } return { - isSelected: feature.get('isSelected') ?? false, + // isSelected: feature.get('isSelected') ?? false, name: feature.get('name'), - network: tags.network, + network, }; }, getStyle: memoize((params: any) => { @@ -464,7 +462,7 @@ const styles = { }; export const style = (feature: Feature, resolution: number) => { -// console.log({ caller: 'style', feature, values: feature.values_ }); + // console.log({ caller: 'style', feature, values: feature.values_ }); const type = ( feature.get('type') !== undefined ? feature.get('type') diff --git a/src/components/overlays/Overlays.tsx b/src/components/overlays/Overlays.tsx index 60656d1..0920850 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, });