[OSM-talk] GPX on OSM slippymap?

Rejo Zenger osm-talk at subs.krikkit.nl
Mon Aug 10 15:32:34 BST 2009


++ 10/08/09 13:02 +0200 - Igor Brejc:
>Is there a way to display an uploaded GPX on the OSM slippymap?  
>Something similar to how you can highlight an OSM way, node or 
>relation: http://
>www.openstreetmap.org/?way=31904301
>
>I took some friends on a hiking tour and I wanted to send them a simple URL
>with the indicated track, since I've already uploaded the GPX for mapping
>purposes.

I have made a small script (based on the documentation on the wiki) that 
allows you to quickly render a GPX file on an OSM slippy map. 

To use this, append the URL to the GPX file at:

  https://rejo.zenger.nl/topo/osm/?fn=[url-to-gpx-file]

That's it. 

For example:

  <https://rejo.zenger.nl/topo/osm/?fn=http://insecure.rejo.zenger.nl/gps/2009-04-18.gpx>

If that works and you want to include it into some webpage, use:

  <iframe src="https://rejo.zenger.nl/topo/osm/?fn=[url-of-track]" 
  width="[width-of-embedded-image]" height="[height-of-embedded-image]" 
  frameborder="0"></iframe>

You may add some variables to the URL which adjust the rendering of the 
GPX track on the Openstreetmap. By adding "&sc=black&sw=10&so=0.4" you 
would set the track to appear as a thick black and highly transparant, 
where the default is a medium thick, red and half-transparant line.

There is some more information at:

  <https://rejo.zenger.nl/topo/embed-osm-and-track-in-webpage.php>

And there is some background information at:

  <https://rejo.zenger.nl/topo/howto-deploy-your-own-osm-slippy-map.php>


-- 
Rejo Zenger . <rejo at zenger.nl> . 0x21DBEFD4 . <https://rejo.zenger.nl>
GPG encrypted e-mail prefered. 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20090810/3c31bab3/attachment.pgp>


More information about the talk mailing list