mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
21 lines
415 B
JavaScript
21 lines
415 B
JavaScript
import { DivIcon } from 'leaflet';
|
|
|
|
export const DomMarker = 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, className } = this.options;
|
|
|
|
this._setIconStyles(element, 'icon');
|
|
|
|
return element;
|
|
}
|
|
});
|
|
|