That&#39;s exactly what i was thinking about doing. I made something similar to that with Google Maps using HTML5&#39;s file object. It took a tremendous amount of work trying to figure out where to put that code in gmaps but I eventually found it. Of course it broke the TOS. It worked great on Chrome, but that&#39;s when I discovered Phonegap didn&#39;t support the file download.<div>
<br></div><div>Now that they do support it, I want to make it work in OpenLayers. The thing that I learned from doing this with Google Maps is that the file download object uses an asynchronous callback functions which means I can&#39;t just return a function call if the local file doesn&#39;t exist. But if the file does exist, that function can just return the local URL.</div>
<div><br></div><div>It shouldn&#39;t be too hard to do this, but if anyone is familiar with the inner workings of openlayers that would certainly help.</div><div><br></div><div>Steve<br><br><div class="gmail_quote">On Thu, Mar 22, 2012 at 4:37 PM, Tue Topholm <span dir="ltr">&lt;<a href="mailto:tt@sugee.dk">tt@sugee.dk</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The easiest thing to do is to make a a getUrl function on the layer,<br>
then send the request PG and store the url in a localstorage, and sent<br>
the url back to OL, next time it will call it, you check your local<br>
storage, to see if it saved, and if it is, give OL the local path the<br>
tile, else give the server url.<br>
<br>
<br>
--<br>
<br>
Med venlig hilsen / Kind regards<br>
<br>
Tue Topholm<br>
Sugee<br>
Tlf: <a href="tel:%2B45%2032%2013%2032%2032" value="+4532133232">+45 32 13 32 32</a><br>
W: <a href="http://www.sugee.dk" target="_blank">http://www.sugee.dk</a><br>
<br>
<br>
<br>
22. mar. 2012 16.30 skrev Steve Nelson &lt;<a href="mailto:snelson@webapper.com">snelson@webapper.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt; Phonegap recently added a download method to their File object.<br>
&gt;<br>
&gt; <a href="http://docs.phonegap.com/en/1.5.0/phonegap_file_file.md.html#FileTransfer" target="_blank">http://docs.phonegap.com/en/1.5.0/phonegap_file_file.md.html#FileTransfer</a><br>
&gt;<br>
&gt; The advantage of this is there is no disk space limit (as far as I know)<br>
&gt; which the &quot;storage&quot; method has. I want to build this caching technique into<br>
&gt; openlayers. Anyone want to help?<br>
&gt;<br>
&gt; Steve<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
&gt; <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
&gt;<br>
</blockquote></div><br></div>