Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: import gpx files as route. #176

Open
zege-at opened this issue Aug 7, 2020 · 7 comments
Open

Feature request: import gpx files as route. #176

zege-at opened this issue Aug 7, 2020 · 7 comments
Assignees
Labels

Comments

@zege-at
Copy link

zege-at commented Aug 7, 2020

It would be great if Maps2 could use gpx files to display a track on a map.

@froemken
Copy link
Contributor

froemken commented Aug 7, 2020

Hello, @zege-at

currently I don't see that we will implement that. I can't find an Google Maps API call to import them. Sure, there are some Plugins and other foreign Libs, but I don't see anything of Google Maps itself.

Maybe you have any links of Google Maps to do so with internal API.

Stefan

@zege-at
Copy link
Author

zege-at commented Aug 10, 2020

Hi,

I don't know how the maps2 route records are stored, but I think they might not be that different from gpx files. So maybe it is possible to convert gpx to maps2 route records?

@froemken
Copy link
Contributor

Can you please add a GPX file to this ticket?

In maps2 each Coord of a route and path will be saved individually in tx_maps2_domain_model_poi. So, if a path has 26 corners (Coords) you will have 26 records in poi table. So, we don't store the coords as JSON or XML structure.

Stefan

@zege-at
Copy link
Author

zege-at commented Aug 10, 2020

Hi Stefan,

gpx is a xml with Waypoints, Routes and Tracks. Waypoints are in a <wpt> tag. Tracks and Routes are a list of ordered Points (<trkpt> or <rtept>) wrapped with a <trk> or <rte> tag. Tracks can be split in Tracksegments. So i think it may be not too hard to select a gpx file when creating a new record and save it in your database format.

All points can have additional Info like elevation, name, symbol, etc.

English Wikipedia is not very helpful, but German Wikipedia is https://de.wikipedia.org/wiki/GPS_Exchange_Format
Also helpful is the official gpx website: https://www.topografix.com/gpx.asp

Waypoint example:
<wpt lat="44.0848164" lon="7.784703">
<ele>1264.9</ele>
<name>Colle San Bernardo di Mendatica</name>
<sym>https://www.gstatic.com/mapspro/images/stock/503-wht-blank_maps.png</sym>
</wpt>

Limone - San Remo.gpx.txt

@zege-at
Copy link
Author

zege-at commented Aug 10, 2020

i also found an extension for displaying gpx in typo3 not available in TER - https://github.com/zeichensatz/wok_gpxviewer - which uses https://www.j-berkemeier.de/GPXViewer/ to display a map and the gpx file. Maybe this is helpful for implementation.

@zege-at
Copy link
Author

zege-at commented Aug 11, 2020

I did some more research. You are using leaflet to display openstreetmap. Maybe the easiest way to display gpx is using a leaflet plugin like https://github.com/mpetazzoni/leaflet-gpx and the original gpx file?

@froemken
Copy link
Contributor

froemken commented Mar 3, 2022

Any idea how to import that gpx file? Would be CLI enough? I think this importer is just for new records, but not existing ones, as we don't have a mapping between gpx records and poicollection records.

@froemken froemken self-assigned this Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants