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

What is the best way to download the tiles, I tried to download a specific region using XAPI, for example:, 48.14,11.543,48.145 but I could not download. I need to download the maps rendered to load on my database for use with Open Layers.

asked 16 Jul '10, 06:42

leo2gz's gravatar image

accept rate: 0%

retagged 13 Nov '10, 17:02

Breki's gravatar image


This question is very confused - you ask about downloading tiles which implies that you're talking about rendered maps but then start talking about using XAPI which will give you raw data.

(16 Jul '10, 13:31) TomH ♦♦

The XAPI can serve you the raw OSM data in XML format. That means that the data is NOT in any image format that you can easily view.

Rendering of rendered image tiles is possible. If you want to use the tiles from the main slippy map which are rendered with mapnik you need to read, understand and follow The tiles from the tiles@home layer rendered with osmarender are not limited in this way as they are preprendered.

Other tile provider like cloudmade, cyclemap or other have their own usage policies, so if you want to use them you have to find out yourself what kind of usage is acceptable. Please understand that this is not a arbittrary restriction to annoy you, but many map, especially special topic maps, are produced on donated hardware with limited resources and simply can't produce the tiles fast enough to feed large batch downloads.

Note that rendered images are (normally) not stored in a database but directly in a set of folders on your harddisk. A database is only used if you want fast access to raw OSM data. In that case you can load the OpenStreetMap data obtained in XML format into a database with a suitable structure.

And a last remark: If you only want to create a website with openlayers you don't necessarily need to host the image tiles yourself. You can point your openlayers installation at the regular tiles servers. As long as the visitor of your website dont create hundreds of requests per second to the tile servers, nobody will object to this usage.

permanent link

answered 16 Jul '10, 06:58

petschge's gravatar image

accept rate: 21%

So if i want to load the OSM data (xml format) in my Database. then i have to render with mapnik or osmarender?

(16 Jul '10, 07:12) leo2gz

If you want to render the data yourself using Mapnik you should probably load the data into a database, yes. Mapnik can render the data straight from a file too, but the standard OSM stylesheet doesn't handle the case. So unless you want to write your own stylesheet from scratch loading the data into a DB using osm2pgsql.

Osmarender renders OSM data straight from the OSM data in XML format. However you should not feed it the whole world in one big file.

As I don't know how large a region you want to render and how often you want to update it, it's hard to give precise advice.

(16 Jul '10, 07:44) petschge

I would only be needed on a city map to trace the routes of transport. How could I do that.

(16 Jul '10, 17:26) leo2gz

Do you only need a single map of the whole city or do you need tiles (portions of the city at different zoomlevel) so you can pan and zoom on your website?

(16 Jul '10, 18:04) petschge

I need a map of a city but with Different zoomlevel (tiles), pan and zoom on my website. for example OSM transport. How could I work with the maps?

(16 Jul '10, 18:48) leo2gz

In that case you want to make the mapdisplay using openlayers. Either feed it with the standard tiles and overlay a vector layer, or render you own tiles. For that you can use mapnik or osmarender. Osmarender will be more fiddling with small programms and tool, mapnik will need a database filled with the data for that city. Read up on both in the wiki and then ask more specific questions.

I probably wont answer with more details as we are drifting away from the orginal question.

(16 Jul '10, 19:11) petschge
showing 5 of 6 show 1 more comments

the xapi is AFAIK only for the data... so it doesn't serve the tiles... if you want to hav the tiles you have to render the data.

if you mean: how can I download the regional data: maybe that helps:

permanent link

answered 16 Jul '10, 06:58

josias's gravatar image

accept rate: 33%

One way is to use Maperitive. Steps:

  1. Download OSM data from XAPI (using the download-osm command). Or, if you already have an OSM XML file, load it using the load-source command.
  2. Turn off the existing Web map layer (click on the yellow star in the bottom right corner).
  3. Generate tiles using the generate-tiles command.

The generated tiles are OpenLayers-compatible.

permanent link

answered 13 Nov '10, 17:08

Breki's gravatar image

accept rate: 10%

@Vclaw: if you vote down answers, at least provide a reason for doing so.

(14 Nov '10, 07:07) Breki

Hello this is shushak.....

Thanks for your great answers.....

but my problem is something different... i am able to generate tiles from .osm files.... but i want to generate tiles of my own country because world tiles generation takes very long time..... bu when i try to generate tiles of my country using coordinates(bbox) & my country .osm file.... it generate empty tiles for rest of the world which takes same time as planet.osm takes....

Is there any way to generate tiles of my own country with leaving empty tiles....

I am also found another way to download tiles but due to slow net connection this method also fails....

I there any way to do that plz tell me i want to learn this....

sorry for any grammatical or spelling mistake i am a new baby... thanks to you for showing interest

permanent link

answered 11 Nov '10, 08:25

Shushank%20Sharma's gravatar image

Shushank Sharma
accept rate: 0%

This is a separate question and you should post it as such, rather than piggybacking onto the end of someone else's question.

(11 Nov '10, 12:06) Richard ♦

Shushank, you can ask your new questions maybe better at

(11 Nov '10, 16:56) stephan75

Why downloading tiles, if you can easily render your map from original osm data with TopoMapCreator?

ExtendedMapCreator is a Desktop-Program, that creates "Topographic Maps" from OSM, NASA and ESA. You simply define a map extent by dragging over a browsable word map, click on start and wait till the GeoTIFF, ECW, GALILEO, ORUXMAPS or NAVIMAP files got created. ExtendedMapCreator is based on the Mapnik-Renderer, nevertheless all data downloading and processing is fully automatic.

permanent link

answered 01 Nov '14, 10:16

kaki007's gravatar image

accept rate: 0%

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: 16 Jul '10, 06:42

question was seen: 25,755 times

last updated: 11 Oct '18, 19:04

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