Plugin Author
Joe
(@morehawes)
Hi @golf1025,
Thanks for reaching out. Unfortunately this is not currently possible, though I think it could be a nice feature to add in the future. This would be a fair bit of work to implement, though I like the idea of making it easier for people to import their data into Waymark.
Some questions:
- How many GPX files do you have stored that you want to import into Waymark?
- Are the GPX files currently listed the WordPress media library (i.e. WordPress is “aware” of the files), or are the files simple sitting in /uploads? (I was not able to successfully upload a GPX file in Lf hiker, so could not test).
- Do the files contain Tracks and Markers? Changing Types for these Overlays upon import might not be “smart” and could require manual work anyway.
Cheers,
Joe
Hi Joe,
Thanks for your swift reply. To answer your questions:
75 gpx files are in my /uploads directory
32 gpx files are in the Media library
18 maps were made with WayMark
Some maps created with other plug-ins do contain markers.
Each map containains a single track, though LFhiker plugin makes it possible to display multiple tracks on a single map, simply by adding a line for every track like:
[lfh-gpx src=https://jedeboer.nl/wp-content/uploads/2018/03/track_1.gpx]
[lfh-gpx src=https://jedeboer.nl/wp-content/uploads/2018/03/track_2.gpx]
[lfh-gpx src=https://jedeboer.nl/wp-content/uploads/2018/03/track_3.gpx]
I appreciate your point about having to add waypoints manualy, didn’t realise that.
I was thinking about a shortcode entry which points to the location of the gpx file
All the best from Holland!
Jan de Boer
Plugin Author
Joe
(@morehawes)
Hi @golf1025,
Thanks for the extra detail, I have spent some time on this and have come up with a working solution available here (Code > Download Zip to download).
The Shortcode accepts multiple files (GPX,KML & GeoJSON) like this (URLs separated with a comma):
[Waymark file_url="http://example.com/file_1.gpx,http://example.com/file_2.kml,http://example.com/file_3.geojson"]
By default, *all* Markers/Lines/Shapes will be displayed using the default Type (i.e. the first listed in Settings). You can specify a different Type to use like this:
[Waymark file_url="http://example.com/file_1.gpx" file_marker_type="photo" file_line_type="green" file_shape_type="blue"]
I hope you find this useful.
I STRONGLY suggest backing up your site before activating, especially on production sites. In order to install this version you will need to either manually install it, or use a plugin that allows you to upload it through WP Admin.
Cheers,
Joe
Hi Joe,
Great work! I tried it on https://jedeboer.nl/andaluzie/
You deserve a beer when in the Netherlands contact me, or tell me how to donate.
Best,
Jan
Hi Joe,
One more thought. Would it be possible to add maps thus created to the map list and give them a Waymark map ID. Thus all maps would be visible in one place..
Best,
Jan
Plugin Author
Joe
(@morehawes)
Hi Jan,
I’m glad that worked. I will add this feature to the next release 🙂
One more thought. Would it be possible to add maps thus created to the map list and give them a Waymark map ID. Thus all maps would be visible in one place..
I’m not sure I completely follow, could you elaborate?
If you are looking to group the GPX tracks then creating a Map and adding them through the Editor is probably the best way to go.
You could alternatively create individual Maps for each track and then group those using a Collection.
One day I would like to create an “Import” tool that could be used to batch-process files and provide options on how to import the data into Waymark. It’s on the list… but the list is long and features take time! :0)
Thanks for your input!
Joe
Hi Joe,
What I meant is that when I used the shortcode to point to the gpx in the /upload directory and created a map, it doesn’t automagically get a waymark map id and is not listed in the admin maps overview where all the maps are listed with their mpa-id’s.
I could send you a screenshot.
Best,
Jan
Plugin Author
Joe
(@morehawes)
Hi @golf1025,
Thanks for he extra detail, I think I understand now. Unfortunately the Shortcode can only be used to display Waymark content, not add it.
Thanks again for your input, please do let me know if you think of anything else.
Cheers,
Joe