如何使用Leaflet从数据库提供地图图块 [英] How TO serve Map tiles from a database using Leafletjs

查看:180
本文介绍了如何使用Leaflet从数据库提供地图图块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Leaflet js需要以下图块来源格式:

Leaflet js requires the following tile source format:

http:/ / localhost / tileserver / {z} / {x} / {y} .png

http://localhost/tileserver/{z}/{x}/{y}.png

如何从数据库使用Leafletjs
(和ASP.net)

How can I serve tile images from a database instead of file system using Leafletjs (and ASP.net)

推荐答案

您需要编写一个服务器应用程序读取请求网址,从数据库中提取图块,并通过网络传送。 JavaScript不会直接从数据库读取。

You'll need to write a server application that reads a request URL, pulls tiles out of a database, and delivers them over the web. JavaScript does not read directly from databases.

这篇关于如何使用Leaflet从数据库提供地图图块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆