NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

The .osm File is a XML file, I want to know whether there is a tool to show the .osm on my own website or i have decode the .osm file by myself.

Thanks

asked 20 Mar '11, 22:07

monument's gravatar image

monument
69567
accept rate: 0%


To view an .osm file you first have to render it using a renderer. If you are not not happy with just a dead picture of the map then you may also need some kind of slippy map implementation, like OpenLayers.

You will probably get a more specific answer from someone if you describe more in detail what kind of map you would like to put on your website.

permanent link

answered 20 Mar '11, 22:19

gnurk's gravatar image

gnurk
6.1k106096
accept rate: 15%

Thanks a lot i want to implement some kind of slippy map, not the dead one, i have got a .osm file and already tagged it. i want the user to choose two points on the map and the website will show the best path that is calculated by some algorithm ,i have finished the algorithm and tagged the .osm map. Now i just want to fix the map with my algorithm (maybe by javascript),i can handle this by myself. But i don't know how to show the .osm map on my own website, i mean i don't know how to decode the osm map with xml format.

(20 Mar '11, 22:47) monument
2

If you want to compute the best path between two points you will need to read the data with your program. There are of course XML libraries that make it easier but you will still have to process the file yourself. - If you only want to show the .osm file then you can use OpenLayers' OSM Layer.

(20 Mar '11, 23:22) Frederik Ramm ♦

can you tell what are the libraries? or give me the link. i am not very clear with " you will need to read the data with your program". can you give me some more detail? Thank a lot

(20 Mar '11, 23:52) monument

If you want a slippy map you should have a look at http://www.openlayers.org/. Normally it you feed tiles to it but it has some support for the XML based .osm file format.

(22 Mar '11, 10:29) petschge

what programming language are you using? that is important for choosing the best XML-Processing-Lib

(22 Mar '11, 10:42) josias

Follow this question

By Email:

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

By RSS:

Answers

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:

×111

question asked: 20 Mar '11, 22:07

question was seen: 7,534 times

last updated: 22 Mar '11, 10:42

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum