Configuration 如何配置mapcache以缓存来自tms服务的磁贴
我有一个服务器上带有mapcache的mapserver 我知道如何将mapcache配置为缓存wms服务中的磁贴 但是我在任何地方都找不到如何配置mapcache来缓存来自TMS服务的磁贴(openstreetmap https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png) 在mapcache页面上说 “服务WMS、WMTS、TMS、VirtualEarth/Bing和Google地图请求:支持的磁贴服务” 我看到下面这行了 " 要激活TMS服务,请将以下行添加到mapcache.xml配置文件:Configuration 如何配置mapcache以缓存来自tms服务的磁贴,configuration,tms,Configuration,Tms,我有一个服务器上带有mapcache的mapserver 我知道如何将mapcache配置为缓存wms服务中的磁贴 但是我在任何地方都找不到如何配置mapcache来缓存来自TMS服务的磁贴(openstreetmap https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png) 在mapcache页面上说 “服务WMS、WMTS、TMS、VirtualEarth/Bing和Google地图请求:支持的磁贴服务” 我看到下面这行了 " 要激活TMS服务,
"
但是,客户机从mapcache获取tms磁贴,而不是mapcache从tms服务获取磁贴
我不知道这是否可能,因为我没有找到任何例子
从WMS获得上述信息
<source name="name1" type="wms">
<getmap>
<params>
<LAYERS>layer1</LAYERS>
</params>
</getmap>
<http>
<url>http://an_rul.com/ows/name1</url>
</http>
</source>
<tileset name="name1">
<source>name1</source>
<cache>disk</cache>
<grid>GoogleMapsCompatible</grid>
<format>PNG</format>
<metatile>5 5</metatile>
<metabuffer>10</metabuffer>
<expires>3600</expires>
</tileset>
<service type="wms" enabled="true">
<full_wms>assemble</full_wms>
<resample_mode>bilinear</resample_mode>
<format>PNG</format>
<maxsize>4096</maxsize>
<forwarding_rule name="catch all">
<http>
<url>http://an_rul.com/ows/name1</url>
</http>
</forwarding_rule>
</service>
<service type="tms" enabled="true"/>
第1层
http://an_rul.com/ows/name1
名称1
磁盘
谷歌地图兼容
巴布亚新几内亚
5 5
10
3600
集合
双线性
巴布亚新几内亚
4096
http://an_rul.com/ows/name1
对于TMS,我想要这种东西
<source name="name1" type="tms"> <-- note the tms type i'd like
<getmap>
<params>
<LAYERS>layer1 ?</LAYERS> <-- what layer can I put there ?
</params>
</getmap>
<http>
<url>https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png ??</url> <-- which url should I write ??
</http>
</source>
<tileset name="name1">
<source>name1</source>
<cache>disk</cache>
<grid>GoogleMapsCompatible</grid>
<format>PNG</format>
<metatile>5 5</metatile>
<metabuffer>10</metabuffer>
<expires>3600</expires>
</tileset>
<service type="wms" enabled="true">
<full_wms>assemble</full_wms>
<resample_mode>bilinear</resample_mode>
<format>PNG</format>
<maxsize>4096</maxsize>
<forwarding_rule name="catch all">
<http>
<url>http://an_rul.com/ows/name1</url>
</http>
</forwarding_rule>
</service>
<service type="tms" enabled="true"/>
MapCache不支持TMS作为源。看
源是mod mapcache可以查询以获取图像数据的服务。
这通常是可通过URL访问的WMS服务器。(有
目前只有WMS、WMTS和mapfile作为源,尽管其他可能是源
如果需要,请稍后添加,请参阅数据源)
您可以改为使用MapProxy,它支持TMS源(磁贴)谢谢,是的,我后来发现TMS不受支持