Export
Contents |
'Export' tab
You can use the 'Export' tab on the main map display to carry out basic exports of map images or raw data of a particular area. The export tab allows selecting a bounding box, or by default simply takes the area of the map currently within view.
It offers the following output options:
OpenStreetMap XML Data
All the current raw OpenStreetMap data (Nodes, Ways, Relations and Tags) in an XML format. This is actually pointing your browser directly at the OpenStreetMap API to retrieve a bounding box of data (a map call). This has limitations in terms of the size and complexity of the data you can request. The XML data can be saved to a .osm file and filtered resp. opened within tools like Osmosis, osmfilter, or JOSM. To understand more about the XML format used, see Data Primitives.
Mapnik Image
Allows export of PNG, JPEG, SVG, PDF and PostScript maps in the OpenStreetMap Mapnik style (default layer of the map homepage)
Osmarender Image
Allows export of a map image in the style produced by tiles@home (Osmarender) This is using the MapOf service
Embeddable HTML
Creates HTML code which you can copy and paste to use on any web page elsewhere on the web. The HTML fragment will embed the current map within an iframe, complete with javascript slippy map interface.
If you prefer to place a static map image on your website, simply take a screenshot and save the image file, or look at using the MapOf service to embed one which will get updated.
Embeddable HTML with an added Marker
The steps to produce embeddable HTML with a marker to mark a specific location are as follows:
- Go to http://www.openstreetmap.org
- Navigate so that the view tab shows the area you are interested in
- Click on Export
- Fine tune the map view to ensure the area is still correct
- Click on the Embeddable HTML option under "Format to Export"
- Click on "Add a marker to the map"
- Click on the map where you want the marker to appear
- Copy the text in the box in the Output section which starts <iframe
NB: If you only want to send a hyperlink rather than embed the map somewhere, look near the end of the Output text for the bit that starts <a href=" and copy all the text before the next " - it should look something like:
http://www.openstreetmap.org/?lat=34.91015&lon=-85.1238&zoom=11&layers=B000FTFTT&mlat=34.92132&mlon=-85.11796
Note: If you want to add more than one marker you will need to use Openlayers - see in particular the POI Example and Dynamic POI Example.
Other export formats and tools
If you need a different format, see below. You will usually need to download the data you require as OpenStreetMap XML Data (.osm), either from the 'Export' tab (small areas) or Planet.osm (large areas), then use a translation program. Ready-made downloads are available for some formats.
| Format | Data download | Translator | Notes |
|---|---|---|---|
| SVG | - | Instructions | Maperitive can export to SVG |
| SVG (osmarender style) | - | Instructions | Requires you to set up Osmarender |
| Adobe Illustrator | - | Instructions | new web service at http://www.flosm.de/ai/ |
| Polish format | - | Instructions | Perl Script. It supports routing. |
| Garmin GPS | Downloads | Instructions | |
| GML | - | Instructions | You can then use OGR to convert the GML to other formats, e.g. shapefiles. |
| KML | - | Instructions | As used in Google Earth. |
| Manifold GIS | - | Instructions | |
| UI-View | - | Instructions | TAHO.EXE, easy to use |
| other formats... | - | See [1] | Various translator utilities - may be complex to install. |
OSM-3D http://www.osm-3d.org delivers OSM combined with SRTM as 3D scence in VRML format (Virtual Reality Modeling Language)
JavaScript API
If you want to use a Google Maps-like API to display OpenStreetMap on your website, you can use the "Export Tab" and then select the format "Embeddable HTML". You only need to copy the code in your html. See the example.
We also suggest you use OpenLayers or Mapstraction. See OpenLayers Simple Example, Openlayers POI layer example, Openlayers_Track_example, and the OpenLayers site for examples of how to do it.
Bulk downloads
To download large quantities of OpenStreetMap data, see Planet.osm. If you then want to create your own webmap from this, see Deploying your own Slippy Map for some pointers.
Remember data may only be exported from OpenStreetMap (in any format) in accordance with the OpenStreetMap License.