bozdoz / wp-plugin-leaflet-map

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

Map on NullPoint and Shortcode Helper #188

Closed hupe13 closed 1 year ago

hupe13 commented 1 year ago

Hi Bozdoz,

if I use:

[leaflet-map lat=0 lng=0]
[leaflet-marker]NullPoint[/leaflet-marker]

the marker appears at the default location. Writing "0.0" instead of "0" works as expected.

The Shortcode Helper generates the code [leaflet-marker lat=... lng=...], but it should be: [leaflet-marker lat=... lng=...]some text[/leaflet-marker].

Can you fix this please? Thank you very much.

bozdoz commented 1 year ago

This is true, and minorly unfortunate. I had not distinguished between empty values and 0 values. So 0 turns into default. I figured it wasn't overly important, since it's rare to intentionally place something at 0,0. But this can be improved.

hupe13 commented 1 year ago

I wanted to test something and just used lat=0 and lng=0. ;-)