Closed hupe13 closed 1 year ago
I'll work on this
This good? https://github.com/bozdoz/wp-plugin-leaflet-map/pull/169
I'm not sure how to test this
@hupe13
I'm sorry, the svg markers thing is a misunderstanding, it just concerns markers. I have programmed it similar to the popupAnchor (class.marker-shortcode.php, construct-leaflet-map.js) and will make a pull-rquest tomorrow.
Somehow the pull request is too complicated for me, I'm sorry. I have changed 2 files (WordPress version 3.0.5)
*** a/wp-content/plugins/leaflet-map/shortcodes/class.marker-shortcode.php
--- b/wp-content/plugins/leaflet-map/shortcodes/class.marker-shortcode.php
***************
*** 79,80 ****
--- 79,81 ----
'popupAnchor' => isset($popupanchor) ? $popupanchor : null,
+ 'tooltipAnchor' => isset($tooltipanchor) ? $tooltipanchor : null,
'svg' => isset($svg) ? $svg : null,
***************
*** 98,99 ****
--- 99,101 ----
'popupAnchor' => FILTER_SANITIZE_STRING,
+ 'tooltipAnchor' => FILTER_SANITIZE_STRING,
'svg' => FILTER_VALIDATE_BOOLEAN,
*** a/wp-content/plugins/leaflet-map/scripts/construct-leaflet-map.js
--- b/wp-content/plugins/leaflet-map/scripts/construct-leaflet-map.js
***************
*** 361,362 ****
--- 361,363 ----
'popupAnchor',
+ 'tooltipAnchor',
];
(I generated a new construct-leaflet-map.min.js of course.)
And it works.
Added that code to the PR, if you wanted to double-check
Hi Bozdoz,
when answering this question, I missed tooltipAnchor. Is it possible to implement this? When I hover over the "Marker", the tooltip is not in the right position, see here.
Thank you very much.