Name: OpenLayersOfflineDemo
Owner: Liip
Description: Demonstrate the offline storage with OpenLayers
Created: 2012-09-18 21:29:06.0
Updated: 2017-12-27 10:19:35.0
Pushed: 2012-09-18 22:09:09.0
Homepage: null
Size: 432
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This small code example shows how to extend OpenLayers with offline storage.
Currently only WMS and WFS Layers are supported.
To keep the code base small only one storage class is provided.
The provided OpenLayers.Offline class does the offline magic.
Make sure your apache can run php script files (needed for the proxy script).
On a mac clone this repository to ~/Sites:
cd ~/Sites
git clone git@github.com:liip/OpenLayersOfflineDemo.git
Then change into the new directory and change the permissions of the tiles folder with:
cd OpenLayersOfflineDemo
chmod 777 tiles
Please change the location of the proxy script:
echo "// configure proxy host" > proxy.js
echo 'OpenLayers.ProxyHost="http://127.0.0.1/~'$(whoami)'/'${PWD##*/}'/proxy.php?url="' >> proxy.js
You should now be ready to open the local.html file in your browser:
open http://127.0.0.1/~$(whoami)/${PWD##*/}/local.html