[WordPress] 外掛分享: Tiles Proxy for OpenStreetMap

首頁外掛目錄 › Tiles Proxy for OpenStreetMap
WordPress 外掛 Tiles Proxy for OpenStreetMap 的封面圖片
200+
安裝啟用
尚無評分
37 天前
最後更新
問題解決
WordPress 6.0+ PHP 8.0+ v2.4.0 上架:2018-07-01

內容簡介

Tiles Proxy for OpenStreetMap 是一個基本的代理外掛,允許其他 OpenStreetMap 外掛從您的伺服器載入地圖瓦片,而非直接從 OpenStreetMap 伺服器。這樣可以提高地圖載入的靈活性與控制性。

【主要功能】
• 從本地伺服器載入地圖瓦片
• 支援多個 OpenStreetMap 外掛
• 提供過濾器以獲取代理 URL

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.4.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Tiles Proxy for OpenStreetMap」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Tiles Proxy for OpenStreetMap provides a basic proxy, which allows other OpenStreetMap plugins to load map tiles from your server instead from OpenStreetMap servers.
Sponsor: sachsen.tours
Contribute: https://github.com/moewe-io/osm-tiles-proxy
Known to work with these plugins

Leaflet Map
Custom Post Type to Map Store
Geolocation
Another plugin? Let us know.

Notes

Beware: Depending on your map and the tiles you need, a lot of storage is needed.
Might be slower than official servers (depends on your server)
First requests might be slow as map tiles are cached on request

Filters
You can use filters to get the URLs from the plugin:
$proxy_cached_url = apply_filters( 'osm_tiles_proxy_get_proxy_url', $proxy_cached_url );
$proxy_rest_api_url = apply_filters( 'osm_tiles_proxy_get_proxy_rest_url', $proxy_rest_api_url );
$leadlet_js_url = apply_filters( 'osm_tiles_proxy_get_leaflet_js_url', $leadlet_js_url );
$leadlet_css_url = apply_filters( 'osm_tiles_proxy_get_leaflet_css_url', $leadlet_css_url );

Constants
To disable cache invalidation when WP Rocket or WP Fastest Cache invalidate their cache, you can set the following constant in your wp-config.php
define( 'OSM_PROXY_DISABLE_CLEAR_CACHE', true );

延伸相關外掛

文章
Filter
Mastodon