如何在Leaflet.js的文件系统中存储图块 [英] How to store image tiles in file system for leaflet.js
问题描述
我有一个链接,该链接试图解释如何在文件系统中存储图像切片,但对我来说不是很清楚.这是网址 http://build-failed.blogspot.in/2012/11/zoomable-image-with-leaflet.html
i got a link which try to explain how to store image tiles in file system but not very clear to me. here is the url http://build-failed.blogspot.in/2012/11/zoomable-image-with-leaflet.html
只需查看此图像
刚刚看到已根据图像创建了许多子文件夹,但不了解它们试图用箭头图像指出什么?
just seen many sub folder has been created as per image but do not understand what they try to point out with arrow images ?
此eso / «z» / «x» / «y».jpg
与images文件夹结构如何相关?
1)为什么零文件夹被视为z?
2)为什么将父文件夹中名为零的一个子文件夹中的零和一个子文件夹视为x?
1)为什么将0.png和1.png图像视为y?
how this eso / «z» / «x» / «y».jpg
is related with images folder structure?
1) why zero folder is consider as z ?
2) why zero and one sub folder in parent folder called one is consider as x ?
1) why 0.png and 1.png images are consider as y ?
由于缺乏解释,上述三件事不清楚.那里是什么关系?
the above three things is not clear due to lack of explanation. what is the relation there ?
如果某人已经知道或确实了解,请与我分享知识.谢谢
if some one already knows it or do understand then please share the knowledge with me. thanks
推荐答案
好的,我会尝试解释.
第一个z =缩放级别,x =经度,y =纬度
First z = zoom level, x=longitude, y=latitude
经度和纬度不是从地图投影获得的真实值,而是网格索引.
Longitude and latitude are not real value taken from the map projection but grid indexes.
存储图块的方式如下:
- 第一个父文件夹:z(缩放级别)
- 子文件夹:在此缩放级别下全部为x
- 图像名称:在此x位置和此缩放级别上均为y
例如,如果要存储以下图块:/0/0/0.png
If you want to store for instance the following tile: /0/0/0.png
- 文件夹:0
- 子文件夹:0
- 0.png
在缩放级别0上,习惯上整个世界只有一个图块,因此只有一个子文件夹0(对于x)和一个图像0.png(对于y).在每个缩放级别,图像数量呈指数增长.
At zoom level 0, habitually there is only on tile for the whole world so only a subfolder 0 (for the x) and an image 0.png (for the y). At each zoom level the number of images increase exponentially.
对于/12/6/7.png
For the /12/6/7.png
- 文件夹:12
- 子文件夹:6
- 7.png
如果有不清楚的地方,随时询问更多细节.
Feel free to ask for more details if something is not clear.
这篇关于如何在Leaflet.js的文件系统中存储图块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!