Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/valentinh/leaflet.dommarkers
Leaflet Markers with a custom DOM element icon
https://github.com/valentinh/leaflet.dommarkers
Last synced: 2 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 (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-25T08:25:37.000Z (over 7 years ago)
- Last Synced: 2024-10-10T06:59:29.271Z (3 months ago)
- Language: JavaScript
- Size: 143 KB
- Stars: 6
- Watchers: 3
- 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
});
```