diff --git a/src/components/overlays/Overlays.tsx b/src/components/overlays/Overlays.tsx index eb9e5ac..a8f2eee 100644 --- a/src/components/overlays/Overlays.tsx +++ b/src/components/overlays/Overlays.tsx @@ -1,7 +1,10 @@ import { Component, createEffect, onMount } from 'solid-js'; import OlMap from 'ol/Map'; -import { currentOverlayDefinition } from '../map-tile-provider'; +import { + currentOverlayDefinition, + isHighlightedTagType, +} from '../map-tile-provider'; import { Feature } from 'ol'; import { Point } from 'ol/geom'; import VectorLayer from 'ol/layer/Vector'; @@ -12,7 +15,7 @@ import { style } from '../gpx/styles'; import ClusterableVectorTileSourceProxy from '../../lib/ClusterableVectorTileSourceProxy'; import { getMap, getZoomInteger } from '../map/Map'; import { getCenter } from 'ol/extent'; -import { getVectorTileFeatureType } from './overlay-definitions'; +import { getTagType, getVectorTileFeatureType } from './overlay-definitions'; import GeoJSON from 'ol/format/GeoJSON.js'; interface Props { @@ -136,7 +139,7 @@ export const Overlays: Component = ({ map }) => { if ( getZoomInteger() < 16 && getVectorTileFeatureType(feature) === 'poi' && - isHighlighted(feature) + isHighlightedTagType(getTagType(feature)) ) { return new Point(getCenter(feature.getGeometry().getExtent())); }