bozdoz / wp-plugin-leaflet-map

Add leaflet maps to Wordpress with shortcodes
https://wordpress.org/plugins/leaflet-map/
GNU General Public License v2.0
141 stars 72 forks source link

New features #14

Closed bordeux closed 7 years ago

bordeux commented 8 years ago

New features:

Here is screenshot features

And here is live demo: http://pocztowe.co/

bozdoz commented 8 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!

GwynethLlewelyn commented 8 years ago

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!

bozdoz commented 8 years ago

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:

http://leafletjs.com/reference.html#divicon

GwynethLlewelyn commented 8 years ago

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 :)

bozdoz commented 7 years ago

Thanks for the help and the test icon @bordeux ! Cheers