#cache-tiles
Serving tiles can be costly. If you use freely accessible tiles from OpenStreetMap and do not want to abuse their servers. Cache the tiles on yours.
This is not a way to scrape or to download in bulk, the server only downloads tiles when your users view them and if you do not already have them.
##Install
Clone this repository and download dependencies (express, leaflet and request)
git clone https://github.com/idris-maps/cache-tiles.git
npm install
##Config
You can change tile provider in lib/tileProvider.js
Default is classical OpenStreetMap, find more here or here
Do not forget the attribution and check the license.
Reset the cache when you change provider. See below.
##Start
After installing the dependencies, start the server with
node server
##Reset
To reset your cache, just delete the data
folder that was created when you started the server the first time.