Leaflet.ExtraMarkers
Leaflet.ExtraMarkers copied to clipboard
Version 2
This is a work in progress issue for me to make notes; any input is definitely welcome. While I intend to expose these fine grained parameters to the developers, I also want to add a convenience factory for most operations. This convenience factory will consume some TurfJS classification functions and the colorbrewer2 palettes.
This will break everything so I may roll a new repository leaflet-symbology?
Issues:
- [ ]
prefixandextraClassesdo the same thing. - [ ] user experience seems one dimensional
- [ ] adding plain text is cumbersome, need to also add classes and font-awesome
- [ ] innerHTML easily allows custom markers, but why even use this plugin?
Features:
- [ ] markers vs symbols: symbols are nice for classified data
- [ ] treat markers as symbols: add a function that will recolor a symbol for
- [ ] add color brewer palettes
- [ ] add classification convenience functions
- [ ] add built-in hover effects
Code Thoughts...
@param {object} container
@param {string|object} icon
@param {string|object} marker
@param {number|function} size - classification function
mode: //marker or symbol
container: {
class: ''
bgPos: ''
},
icon: {
type: '', // font, svg, img, text
def: '' // definition of either icon font class, svg, img, or text
offset: {
top:
left:
}
},
marker: {
color: {string|object} // {outline, fill, gradient}
shape:
opacity:
},
size: fn
Any updates on this? Are you planning to allow sprites or multiple images for different screen sizes?
I have not really pushed forward on this; I have been consumed with another long term project. A majority of my efforts will be to simply use SVG icons instead of sprites.