Minor enhancements
This commit is contained in:
parent
3e98f7f745
commit
2d73eb0886
|
@ -320,7 +320,18 @@ const styles = {
|
|||
}),
|
||||
},
|
||||
getParameters: (feature: Feature) => {
|
||||
const tags = JSON.parse(feature.get('tags'));
|
||||
let tags = {};
|
||||
try {
|
||||
tags = JSON.parse(feature.get('tags'));
|
||||
} catch (error) {
|
||||
tags = { error };
|
||||
console.error({
|
||||
caller: 'style / JSON.parse',
|
||||
tags: feature.get('tags'),
|
||||
error,
|
||||
feature,
|
||||
});
|
||||
}
|
||||
if (getZoomInteger() < 12 && !['iwn', 'nwn'].includes(tags.network)) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -47,22 +47,6 @@ export const Overlays: Component<Props> = ({ map }) => {
|
|||
'EPSG:900913:12',
|
||||
'EPSG:900913:13',
|
||||
'EPSG:900913:14',
|
||||
'EPSG:900913:15',
|
||||
'EPSG:900913:16',
|
||||
'EPSG:900913:17',
|
||||
'EPSG:900913:18',
|
||||
'EPSG:900913:19',
|
||||
'EPSG:900913:20',
|
||||
'EPSG:900913:21',
|
||||
'EPSG:900913:22',
|
||||
'EPSG:900913:23',
|
||||
'EPSG:900913:24',
|
||||
'EPSG:900913:25',
|
||||
'EPSG:900913:26',
|
||||
'EPSG:900913:27',
|
||||
'EPSG:900913:28',
|
||||
'EPSG:900913:29',
|
||||
'EPSG:900913:30',
|
||||
];
|
||||
const baseUrl = 'https://geo.dyomedea.com/geoserver/gwc/service/wmts';
|
||||
const geoServerStyle = '';
|
||||
|
@ -79,12 +63,7 @@ export const Overlays: Component<Props> = ({ map }) => {
|
|||
9783.939619140625, 4891.9698095703125, 2445.9849047851562,
|
||||
1222.9924523925781, 611.4962261962891, 305.74811309814453,
|
||||
152.87405654907226, 76.43702827453613, 38.218514137268066,
|
||||
19.109257068634033, 9.554628534317017, 4.777314267158508,
|
||||
2.388657133579254, 1.194328566789627, 0.5971642833948135,
|
||||
0.29858214169740677, 0.14929107084870338, 0.07464553542435169,
|
||||
0.037322767712175846, 0.018661383856087923, 0.009330691928043961,
|
||||
0.004665345964021981, 0.0023326729820109904, 0.0011663364910054952,
|
||||
5.831682455027476e-4, 2.915841227513738e-4, 1.457920613756869e-4,
|
||||
19.109257068634033, 9.554628534317017,
|
||||
];
|
||||
|
||||
const params = {
|
||||
|
@ -111,14 +90,16 @@ export const Overlays: Component<Props> = ({ map }) => {
|
|||
url: url,
|
||||
format: new MVT({ featureClass: Feature }),
|
||||
projection: projection,
|
||||
// minZoom: 8,
|
||||
// maxZoom: 14,
|
||||
tileGrid: new WMTSTileGrid({
|
||||
tileSize: [256, 256],
|
||||
origin: [-2.003750834e7, 2.003750834e7],
|
||||
resolutions: resolutions,
|
||||
matrixIds: gridNames,
|
||||
minZoom: 10,
|
||||
}),
|
||||
wrapX: true,
|
||||
maxZoom: 14,
|
||||
});
|
||||
return source;
|
||||
}
|
||||
|
|
|
@ -101,7 +101,10 @@ _flat.forEach((obj: any) => {
|
|||
});
|
||||
|
||||
export const getVectorTileFeatureType = (feature: Feature) => {
|
||||
if (!!feature.get('route') || feature.get('highway') === 'path') {
|
||||
if (
|
||||
['hiking'].includes(feature.get('route')) ||
|
||||
['path', 'track', 'footway', 'steps'].includes(feature.get('highway'))
|
||||
) {
|
||||
return 'way';
|
||||
}
|
||||
if (
|
||||
|
|
Loading…
Reference in New Issue