This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Setting up OSM on my web site

0

Hello experts, sorry my English. I need your help, i have web hosting from justhost.com and now I want to display an OSM map on my web site.

How about MySQL, PHP 5. Do I need these?

asked 19 Nov '12, 07:11

Altai's gravatar image

Altai
7334
accept rate: 0%

edited 19 Nov '12, 09:26

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273


One Answer:

3

Displaying a web site that contains an OSM map does not require MySQL or PHP. You will only have to write a litte HTML and JavaScript.

See https://wiki.openstreetmap.org/wiki/Deploying_your_own_Slippy_Map for details, or look at http://switch2osm.org/using-tiles/ which has excellent examples for both the OpenLayers and the Leaflet library!

You can have it even easier if you go to www.openstreetmap.org, zoom to your area of interest, click the "export" tab, select "embeddable HTML", and copy+paste the resulting HTML code.

answered 19 Nov '12, 09:25

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Source code available on GitHub .