https://github.com/valentinh/leaflet.dommarkers
Leaflet Markers with a custom DOM element icon
https://github.com/valentinh/leaflet.dommarkers
Last synced: 8 months ago
JSON representation
Leaflet Markers with a custom DOM element icon
- Host: GitHub
- URL: https://github.com/valentinh/leaflet.dommarkers
- Owner: ValentinH
- License: mit
- Created: 2015-08-13T08:39:40.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-08-25T08:25:37.000Z (almost 9 years ago)
- Last Synced: 2025-10-22T20:50:27.898Z (8 months ago)
- Language: JavaScript
- Size: 143 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Leaflet.DomMarkers
Leaflet Markers with a custom DOM element icon.
Leaflet.DomMarkers.Icon extends the Leaflet.DivIcon object so the same config properties can be used (except the `html` one which is replaced by `element`
The initial idea was to be used inside the [angular-leaflet-directive](https://github.com/tombatossals/angular-leaflet-directive/) and to display interactive icons on the map. The DOM element is generated by the *angular-leaflet-directive* and provided to the Leaflet.DomMarkers.Icon through the `element` property:
```js
var domElement = yourDomElementCreationFunction();
var icon = L.DomMarkers.icon({
element: domElement,
iconSize: [20, 20],
//... other Icon/DivIcon properties
});
```