简体   繁体   English

缓存OpenLayers3 Tiles服务器端

[英]Cache OpenLayers3 Tiles server side

I'm developing a website that display a map using OpenLayers3 API. 我正在开发一个使用OpenLayers3 API显示地图的网站。 I know that most of requests will refer to a specific location so I'm wondering if it's possible to save server-side the Tiles of that region, in order to reduce calls to OpenStreetMap that sometimes is slow. 我知道大多数请求都将引用到特定位置,因此我想知道是否可以保存该区域的服务器端Tiles,以减少对OpenStreetMap的调用,有时这很慢。 Thanks in advance! 提前致谢!

Yes, you can. 是的你可以。 There are several solutions 有几种解决方案

  1. You can try dedicated software called more or less "map tiles proxy" 您可以尝试称为“地图图块代理”的专用软件

  2. You can reuse your existing web server 您可以重复使用现有的Web服务器

    You will tweak it for the intent of caching map tiles ( Nginx recipe , did not found one out of the box for Apache) 您将对其进行调整,以实现缓存地图图块的目的( Nginx配方 ,未为Apache开箱即用)

  3. You can use what we call "reverse proxy" like Varnish. 您可以使用Varnish之类的所谓“反向代理”。 See a recipe for this. 参见食谱

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM