• Hello,

    I use OSM to display maps of hikes I’ve done. I love it so far but couldn’t figure out how to:
    – draw the entire hike on the map
    – add several marker on the map

    Here is an example of the type of mapping I’d like to do (scrolling a bit down the page you could see the OSM map with a drawing of the entire hike on it): https://www.trailhiking.com.au/cradle-mountain-summit/

    After some research it seems something else needs to be installed/paired with the OSM plugin to achieve this but I kind of struggle to get it done/how to start as it looks pretty hard.

    Note: the link of the page I need help with (my blog) is an example (you can find the map used when scrolling down a bit). It’s in French but only the map matters so it should be fine).

    Let me know if any questions or if unclear!

    Thanks,
    Mika

    • This topic was modified 4 years, 3 months ago by mika33.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author MiKa

    (@photoweblog)

    Hello Mika,

    if you want to show a track / route in your map you have to provide the information for this route in a GPX or KML file. There are some devices which can record this GPS information and export such a file. And there are some tools to create such a file online or with an application on your computer. You find a list of it here:

    https://wiki.openstreetmap.org/wiki/Track_drawing_websites

    Once your route is stored in a GPX or KML file you can simply add it to the OSM Plugin …

    https://wp-osm-plugin.hanblog.net/examples/display-kml-file/

    Br, MiKa

    Thread Starter mika33

    (@mika33)

    Thank you MiKa, that’s very helpful.

    I’ve tried a few things but ended being blocked when uploading the gpx/kml to wordpress (I’ve tried both). It says “this type of files is not allowed for security reasons”. In the past some security plugins prevented me to do few things but I tried de-activating them and that’ still not uploading the file.

    I created gpx/kml via https://www.gaiagps.com/.

    Would you know how to overcome this issue?

    Thanks,
    Mika

    I always upload my gpx tracks using FTP client into a directory on the web server NOT through the WordPress Media Library. When I 1st started using OSM (ages ago – it’s so good I’ve stuck with it) I never managed but FTP to a directory is easy and works and I can’t see any benefit from loading the gpx tracks into WordPress Media Library.

    One other thing I’ve noticed where you are using a single map showing an extended multi-day trip (multiple gpx tracks): I go on several month long cycle tours. Each day log post has a map for that day (easy, single gpx track) but I also build-up a total trip map which whilst travelling ends-up with more than 60 gpx tracks. This “combined” total trip map can become slow to load – nothing to do with OSM but because it has to open and load more than 60 different gpx tracks. Once home I create a single (larg) gpx track with combines the individual tracks and it all runs much smoother and faster. Not an issue for a few tracks but for longer trips when convenient combining helps – again nothing to do with OSM just that lots of small individual files is slower than one larger combined file.

    Thread Starter mika33

    (@mika33)

    Thank you Psamathe for your help.

    I’ve looked at what you said (I didn’t get it all at first so had to do some search – sorry kind of new to this). It seems I’ll need to install a FTP client to do that, would you have any recommendation on which one to use (free one if possible).

    Once installed, what’s the process like to upload as I never did it and don’t want to get stuck if too complex!

    Thanks a lot,
    Mika

    Sorry but I can’t offer much advice as a lot depends on what you are using (Windows, Mac, iDevice, Android device, etc.). Plus some FTP clients are techy oriented whilst others have lower functionality but are less “techy”.

    It is a bit more “techy” in that you’ll have to create directories (normally under wp-content) and work out the relative path to reference the gpx file in the shortcode.

    I’m Mac/iDevice based and I use Transmit FTP client (which is pricey and if choosing again now I’d chose something better). Also, Transmit on iDevices is actually no longer available (but is there for people who purchased it before it was discontinued).

    Also, FTP clients are a bit like Windows Explorer/macOS Finder – you can delete files as well as upload, copy, etc. and deleting the wrong file can have impacts! etc. and they will give you access to all the WordPress core files, plug-in files, theme files, etc.

    Thread Starter mika33

    (@mika33)

    Thqnk you Psamathe! That seems relatively complex for the use I’ll make of it so would ideally find another way. But thanks a lot for helping out on this.

    @photoweblog would you have any recommendation based on the issue encountered while uploading the gpx file onto WordPress by any chance?

    • This reply was modified 4 years, 2 months ago by mika33.
    Plugin Author MiKa

    (@photoweblog)

    Hello @mika33

    my recommendation follows the idea of @psamathe . We also use FTP to save all our map data, like GPX or KML in a folder within

    ./wp-content/uploads/

    This way the address for the KML files is always the same, just the filename differs.

    One common free client is:

    https://filezilla-project.org/

    You have to get the ftp login information from your host and it’s easy to handle. You can also overwrite files to modify data and so on …. I am using Linux where you simple can use the filebrowser for ftp access.

    Br, MiKa

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Drawing parth of a hike on OSM’ is closed to new replies.