Closed bordeux closed 7 years ago
Hi and thanks for the PR!
I'm going to have to take a look at these feature additions individually. I saw a few things I liked and will add, but a few things I have questions about. I don't think I can add the heatmap, because it is itself a leaflet plugin (I was thinking of coming up with a way to use other plugins, but I don't want to steal their work, or explicitly link their code); if other people want to customize their installation with another plugin, that's great. The other question is the icon image: I kind of wanted to create a library for icon image that they could use with a keyword (instead of a URL), so that their marker shortcodes aren't as complicated. I haven't put any work into it yet, and what you've done here is probably a good alternative. Just FYI. I'll have to take a look later, as I said.
Thanks again!
Oh great! You've spared me a lot of trouble — I was just taking a look at the code to implement the icons, although I wanted to do something slightly different, i.e. register one icon (assuming that all will be pretty much the same one) and use that registered icon inside the markers. But your solution is good enough for me!
Leafet's DivIcon might be a little better for custom styling. I've been thinking about implementing it with some base classes for generic markers. Then users can define the marker style in their css:
Indeed, and it might actually be simpler, since all happens in the user's CSS. I haven't used it myself, though, just the 'normal' Icons.
BTW after some moments of euphoria I realised I need to pass a lot of more options in my case, since I'm using my custom tile server (for a 'fake' map), and that needs, at least, have tms
set to true
. But I need some more tricks. This requires adding all those extra (missing) parameters on the shortcodes... let me think about it a bit more :)
Thanks for the help and the test icon @bordeux ! Cheers
New features:
Here is screenshot
And here is live demo: http://pocztowe.co/