wp-plugin-leaflet-map icon indicating copy to clipboard operation
wp-plugin-leaflet-map copied to clipboard

Adds new shortcode suport for imageOverlay LeafLet feature

Open sardylan opened this issue 2 years ago • 6 comments

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.

map

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"]

sardylan avatar Sep 02 '21 20:09 sardylan

This sounds great! Thanks!

bozdoz avatar Sep 02 '21 20:09 bozdoz

Do you have an example I could test with?

bozdoz avatar Oct 03 '21 23:10 bozdoz

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?

sardylan avatar Oct 05 '21 14:10 sardylan

absolutely. Ran into some issues testing. I wanted to add a videoOverlay too, but finding that oddly difficult. Trying to troubleshoot now.

bozdoz avatar Oct 05 '21 15:10 bozdoz

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.

sardylan avatar Oct 06 '21 22:10 sardylan

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.

sardylan avatar Oct 06 '21 22:10 sardylan

Thanks! Sorry this took awhile to look through!

bozdoz avatar Sep 13 '22 01:09 bozdoz