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

Hi to all,

I need to fit the whole world in a screen like as image1.alt text

I have tried as map.fitWorld().zoomIn(), But it shows some extra location(area) like as image2.alt text

Also tried as noWrap:true , It shows single map correclty, But the alignment not good in min zoom levels, refer image3 alt text

Kindly help me to show whole world image only in a screen.

EDIT:

tileSize : 300

alt text

asked 24 Aug '15, 11:07

Rajavelu_M's gravatar image

Rajavelu_M
253454858
accept rate: 33%

edited 25 Aug '15, 06:38


In web Mercator projection the world is square, sorry.....

or put different: either you need a different monitor, or you will have to use a custom projection (which will likely not work very well).

permanent link

answered 24 Aug '15, 19:47

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

edited 24 Aug '15, 19:49

@SimonPoole : Thanks for your suggestion. What about tileSize property? I increased tile size 256 to 300. But some part of map not shown.(screenshot added above)

(25 Aug '15, 06:35) Rajavelu_M

Both the projected globe and the tiles are square (-> w:h=1) in standard web Mercator projection. Most screens and therefore windows shown on them are rectangular, typically with a width to height ratio between 4:3 and 16:9. To fit the world seemlessly in to such a window you either need to distort the tiles horizontally or use a projection that fits better.

See http://www.progonos.com/furuti/MapProj/Dither/TOC/cartTOC.html , https://en.wikipedia.org/wiki/Map_projection , https://en.wikipedia.org/wiki/Map_projection ,

(26 Aug '15, 08:21) SimonPoole ♦
Your answer
toggle preview

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:

×362
×341
×74
×15
×9

question asked: 24 Aug '15, 11:07

question was seen: 20,900 times

last updated: 26 Aug '15, 08:21

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