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


Hi, I have installed OSM server on Ubuntu. Now I want to use it in my applications. I want to use my local OSM server for map and not Openstreet map server.

How do I serve the tiles? Any sample HTML code? I have tried code where it is referring to Openstreet map server on How do I change it to refer to localhost server?

asked 09 Oct '11, 11:49

Reshma%20Maner's gravatar image

Reshma Maner
accept rate: 0%

edited 11 Oct '11, 13:10

Jonas_'s gravatar image


To get your own map tile server, you want OSM in a Box - it does all the hard integration work for you :

  • Configures PostgreSQL/PostGIS server
  • Creates an empty database with geospatial features - keeps all attributes in hstore
  • Configures GeoServer and tries to keep osm2gis-configuration consistent with GeoServer styling rules
  • Loads OSM data into the database
  • Incrementally updates the database
  • Produces nice maps (tiles and cached through GeoWebCache)
permanent link
This answer is marked "community wiki".

answered 17 Nov '11, 15:35

Jean_Marc%20Liotier's gravatar image

Jean_Marc Li...
accept rate: 0%

edited 17 Nov '11, 15:36

You can start with the OpenLayers simple example.

Note the section for "Other tile sets". You have to add this code to the layer definition section, instead of the two lines for Mapnik:

var newLayer = new OpenLayers.Layer.OSM("New Layer", "URL_TO_TILES/${z}/${x}/${y}.png", {numZoomLevels: 19});

Just change the URL to the directory where your tiles are, and the zoom levels to how many you have. Then open it in your browser, and it should be showing your local tiles.

permanent link

answered 09 Oct '11, 12:45

Vclaw's gravatar image

accept rate: 22%

hi, Thanks for the input. I have tried it with a single layer world tile. It is working. Now, I want to make india map tiles. Pls tell me how can I do it? I want to use India map from my server, not thro server

(11 Oct '11, 08:08) Reshma Maner

Hi Reshma, when you have a chain of questions that go deeper in detail with each answer, you should better ask at or one of the mailing lists ... maybe there you can get detailed answers beyond any FAQ like this site is.

(11 Oct '11, 16:38) stephan75

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 09 Oct '11, 11:49

question was seen: 15,082 times

last updated: 17 Nov '11, 15:36

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