[OpenLayers-Users] Offline Storage Help

ANC anajera at bicimapas.com.mx
Thu Jan 16 12:54:09 PST 2014


Hi Andreas,

Yes I looked at the offline-storage as well as the cacheRead and cacheWrite
examples and I am using that code as the base. There is no need for CORS or
proxy as all is hosted in our webserver.  I took the cacheWrite sample as
the basis and then added the cacheRead control. Here you have the relevant
code for this test:

<!DOCTYPE html>
<html manifest="carw.manifest" lang='en'>
<head> 
    <meta charset='utf-8' /> 
	<title>BiciMapasCache</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0,
maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    
    
    
</head>

  <body onload="init()">
    
    <div id="map_element" class="smallmap"></div>
    <div>Cache status: </div>
    <div><button id="clear">Clear cache</button></div>
    <br>
    <div id="docs">
        <p>This example shows how to use the CacheWrite control to cache the
        tiles. Caching is turned on, and as you pan and zoom the map, every
        tile that is loaded is also copied to the browsers Local
Storage.</p>
        <p>To use the cached tiles, switch to the
         cache-read.html <cache-read.html>   example.</p>
        <p>See  cache-write.js <cache-write.js>   for the source
        code.</p>
    </div>
  </body>
</html>

Is there something I have to change?

Thank you



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Offline-Storage-Help-tp5096401p5098494.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list