liip/OpenLayersOfflineDemo

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

OpenLayers offline demo

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.

How to run this demo

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

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.