从cloudmade下载图块时出现问题
我需要下载指定区域的图块。我有一个带有纬度/经度坐标的 bbox,但是如何将它们转换为 URL 所需的 x/y
I need download tiles for specified area. I have a bbox with lat/long coordinates, but how convert them to x/y which are required by URL
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要计算出给定纬度和经度所需的图块,您首先需要选择您感兴趣的缩放级别。然后计算:
注意:ln 代表自然对数
对 xtile 和 ytile 进行向下舍入以获得整数图块编号。
如果您需要走另一条路:
这应该足以让您启动并运行。要获得任何 CloudMade API 的帮助并了解我们的最新版本,请查看开发人员邮件列表。
To work out which tile you need for a given latitude and longitude, you first need to pick a zoom level that you're interested in. Then calculate:
Note: ln stands for natural logarithm
round down xtile and ytile to get the integer tile numbers.
If you need to go the other way:
That should be enough to get you up and running. To get help with any of CloudMade's APIs and to keep up-to-date with our latest releases, take a look at the developers mailing list.