Here’s a map showing my route around the streets of Chelsea and Battersea at last night’s SLOW street-race:
My GPS didn’t acquire a good signal for the first couple of km, so I recreated my route using the following:
- Using Bike Route Toaster I drew my course out. Important – the Data setting *must* be first set to “OSM”, to ensure you don’t inadvertently introduce copyrighted mapping data to the OSM project. You will probably also want to set the By setting to “Foot”, the map view at the top to “Street”, and toggle on/off the Auto-Routing option when you encounter paths not on the map.
- I then downloaded it as a GPX file, using the link on the website in the Download panel.
- I uploaded the GPX file as a trace into the OpenStreetMap project’s website (you need to be logged in to do this) and marked it as a public trace. The resulting tracklog number was noted down.
- I went to OJW’s Static Maps website and set up the map, panning, zooming and resizing it as appropriate, entering the tracklog number, and adding a point to show the start/finish.
- I copied the resulting image URL onto my website. As it’s just an image, no fiddling around with Javascript is needed.
One caveat is that the trackpoints only appear where you pass junctions or other nodes on the OSM mapping data – the Static Maps process doesn’t join the dots.
An easier process is to use the OSM WordPress plugin – if you have it, and WordPress, and don’t mind having a dynamic map in your post:
[osm_map lat=”51.483″ long=”-0.163″ zoom=”14″ width=”420″ height=”500″ marker=”51.49,-0.151″ gpx_file=”/files/2009/10/542876.gpx” marker_name=”camping.png” type=”OS1″]
(N.B. I’ve hacked the plugin to pull in map images from the new OOC OSM server of historic Ordnance Survey maps.)
3 replies on “Static Street-O Routemaps with OSM”
Displaying external maps became part of WordPress OpenstreetMap Plugin Version 0.8.6. If you copied private files (gpx, txt, png, …) to the osm plugin folder you have to upgrade manually, as “upgrade automatically” will delete your osm folder (including all the files inside) before installing the new version.
Looking forward to it!
There will be a new version of the Wordpres OpenStreetMap plugin in November. Loading maps from individual servers by tag will be one of the new features.
This should replace your hack 😉