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.
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:
Other export formats and tools
- See OSM on Paper for another list of tools (including easy to use webinterfaces)
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.
|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.|
|GML||-||Instructions||You can then use OGR to convert the GML to other formats, e.g. shapefiles.|
|KML||-||Instructions||As used in Google Earth.|
|UI-View||-||Instructions||TAHO.EXE, easy to use|
|OBJ||-||OSM2World||Used for 3D modellers|
|POV||-||osm2pov, OSM2World||Used by POVRay|
|other formats...||-||See ||Various translator utilities - may be complex to install.|
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.
Remember data may only be exported from OpenStreetMap (in any format) in accordance with the OpenStreetMap License.