dosheimer
Forum Replies Created
-
Forum: Plugins
In reply to: [Leaflet Map] gpx-track from URL: Show single waypointswwwwooww! ??
Du bist ein Meister ??
Das war der entscheidende Hinweis. Nun klappt es perfekt. Ich hab noch die Option “circleMarker” mit dazu genommen und die gpx Datei beinhaltet nun für jeden Track-Point auch zus?tzlich einen Waypoint mit Content in den von Dir genannten Tags (in meinem Fall habe ich dort die Uhrzeit und das Datum des jeweils zugeh?rigen Track-Points eingetragen).
Das Ergebnis ist sensationell gut jetzt! Ich bin sehr happy ??
Hier noch der von mir final verwendete Shortcode:
[leaflet-map fitbounds zoomcontrol]
[leaflet-kml src=https://www…../…./current-position.kml]
[leaflet-gpx src=”https://www…../…./track.gpx” circleMarker]{name} – {desc}[/leaflet-gpx]
[fullscreen]
Feinkosmetik: Kann man noch den Durchmesser des “CircleMarker” etwas verkleinern, wenn der mir im Default etwas zu gro? vorkommt?Forum: Plugins
In reply to: [Leaflet Map] gpx-track from URL: Show single waypointsHm, das mit den unterschiedlichen Farben der einzelnen Track-Teilabschnitte finde ich sieht nicht sonderlich gut auf der Karte aus.
Aber Du schreibst: “Ansonsten Wegpunkte anlegen.”
Kann man also Wegpunkte aus einer gpx-Datei auslesen und diese in der Map darstellen? Also die <wpt> Tags einer gpx-Datei auslesen und verarbeiten mit shortcodes?
P.S.: Die gpx Schema-Beispiele stammen von ChatGPT ??<?xml version="1.0" encoding="UTF-8"?> <gpx version="1.1" xmlns="https://www.topografix.com/GPX/1/1"> <metadata> <name>Wanderung im Wald</name> <desc>Eine Wanderung durch den Wald</desc> <author> <name>Max Mustermann</name> <email>[email protected]</email> </author> </metadata> <trk> <name>Weg durch den Wald</name> <desc>Ein Wanderweg durch den Wald</desc> <trkseg> <trkpt lat="51.123456" lon="7.654321"> <ele>300</ele> <time>2023-09-08T10:00:00Z</time> </trkpt> <trkpt lat="51.123789" lon="7.654987"> <ele>310</ele> <time>2023-09-08T10:15:00Z</time> </trkpt> <trkpt lat="51.124567" lon="7.655432"> <ele>320</ele> <time>2023-09-08T10:30:00Z</time> </trkpt> </trkseg> </trk> <wpt lat="51.123456" lon="7.654321"> <name>Startpunkt</name> <desc>Der Startpunkt der Wanderung</desc> </wpt> <wpt lat="51.124567" lon="7.655432"> <name>Wegkreuzung</name> <desc>Eine Wegkreuzung im Wald</desc> </wpt> <wpt lat="51.125678" lon="7.656543"> <name>Endpunkt</name> <desc>Der Endpunkt der Wanderung</desc> </wpt> </gpx>
Forum: Plugins
In reply to: [Leaflet Map] gpx-track from URL: Show single waypointsOr would it be possible to show the time and date (<time> tag) from the <trkpt>container loaded from the gpx-file for each Wayoint in the map (or even better the description <desc> tag within the <trkpt>container?
<?xml version="1.0" encoding="UTF-8"?> <gpx version="1.1" xmlns="https://www.topografix.com/GPX/1/1"> <trk> <name>Meine Wanderung</name> <trkseg> <trkpt lat="48.858844" lon="2.294351"> <ele>40.0</ele> <time>2023-09-08T10:00:00Z</time> <desc>Eiffel Tower</desc> </trkpt> <trkpt lat="48.860642" lon="2.337163"> <ele>45.0</ele> <time>2023-09-08T10:30:00Z</time> <desc>Louvre Museum</desc> </trkpt> <!-- Weitere Punkte hier --> </trkseg> </trk> </gpx>
Forum: Plugins
In reply to: [Leaflet Map] gpx-track from URL: Show single waypointsok thank you, got it.
So therefore no change to make a small dot on each trackpoint (trkpt)?
Im my usecase as a offshore sailing yacht I am i.e traveling from Spanish Coast to Mallorca. Every 15 minutes the router on board of my yacht tries to transmit a GPS position to my webserver and writes this as a trackpoint (trkpt) into the above mentioned gpx file.
To get an immeadiate feeling within the shown map if the blue track was the really sailed track or only the connection between the both last trackpoint′s (trkpt), a small dot in the same color of the track line would be really great.
Because it can happen that for a long distance there is no trackpoint (trkpt) received and not written into the gpx file due to missing 4G signal. Showing a small dot on each trackpoint (trkpt) would solve this making it easy for the user watching the map to identify this.- This reply was modified 1 year, 6 months ago by dosheimer.
Forum: Plugins
In reply to: [Leaflet Map] gpx-track from URL: Show single waypointsHi Hupe,
the file example from my post is the one shown in the shortcut-notes of the leaflet wordpress plugin.
Here is the code I am using:
[leaflet-map fitbounds zoomcontrol]
[leaflet-kml src=https://www…….de/…./current-position.kml]
[leaflet-gpx src=https://www……de/…./track.gpx color=blue circleMarker]
[fullscreen]
But the “circleMarker” seems not working: The track is shown, but there is nothing shown on the map at each waypoint of the track (at each GPS coordinate coming from the .gpx file).
Any idea?Forum: Plugins
In reply to: [Leaflet Map] gpx file track not shownI just tried more around with the min/max and standard zoomlevels in the Plugin settings. I did not really got behind the idea, but anyway it is working now in an acceptable way.
Many many thanks for your kind support!Forum: Plugins
In reply to: [Leaflet Map] gpx file track not showni tried, not getting better.
Forum: Plugins
In reply to: [Leaflet Map] gpx file track not shownThanks. Now I changed to standard zoom level 19 in the “Leaflet Map” wordpress plugin settings.
But unfortunately the map is not reacting on that.
Any further ideas?
By the way: I found a way to execute php code within a wordpress page. So just in case you would have a suggestion to change this zoom level via php code I could give it at least a try.
And yes, I am using openstreetmap.org for the maps- This reply was modified 1 year, 6 months ago by dosheimer.
Forum: Plugins
In reply to: [Leaflet Map] gpx file track not shownThank you for this.
I am using the map for my offshore sailing adventures. I just reduced the gpx track file to be only for 2 weeks in the past by a cron job and php. So I can live with the issue that the map currently centers the map it seems more or less in the middle of the track (?).
But now another issue occured: When I am not moving the boat, the track of cause is very close to the boat. And then the map is zooming heavily into the map. This generlly is no problem, but the map is no more shown, it is gray. If I then zoom out a bit the map is shown again.
So it seems to be some kind of overzoom.
Is there a chance to set a zoom level manually by using shortcode in this context? That′s my current shortcode:
—————-
[leaflet-map fitbounds zoomcontrol detect-retina][leaflet-kml src=https://www……/……/current-position.kml]
[leaflet-gpx src=https://www……../……/track.gpx color=blue]
————-- This reply was modified 1 year, 6 months ago by dosheimer.
Forum: Plugins
In reply to: [Leaflet Map] gpx file track not shownThat′s what I have so far, but the map is not centered around the marker from the kml file.
[leaflet-map fitbounds][leaflet-gpx src=https://www……/…./test-track.gpx color=blue]
[leaflet-kml src=https://www……/…../current-position.kml]
Forum: Plugins
In reply to: [Leaflet Map] gpx file track not shownhm shit, I only have basic php knowledge.
So I ws thinking to write the youngest GPS position into another file, this time into a .kml instead of a .gpx file. As this is what I can do in php.
Then I would use something like this:
[leaflet-kml src=https://www………./…./current-position.kml fillColor=red color=white]
This seems to work fine: The track from the gpx-file is being shown and also the current position marker from the kml file. But how do I center the map around this kml current position marker?Forum: Plugins
In reply to: [Leaflet Map] gpx file track not shownHi! Thanks for response.
It was a CORS problem. Moving the gpx file onto the same domain solved it. The track is being shown now, very nice.
Is there a way to show the youngest waypoint within the gpx file as a marker on the map (to show this as the current location)?- This reply was modified 1 year, 6 months ago by dosheimer.