When I rendered local OSM tiles for India data. It's showing the output as below. How can I change the zoom level![alt text][1] such that India map is show clearly.


Here's the link for image

asked 07 Jun '19, 12:14

Puranjay's gravatar image

accept rate: 0%

You load the tile /0/0/0.png. Tiles are sorted into folders and names like this: {z}/{x}/{y}.png. So if you change your query to /1/0/0.png you will go one zoom level up.

Maybe you are looking for a real frontend to draw a map and zoom with your mouse? Check out Leaflet or Open Layers. It's also documented on the swith2osm site you are following.

permanent link

answered 07 Jun '19, 12:35

TZorn's gravatar image

accept rate: 15%

So is there any way to figure out values of {X}, {y} and {z} to see entire map or it's just hit and trial.

(07 Jun '19, 12:40) Puranjay


I have changed url to 'localhost/hot/{z}/{x}/{y}.png' and some images are not loading as showing in console.

(07 Jun '19, 13:07) Puranjay

You might have hit a timeout if the tiles weren't already rendered. Try refreshing to see if they are now available.

(07 Jun '19, 13:31) EdLoach ♦

If you want to work out x, y and z values, see https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames

(07 Jun '19, 13:34) EdLoach ♦

In a comment on an answer to your other question, I mentioned that https://switch2osm.org/manually-building-a-tile-server-18-04-lts/ suggests "In order to see tiles, we’ll cheat and use an html file “sample_leaflet.html” in mod_tile’s “extras” folder".

That's an HTML file that uses Leaflet (a Javascript library) to fetch the appropriate tiles so that you can view a full map. It's probably the easiest way to achieve what you want, but it would help if you explained what you want a map for - do you want to embed something in a web site, print it out, something else?

permanent link

answered 07 Jun '19, 14:23

SomeoneElse's gravatar image

SomeoneElse ♦
accept rate: 16%

Your answer
toggle preview

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](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:


question asked: 07 Jun '19, 12:14

question was seen: 4,469 times

last updated: 07 Jun '19, 14:23

powered by OSQA