Cleanup (removing getAllPoiTypes which was used only once)
This commit is contained in:
parent
7cb02012c0
commit
6943424d34
|
@ -1,6 +1,4 @@
|
|||
import { Fill, Text, Icon, Stroke, Style, Circle } from 'ol/style';
|
||||
import startIcon from '../../icons/flag-start-b-svgrepo-com-green.svg';
|
||||
import finishIcon from '../../icons/flag-finish-b-o-svgrepo-com-red.svg';
|
||||
import wptIcon from '../../icons/location-pin-svgrepo-com-green.svg';
|
||||
import houseIcon from '../../icons/house-svgrepo-com.svg';
|
||||
import houseFlatIcon from '../../icons/houseFlat-svgrepo-com.svg';
|
||||
|
@ -11,23 +9,18 @@ import trainIcon from '../../icons/train-svgrepo-com.svg';
|
|||
import picnicIcon from '../../icons/picnic-svgrepo-com.svg';
|
||||
import caveIcon from '../../icons/cave-entrance-svgrepo-com.svg';
|
||||
import hikerIcon from '../../icons/hiker-svgrepo-com.svg';
|
||||
import leftArrowIcon from '../../icons/right-arrow-svgrepo-com.svg';
|
||||
import blackArrowheadPointingUp from '../../icons/black-arrowhead-pointing-up-svgrepo-com.svg';
|
||||
import noteIcon from '../../icons/note-svgrepo-com.svg';
|
||||
import wptIconSel from '../../icons/location-pin-svgrepo-com-red.svg';
|
||||
import { Feature } from 'ol';
|
||||
import memoize from 'memoizee';
|
||||
import { getMap, getState } from '../map';
|
||||
import { getMap } from '../map';
|
||||
import { Point } from 'ol/geom';
|
||||
import { Coordinate } from 'ol/coordinate';
|
||||
import { createDefaultStyle } from 'ol/style/Style';
|
||||
|
||||
import osmIcons, { highlight } from './osm-icons';
|
||||
import { indexOf } from 'lodash';
|
||||
import osmIcons from './osm-icons';
|
||||
import { getZoomInteger } from '../map/Map';
|
||||
import { isHighlighted } from '../map-tile-provider';
|
||||
import {
|
||||
getAllPoiTypes,
|
||||
getHighlightedTagValue,
|
||||
getTagValue,
|
||||
} from '../map-tile-provider/MapTileProvider';
|
||||
|
@ -40,11 +33,6 @@ interface StyleParameters {
|
|||
isSelected: boolean;
|
||||
}
|
||||
|
||||
getAllPoiTypes().forEach((type) => {
|
||||
if (!Object.keys(osmIcons).includes(type)) {
|
||||
console.warn({ caller: 'styles', message: 'missing icon', type });
|
||||
}
|
||||
});
|
||||
|
||||
const icons = {
|
||||
note: {
|
||||
|
|
|
@ -214,14 +214,6 @@ const currentOverlayHighlightedKey = () =>
|
|||
export const currentOverlayHighlightedDefinition = () =>
|
||||
currentCategory()[currentOverlayHighlightedKey()];
|
||||
|
||||
export const getAllPoiTypes = () => {
|
||||
let result = new Set();
|
||||
Object.keys(legacyOverlayDefinitions).forEach((tagName) => {
|
||||
const tag = legacyOverlayDefinitions[tagName];
|
||||
result = new Set([...result, ...Object.keys(tag)]);
|
||||
});
|
||||
return [...result];
|
||||
};
|
||||
|
||||
export const highlightedTags = () => {
|
||||
let result = {};
|
||||
|
|
Loading…
Reference in New Issue