wp-plugin-leaflet-map
wp-plugin-leaflet-map copied to clipboard
Adds new shortcode suport for imageOverlay LeafLet feature
I added support to imageOverlay feaure available in LeafLet library creating a new shortcode.
Since "image" was already used, i created the [leaflet-overlay]
shortcode.
This is an example of the new feature working on a WordPress installation (not yet published). It a simple map with one marker and one overlay image.
And this is the code used on Pod Template:
[leaflet-map zoomcontrol scrollwheel detect-retina
lat="{@latitude}" lng="{@longitude}" zoom=8]
[leaflet-overlay url="{@coverage_image}"
north="{@coverage_boundary_north}"
south="{@coverage_boundary_south}"
east="{@coverage_boundary_east}"
west="{@coverage_boundary_west}"]
[leaflet-marker lat="{@latitude}" lng="{@longitude}"
iconUrl="/markers/marker-{@modulation,value}-small.png"
iconAnchor="12,48"]
This sounds great! Thanks!
Do you have an example I could test with?
Hi bozdoz, unfortunately, the WP installation used for screenshots is still offline. We are still running the old portal. Do you have the possibility to test it in a local installation?
absolutely. Ran into some issues testing. I wanted to add a videoOverlay too, but finding that oddly difficult. Trying to troubleshoot now.
Just rebased imageOverlay feature on new version.
I'm trying to add videoOverlay in the same way I have done with imageOverlay. In case of success, I'll open a new PR.
Adding video tag, seems that every HTML component is rendered correctly.
Don't know why, <video>
tag has always a 0
width, but CSS is changed correctly.
I also tried with z-index, but no video is rendered.
Thanks! Sorry this took awhile to look through!