mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
fixed undefined sticker issue
This commit is contained in:
parent
72f6a63f47
commit
5dde6d88a9
1 changed files with 4 additions and 0 deletions
|
@ -3,6 +3,7 @@ import { IStickerDump, Sticker } from '$modules/Sticker';
|
||||||
import { MarkerClusterGroup } from 'leaflet.markercluster/dist/leaflet.markercluster-src.js';
|
import { MarkerClusterGroup } from 'leaflet.markercluster/dist/leaflet.markercluster-src.js';
|
||||||
import { clusterIcon } from '$utils/clusterIcon';
|
import { clusterIcon } from '$utils/clusterIcon';
|
||||||
import { editor, Editor } from "$modules/Editor";
|
import { editor, Editor } from "$modules/Editor";
|
||||||
|
import { STICKERS } from "$constants/stickers";
|
||||||
|
|
||||||
export interface ILatLng {
|
export interface ILatLng {
|
||||||
lat: number,
|
lat: number,
|
||||||
|
@ -36,6 +37,9 @@ export class Stickers {
|
||||||
createSticker = ({
|
createSticker = ({
|
||||||
latlng, sticker, angle = 2.2, text = '', set
|
latlng, sticker, angle = 2.2, text = '', set
|
||||||
}: IStickerDump): void => {
|
}: IStickerDump): void => {
|
||||||
|
|
||||||
|
if (!STICKERS[set] || !STICKERS[set].layers || !STICKERS[set].layers[sticker + 111]) return;
|
||||||
|
|
||||||
const marker = new Sticker({
|
const marker = new Sticker({
|
||||||
latlng,
|
latlng,
|
||||||
angle,
|
angle,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue