diff --git a/src/components/gpx/styles.ts b/src/components/gpx/styles.ts index 884c85e..8fd1c97 100644 --- a/src/components/gpx/styles.ts +++ b/src/components/gpx/styles.ts @@ -309,7 +309,7 @@ const styles = { }; }, getStyle: memoize((params: any) => { - console.log({ caller: 'getStyle', params }); + // console.log({ caller: 'getStyle', params }); const { isSelected, name, network } = params; return new Style({ stroke: styles.way.strokes[network], @@ -335,11 +335,12 @@ const styles = { klass, isHighlighted, isTextHidden: zoom() < 19, - isHidden: !isHighlighted && zoom() < 16, + // isHidden: !isHighlighted && zoom() < 16, + isHidden: true, }; }, getStyle: memoize((params: any) => { - console.log({ caller: 'getStyle', params }); + // console.log({ caller: 'getStyle', params }); const { isSelected, name, klass, isHidden, isTextHidden, isHighlighted } = params; if (isHidden) { @@ -385,9 +386,12 @@ export const style = (feature: Feature, resolution: number) => { return createDefaultStyle(feature, resolution)[0]; } const params = styles[type].getParameters(feature); + if (params?.isHidden) { + return null; + } const getStyle = styles[type].getStyle; const style = getStyle(params); - console.log({ caller: 'style', feature, type, params, style }); + // console.log({ caller: 'style', feature, type, params, style }); if (style === undefined) { return createDefaultStyle(feature, resolution)[0]; } diff --git a/src/components/map/Map.tsx b/src/components/map/Map.tsx index e0f9a10..a05e7fe 100644 --- a/src/components/map/Map.tsx +++ b/src/components/map/Map.tsx @@ -374,7 +374,7 @@ const Map: Component = () => { const vectorTileLayer = new VectorTileLayer({ source: vectorTileSource, - style: [], + style, declutter: false, }); diff --git a/src/lib/ClusterableVectorTileSourceProxy.ts b/src/lib/ClusterableVectorTileSourceProxy.ts index 870d7d3..9f44c08 100644 --- a/src/lib/ClusterableVectorTileSourceProxy.ts +++ b/src/lib/ClusterableVectorTileSourceProxy.ts @@ -67,15 +67,15 @@ const overloads = { } props.featuresSent = false; setProps(target, props); - console.log({ - caller: 'clusterableVectorTileSourceProxy', - overload: 'loadFeatures', - extent, - resolution, - projection, - target: target, - props, - }); + // console.log({ + // caller: 'clusterableVectorTileSourceProxy', + // overload: 'loadFeatures', + // extent, + // resolution, + // projection, + // target: target, + // props, + // }); }; }, @@ -90,13 +90,13 @@ const overloads = { //console.trace(); props.featuresSent = true; setProps(target, props); - console.log({ - caller: 'clusterableVectorTileSourceProxy', - overload: 'getFeatures', - result, - props, - target, - }); + // console.log({ + // caller: 'clusterableVectorTileSourceProxy', + // overload: 'getFeatures', + // result, + // props, + // target, + // }); return result; }; },