Zoom on Elevation-Map?
-
Hi Hupe,
how can I define the starting point and zoom in for an elevation map?
My example, which is just not correct:[leaflet-map fitbounds]
[leaflet-marker lat=49.76173101665215 lng=8.685792088508608]Start[/leaflet-marker]
[elevation-map zoom=”8″]
[elevation gpx=”wp-content/maps/Ober-Beerbach-Herford-blanko.gpx”]
[hover]
[zoomhomemap]Does this even work in an elevation map? I would like to zoom in on multiple maps each with a stop along the way.
Thanks in advance
Regards
Michael
-
The shortcode
[elevation-map zoom=”8″]
does not exist. I tried to document fitbounds/autofitbounds/zoomhomemap at /wp-admin/admin.php?page=extensions-leaflet-map&tab=zoomhome.You might also be interested in followMarker. You can see its effect better in Raruto’s example.
Oh, I’m sorry- I just found a bug with followMarker. I will fix it in the next version.Thanks for your prompt reply, Hupe. The followMarke is amazing! Exacly, what I’m looking for — as well!
`I am looking for a function to zoom in on one of the waypoints.
The issue is that I have taken a tour with an electric city car over 850 km and generated it “in one piece” as a map.
Now I have set one or more waypoints at each charging stop (which were many). For each route section I would like to zoom to the waypoint of the charging station as the starting point.
If I now set a waypoint as above and a normal zoom on it. A normal map appears above the elevation map in full view of the route at the desired zoom level, but without the route.
Do I have to split the maps in BRouter into route sections and include them individually, or is it possible to zoom in on a waypoint in an elevation map? “ZoomWaypoint”, or ZoomLatLon?
Sch?nen Tag noch!
Gru?
MichaelYour extension is really quite excellent. Only I must note that as a beginner, you have some problems with the insertion of the parameters.
I am currently trying to enter pace, speed, or “velocity”, but it doesn’t work.
Am I too stupid to find the documented syntax for parameter passing?
https://leafext.de/extra/category/pace/Similar game also in the main plugin, in whose examples wrong, respectively confusing examples are given.
[leaflet-map fitbounds]
[leaflet-gpx src=https://cdn.jsdelivr.net/gh/mapbox/togeojson@master/test/data/run.gpx color=black]
If you try this with the URL of your own page, it doesn’t work.
If you then specify the path from wp-content, it doesn’t work either.
If you put the path in quotes, it works.
But I could only figure that out from a post in a forum.I know myself that documentation is difficult, and you take plenty of things for granted.
I wrote many manuals (rather documentations) on my website and made a lot of mess ups because I took things for granted, which are insurmountable for others, as I could see from the questions in the comments.
This is also just feedback and certainly not criticism.
I still suspect that I simply overlooked the basic documentation.Regards
MichaelMy fault:
[elevation gpx=”wp-content/maps/Ober-Beerbach-Herford-blanko.gpx” speed]Edit:
Okay, die Time fehlt in meiner .gpx aus BRouter, logisch.I know that both plugins are not easy to use, unfortunately this is a big disadvantage. Also I still find more what is not in the documentation, see for example the bug I mentioned above. Bozdoz and I would need someone to program the user interface. Once there was already that.
Thats why: ask!
[leaflet-map fitbounds] [leaflet-gpx src=https://cdn.jsdelivr.net/gh/mapbox/togeojson@master/test/data/run.gpx color=black]
Are any errors in the developer console?
P.S. Versuch mal den unter /wp-admin/admin.php?page=extensions-leaflet-map&tab=filemgr-list generierten Shortcode zu verwenden, mit vorherigem
[leaflet-map fitbounds]
natürlich.(Die andere Frage beantworte ich sp?ter.)
Off Topic, Google-Rant:
Sorry, ich muss mal meinen aktuellen Frust loswerden. Das liegt nicht an Deinem Plugin, das ist wirklich richtig super und dass Du im Backend die ganzen Parameter zum anklicken bereitstellst ist purer Zucker, ernsthaft! Auch OSM und das Leaflet-Plugin sind richtig tolle Projekte. Und auch klar: Die GUI ist immer ein Problem, das nicht leicht zu l?sen ist, aber so wie die Plugins jetzt sind, sind sie im Ansatz schon gut, nur eben die Basics k?nnten irgendwo mal aufgeführt werden.
Wenn ich gerade dabei bin und auf die ganzen Probs als Anf?nger sto?e, k?nnte ich das auch erledigen. Habe ja nichts anderes zu tun *kicher*. ??Okay, aber zum Punkt: Ich versuche aus der Google Timneline meine Daten als gpx zu ziehen, oder wenigstens als kml mit Timestamps. Lasse ich mir in der Timeline die Rohdaten anzeigen, so sehe ich teilweise auch Timestamps. Klar ist auch, dass die Daten nur sporadisch erfasst werden, beispielsweise bei ?nderungen der Geschwindigkeit, weil Google eben auch Echtzeitdaten zur Stauanzeige erfassen will.
Mir ist auch klar, dass die Google Timeline kein richtiger Tracker ist, das sieht man ja an mitunter massiven Sprüngen von einem Wegpunkt zum anderen.
Mich ?rgert einfach nur, dass Google massiv Daten erfasst, man diese aber als User nicht so problemlos für sich selbst verwenden kann, wie Google immer tut.
Auch die Geschichte mit “Ihr Konto, Ihre Daten” bei Google Takeout ist ein schlechter Witz! Ich soll für einen meiner Nebenaccounts (der, der mich auch den Handy trackt) 123 Dateien herunterladen. Keine direkten Links für Tools wie Jdo, sondern 123 Buttons mit Javascript.
Klickt man auch einen, ist man für mindestens 5 Sekunden damit besch?ftigt zu schauen, wie sich die Site neu l?dt und man wieder ganz oben in der Liste landet, w?hrend die Datei heruntergeladen wird. Ein Schelm, wer b?ses dabei denkt.
Wie ich die Daten aus meiner Dashcam bekomme, ist mir auch komplett unklar, das ist, wie ich las, schon eine Wissenschaft für sich, weil jeder Hersteller das anders implementiert.
Ich merke also, dass die Nummer, coole Daten von dieser Reise anzuzeigen, durch ist. Hast Du eine Empfehlung für ein GPS-Tracking-Tool auf einem Android-Handy, dessen Daten ich problemlos mit Leaflet verwenden kann?
Sorry für das OT-Jammern, ich h?tte mir das alles vor der Reise überlegen sollen, aber nachher ist man eben immer schlauer. Das musste nur mal raus, was sich in den letzten Tagen angesammelt hat, auch wenn Du dafür der v?llig falsche Adressat bist. Ich fühlte mich nur wie eine Fliege, die dauernd vor eine Scheibe fliegt.
Gru?
Michaelnur eben die Basics k?nnten irgendwo mal aufgeführt werden.
Wenn ich gerade dabei bin und auf die ganzen Probs als Anf?nger sto?e, k?nnte ich das auch erledigen.Du kannst ja schon mal anfangen, eine Liste zu erstellen, die ich als Grundlage zur Dokumentation nehmen kann. Bei meiner Tabelle am Anfang muss man als Nutzer schon wissen, was man m?chte. Die Doku ist eben aus Sicht des Programmierers geschrieben.
Die Schnittstelle Programmierer <-> Anwender ist aber ein generelles Problem, nicht nur hier.Zu dem ganzen anderen sage ich hier nichts. Du kannst mich ja per Mail kontaktieren, wenn du m?chtest.
Answering other:
If followMarker solves your problem, the bug will be fixed in the next Github-Version.
For the WordPress Version I need to write the documentation (and make some other things) and this takes time. ??An other approach is this:
We hike on vacation. To display all hikes during a vacation, I load all gpx files (one for each day) into a directory and create an overview map similar to[leaflet-dir]
.[leaflet-map ...] [leaflet-gpx src=/url/to/day1-track.gpx ... color="green"]<a href="https://url/to/elevation-track1/">track1</a>[leaflet-gpx] [leaflet-gpx src=/url/to/day2-track.gpx ... color="yellow"]<a href="https://url/to/elevation-track2/">track2</a>[leaflet-gpx] [leaflet-gpx src=/url/to/day3-track.gpx ... color="red"]<a href="https://url/to/elevation-track1/">track1</a>[leaflet-gpx] ...
Each track has a link to another page with this track. There I use
[elevation ...]
to display the hike on the specific day.I’m using a php script to automate this. May be, there is any other plugin, which does the job.
I would like to make this available for all inleaflet-dir
. However, I still have no idea how to generalize the link.GPS Tracking Android: I have OSMand installed. Sometimes I’m using this to record a track. But I have a GPSmap device from Garmin.
If followMarker solves your problem, the bug will be fixed in the next Github-Version.
Released it yesterday.
Thank you very much, I’ll look for it later. Sorry for the late feedback, I was busy.
But now I have a crazy problem:
Article not published: Preview good, all routes and elevation profiles visible.
Article published: All routes are on Halifax (default coordinates).
Is that the same for you?
https://hessburg.de/900-km-im-twizy-durch-deutschland-1/Edit:
Source-Map-Fehler: Error: request failed with status 404
Ressourcen-Adresse: https://hessburg.de/wp-content/plugins/extensions-leaflet-map/leaflet-plugins/leaflet-elevation-2.2.6/dist/leaflet-elevation.min.js
Source-Map-Adresse: leaflet-elevation.min.js.mapDiese Seite verwendet die nicht standardisierte Eigenschaft "zoom". Stattdessen sollte calc() in den entsprechenden Eigenschaftswerten oder "transform" zusammen mit "transform-origin: 0 0" verwendet werden. 900-km-im-twizy-durch-deutschland-1 Einige Cookies verwenden das empfohlene "SameSite"-Attribut inkorrekt. 3 JQMIGRATE: Migrate is installed, version 3.3.2 jquery-migrate.min.js:2:709 Layout-Darstellung wurde erzwungen, bevor die Seite vollst?ndig geladen war. Falls Stylesheet noch nicht geladen sind, kann dies zu einem kurzzeitigen Darstellung des Inhalts ohne Formatierung führen.
PhastPress, I guess. ??
Edit 2:
No, it was not PhastPress. The error also occurs when only Leaflet and Leaflet Extensions are activated in the troubleshooting. Crap. ??
Source-Map-Fehler:
Setting issue in the Developer console. Somewhere you can turn this off.
I use Query Monitor for troubleshooting. I would first create a test page with only one map and track, without any other things.
And yes, any plugin to optimize Javascript can be the cause of errors if you use Leaflet Map. But this doesn’t seem to apply here.
Thank you for the advice. I can’t find anything in the query monitor except slow scripts.
If I look at the preview of an article as an admin under the normal URL (hessburg.de/kartentest), the maps are missing.
If I preview an article as admin under the preview URL (https://hessburg.de/?p=19860&preview=true), the maps appear.
Very strange.
I don’t have to understand it.
I’ll have to look into it tomorrow. Too tired.Thanks again
Good n8!
MichaelIt’s me.
Again. ??I don’t understand it. ??
Action taken:
– Cache(s) cleared
– Troubleshooting mode activated
– Reset Leaftlet Extensions
– Uninstalled both plugins
– WP “cleaned up” (WP Sweep)
– Tables optimised
– Both plugins reinstalled
– Updated PHP from 7.4 to 8.19And it still doesn’t work:
In the preview I see the route – published I don’t see it anymore.In Chromium there is no map at all, in Firefox the one from Halifax. No sign of life from Leaflet Extensions (Elevation).
I have now created an article with only the following content:
[leaflet-map lat=49.76171016424807 lng=8.685929786844 zoom=17]
Placeholder
[leaflet-map] [elevation gpx=”wp-content/maps/Ober-Beerbach-Herford-blanko.gpx”]
The normal leaflet map works.
The elevation does not work.Then I changed the following:
[leaflet-map] [elevation gpx=https://hessburg.de/wp-content/maps/Ober-Beerbach-Herford-blanko.gpx]
And also:
[leaflet-map] [elevation gpx=”https://hessburg.de/wp-content/maps/Ober-Beerbach-Herford-blanko.gpx”%5D
Finally, I just used the example code:
[leaflet-map fitbounds]
[leaflet-gpx src=https://cdn.jsdelivr.net/gh/mapbox/togeojson@master/test/data/run.gpx color=black]
Again, this only works in the preview of the article.
What could I be doing wrong?
Put in your .htaccess:
RewriteRule .*\.gpx$ - [L,T=application/gpx+xml]
I need a FAQ. ?? (Soviel zur Doku.)
Thanks again!
Cleaned .htaccess up:
# BEGIN Hessi – Leaflet
AddType application/gpx+xml gpx
RewriteRule .*\.gpx$ – [L,T=application/gpx+xml]# BEGIN WordPress
# Die Anweisungen (Zeilen) zwischen ?BEGIN WordPress“ und ?END WordPress“ sind
# dynamisch generiert und sollten nur über WordPress-Filter ge?ndert werden.
# Alle ?nderungen an den Anweisungen zwischen diesen Markierungen werden überschrieben.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
That’s all.
Nothing changes.Console on Chromium reported an error:
Inhalt für https://hessburg.de/wp-content/plugins/extensions-leaflet-map/leaflet-plugins/leaflet-elevation-2.2.6/dist/leaflet-elevation.min.js.map: HTTP-Fehler: Statuscode 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE konnte nicht geladen werden
Yes, right, leaflet-elevation.min.js.map does not exist.
There are only:leaflet-elevation.css
leaflet-elevation.js
leaflet-elevation.min.css
leaflet-elevation.min.jsRegards
Michael
Edit:
If I trie to uplod the gpx-Files via WP, I still get:
?twizy-fahrt–7-Fritzlar-Kassel2.gpx“ konnte nicht hochgeladen werden.
Du bist leider nicht berechtigt, diesen Dateityp hochzuladen.Edit 2:
However, if I allow uploading via the Setting in the Leaflet Extensions, it works.This means that the .htaccess is not interpreted correctly, right?
Edit 3
Used the uploades Files from WP Mediathek:
[leaflet-map fitbounds]
[leaflet-gpx src=”https://hessburg.de/wp-content/uploads/2022/08/twizy-fahrt-7-Fritzlar-Kassel2.gpx”%5D
Nothing changes.
Inhalt für https://hessburg.de/wp-content/plugins/extensions-leaflet-map/leaflet-plugins/leaflet-elevation-2.2.6/dist/leaflet-elevation.min.js.map: HTTP-Fehler: Statuscode 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE konnte nicht geladen werden
Open Chrome Developer Tools, Settings (Zahnrad),
Switch off “Javascript-Quellzuordnungen” / “Enable Javascript Source Maps”# BEGIN Hessi – Leaflet
AddType application/gpx+xml gpx
RewriteRule .*\.gpx$ – [L,T=application/gpx+xml]This works okay. If I try to open the URL to the gpx file, the application type is
[application/gpx+xml]
.Du bist leider nicht berechtigt, diesen Dateityp hochzuladen.
…
However, if I allow uploading via the Setting in the Leaflet Extensions, it works.(Sorry for the others, reading this. I answer in German, it is easier.)
In die Mediathek dürfen nur von WordPress definierte Dateitypen hochgeladen werden. gpx-Dateien sind nicht dabei. Das wird gestattet, wenn du es unter /wp-admin/admin.php?page=extensions-leaflet-map&tab=filemgr erlaubst.Funktioniert es, wenn du den unter /wp-admin/admin.php?page=extensions-leaflet-map&tab=filemgr-list angebotenen Shortcode verwendest?
Ein[leaflet-map fitbounds]
muss natürlich davor angegeben werden.Hast Du einen Link zur Testseite?
- The topic ‘Zoom on Elevation-Map?’ is closed to new replies.