Skip to content

sinky/tile-cache-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tile-cache-php

PHP caching proxy between tile server and your map application. To save bandwith of the real tile servers.

usage

Change variables in index.php and set RewriteBase in .htaccess.

Use https://yourdomain.com/appfolder/https://tileserver.com/{zoom}/{x}/{y}.png as tile url and it serves a cached tile from e.g. http://c.tile.openstreetmap.org/{zoom}/{x}/{y}.png

Add other tile server by extending the $domains array.

leaflet Example

var tile_osm = L.tileLayer('https://yourdomain.com/appfolder/https://http://{s}.tile.openstreetmap.org/{zoom}/{x}/{y}.png', {
  attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);

License

MIT http://marco.mit-license.org/

About

php proxy for caching web map tiles like openstreetmap.org

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages