Closed Duvio closed 9 months ago
This is not an issue, but wrong shortcode. Without a concrete code (and an url to an example) it is not possible to help you. Please ask in the support forum.
This is not an issue, but wrong shortcode. Without a concrete code (and an url to an example) it is not possible to help you. Please ask in the support forum.
http://ndj2.duckdns.org:7080/kartentest/
[leaflet-map lat="52.739" lng="8.972" zoom="7" zoomcontrol scrollwheel height="100vh" weight="100vw"]
[leaflet-marker iconUrl="http://ndj2.duckdns.org:7080/wp-content/uploads/2023/10/JuPaLogo.png" iconSize="56,66" lat=52.15548515056265 lng=10.32567858695984]
[leaflet-marker visible]
Salzgitter Jugendparlament
https://salzgitter.de/familie/jugendliche/jugendparlament.php
[/leaflet-marker]
[leaflet-marker iconUrl="http://ndj2.duckdns.org:7080/wp-content/uploads/2023/10/Jugendrat-Jesteburg-Logo-schmal-weiss.svg" iconSize="70,50" lat=53.308863428571115 lng=9.954163134098055]
[leaflet-marker]
<p><a href="https://www.jugendrat-jesteburg.de/">Jugendrat Jesteburg</a></p>
[/leaflet-marker]
[leaflet-marker lat=52.78744958927387 lng=8.43034921583656]
<p><a title="" href="https://goldenstedt.de/politik-und-verwaltung/jupa-2">Jupa Goldenstedt</a></p>
[/leaflet-marker]
You should adjust some options:
[leaflet-marker lat=... lng=...
iconurl="..."
iconsize="...,..."
iconAnchor="...,..."
popupAnchor="...,..."
tooltipAnchor="...,..."
]<a href="...">Some text</a>[/leaflet-marker]
See example.
It all has to be written in one line
iconsize="...,..."
iconAnchor="...,..."
popupAnchor="...,..."
tooltipAnchor="...,..."
Das solltest du dir nochmal ansehen. Dann sind auch die Popups an der richtigen Stelle.
iconsize="...,..." iconAnchor="...,..." popupAnchor="...,..." tooltipAnchor="...,..."
Das solltest du dir nochmal ansehen. Dann sind auch die Popups an der richtigen Stelle.
Das sind sie schon. Im Textfeld des Popups waren nur 4 Leerzeilen am Anfang, wie im Bild zu sehen, obwohl sie nicht dort sein sollten.
So wäre es falsch
[leaflet-marker lat=... lng=...
iconurl="..."
iconsize="...,..."
iconAnchor="...,..."
popupAnchor="...,..."
tooltipAnchor="...,..."
]<a href="...">Some text</a>[/leaflet-marker]
So wäre es richtig
[leaflet-marker lat=... lng=... iconurl="..." iconsize="...,..." iconAnchor="...,..." popupAnchor="...,..." tooltipAnchor="...,..."]<a href="...">Some text</a>[/leaflet-marker]
[leaflet-marker lat=52.15548515056265 lng=10.32567858695984 iconUrl="http://ndj2.duckdns.org:7080/wp-content/uploads/2023/10/JuPaLogo.png" iconSize="56,66"]<a href="https://salzgitter.de/familie/jugendliche/jugendparlament.php">Jugendparlament Salzgitter</a>[/leaflet-marker]
[leaflet-marker lat=52.15548515056265 lng=10.32567858695984 iconUrl="http://ndj2.duckdns.org:7080/wp-content/uploads/2023/10/JuPaLogo.png" iconSize="56,66"]
<a href="https://salzgitter.de/familie/jugendliche/jugendparlament.php">Jugendparlament Salzgitter</a>
[/leaflet-marker]
So sieht es besser aus und der Marker zeigt auf die richtige Stelle:
[leaflet-marker visible iconUrl="/php/leafext/tmp/JuPaLogo.png" iconSize="56,66" lat=52.15548515056265 lng=10.32567858695984 iconAnchor="27,66" popupAnchor="0,-64"]<a href="https://salzgitter.de/familie/jugendliche/jugendparlament.php">Jugendparlament Salzgitter</a>[/leaflet-marker]
[/leaflet-marker]
Der Marker zeigt immer auf die richtige Stelle. Das Problem ist die Freifläche im Popup (Screenshot im vorherigen Kommentar korrigiert). Ist es möglich einen Marker per Shortcode zu erstellen so, dass der Shortcode schön lesbar formatiert über mehrere Zeilen geht ohne dass dort falsche Leerzeilen im Popup sind?
Klappt im Shortcodeblock vom Blockeditor, wenn die Extensions installiert sind.
As you can see in the image, there is a huge empty area before the actual content of the markers popup. Shortcode: