Why not ask your question on the new OpenStreetMap Community Forum?


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
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 ♦
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
Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 27 Aug '22, 09:22

question was seen: 987 times

last updated: 08 Sep '22, 09:59

powered by OSQA