About this plugin
Tiles Proxy for OpenStreetMap provides a basic proxy, which allows other OpenStreetMap plugins to load map tiles from your server instead from OpenStreetMap servers.
tours
com/moewe-io/osm-tiles-proxy
Known to work with these plugins
- Geolocation
- Leaflet Map
- If Leaflet Map is using the default settings, the proxy is automatically used.
- Custom Post Type to Map Store
- Another plugin? Let us know.
Notes
- Beware: Depending on your map and the tiles you need, a lot of storage is needed.
- 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
php
define( 'OSM_PROXY_DISABLE_CLEAR_CACHE', true );