diff --git a/src/modules/Stickers.ts b/src/modules/Stickers.ts index 5525b60..537934a 100644 --- a/src/modules/Stickers.ts +++ b/src/modules/Stickers.ts @@ -3,6 +3,7 @@ import { IStickerDump, Sticker } from '$modules/Sticker'; import { MarkerClusterGroup } from 'leaflet.markercluster/dist/leaflet.markercluster-src.js'; import { clusterIcon } from '$utils/clusterIcon'; import { editor, Editor } from "$modules/Editor"; +import { STICKERS } from "$constants/stickers"; export interface ILatLng { lat: number, @@ -36,6 +37,9 @@ export class Stickers { createSticker = ({ latlng, sticker, angle = 2.2, text = '', set }: IStickerDump): void => { + + if (!STICKERS[set] || !STICKERS[set].layers || !STICKERS[set].layers[sticker + 111]) return; + const marker = new Sticker({ latlng, angle,