NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi,

I'm creating a website that uses OSM: https://www.marcopanichi.com/work/trasimenobike/trasimeno-bike-park/percorsi/

I would display on this map some GPX traces.

How to do this?

I read many times these threads but I'm really missing out the point :/ https://stackoverflow.com/questions/23654251/draw-path-in-openstreetmap https://forum.openstreetmap.org/viewtopic.php?id=63585

asked 27 Aug '22, 09:22

Marco%20Panichi's gravatar image

Marco Panichi
26113
accept rate: 0%


You are using the Leaflet library to display your map. You will have to create one or more additional layers in Leaflet showing your GPX track. Leaflet cannot show GPX tracks out of the box; you will either have to convert them a to GeoJSON (for example with the Open Source software QGIS), or you will have to install a Leaflet plugin that makes it possible to read GPX directly into Leaflet.

permanent link

answered 27 Aug '22, 11:28

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Ok thank you :)

I've converted my GPX into GeoJSON format with this tool: https://mygeodata.cloud/converter/gpx-to-geojson

I've got many files:

  • route_points.geojson
  • routes.geojson
  • track_points.geojson
  • tracks.geojson
  • waypoints.geojson

Now, the question is: how to show these layers(?) into my map?

(08 Sep '22, 09:11) Marco Panichi

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×255

question asked: 27 Aug '22, 09:22

question was seen: 1,685 times

last updated: 08 Sep '22, 09:59

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum