You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
588 B
JavaScript
26 lines
588 B
JavaScript
import {Marker} from "leaflet";
|
|
import {divIcon} from "leaflet/dist/leaflet-src.esm";
|
|
|
|
export const NwahEntryMarker = Marker.extend({
|
|
options: {
|
|
color: '#fff',
|
|
icon: divIcon({
|
|
className: 'nwah-entry-marker',
|
|
iconSize: ['', '']
|
|
})
|
|
},
|
|
|
|
_initIcon() {
|
|
Marker.prototype._initIcon.call(this);
|
|
this._icon.src = "";
|
|
this._icon.style.backgroundColor = this.options.color;
|
|
},
|
|
|
|
mark() {
|
|
this._icon.classList.add('mark');
|
|
},
|
|
|
|
unmark() {
|
|
this._icon.classList.remove('mark');
|
|
},
|
|
}); |