2006Scape Wiki:Map: Difference between revisions
Added extra documentation
scape_>Ralpha No edit summary |
scape_>Ralpha (Added extra documentation) |
||
Line 191: | Line 191: | ||
</gallery> | </gallery> | ||
These tiles are directly used by Leaflet to display the map. | These tiles are directly used by Leaflet to display the map. | ||
==== Layering Creation ==== | |||
[[File:OSRS_Layers_of_Map_creation_example.png|thumb|400px|Combining of tiles to create zoom layer 2 and 3 tiles and names]] | |||
Combining and splitting images for use in Leaflet we have different zoom levels: 3,2,1,0,-1,-2,-3 | |||
The map scales exponential (2^x) for each zoom level. This is the same as most [https://wiki.openstreetmap.org/wiki/Slippy_Map slippy map] systems / GIS systems. | |||
It comes down to, if you zoom in each tile splits into 4 pieces, if you zoom out each tile is a combination of 4 pieces. | |||
So zoom level 4 (400%) is created by splitting the image into (2^2)*(2^2)=16 images of 256x256 like this (but this is not used on our OSRS maps): | |||
<pre> | |||
0 1 2 3 | |||
4 5 6 7 | |||
8 9 10 11 | |||
12 13 14 15 | |||
</pre> | |||
At zoom level 3 (200%) is created by splitting the image into (2^1)*(2^1)=4 images of 256x256 like this: | |||
<pre> | |||
0 1 | |||
2 3 | |||
</pre> | |||
Zoom level 2 (100%) just the same image (2^0)*(2^0)=1 image. (that is why in the script zoom level 2 just copies all the images (that are in the range we are working on). This is the same size as a region in OSRS.<br/> | |||
Zoom level 1 (50%) is created by combining 4 images (128x128) to create a 256x256 image.<br/> | |||
Zoom level 0 (25%) is created by combining 16 images (64x64) to create a 256x256 image.<br/> | |||
...etc... | |||
=== RuneScape 3 === | === RuneScape 3 === |