mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
stickers with ability to drag them
This commit is contained in:
parent
5f30df6f48
commit
b8434c32e7
19 changed files with 460 additions and 39 deletions
21
src/utils/leafletDomMarkers.js
Normal file
21
src/utils/leafletDomMarkers.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
import L from 'leaflet';
|
||||
|
||||
export const DomMarker = L.DivIcon.extend({
|
||||
initialize: function (options) {
|
||||
this.options = options;
|
||||
},
|
||||
|
||||
options: {
|
||||
element: null // a initialized DOM element
|
||||
// same options as divIcon except for html
|
||||
},
|
||||
|
||||
createIcon: function() {
|
||||
const { html, element } = this.options;
|
||||
|
||||
this._setIconStyles(element, 'icon');
|
||||
|
||||
return element;
|
||||
}
|
||||
});
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue