sticker panel with ability to choose

This commit is contained in:
muerwre 2018-08-24 17:04:48 +07:00
parent 40a11297c0
commit f2c9cc4abc
10 changed files with 140 additions and 64 deletions

View file

@ -19,17 +19,18 @@ export class Stickers {
this.createSticker({ latlng });
};
createSticker = ({ latlng }) => {
const sticker = new Sticker({
createSticker = ({ latlng, sticker }) => {
const marker = new Sticker({
latlng,
deleteSticker: this.deleteStickerByReference,
map: this.map,
lockMapClicks: this.lockMapClicks,
sticker,
});
this.stickers.push(sticker);
this.stickers.push(marker);
sticker.sticker.addTo(this.map);
sticker.sticker.enableEdit();
marker.sticker.addTo(this.map);
marker.sticker.enableEdit();
};
deleteStickerByReference = ref => {