[OpenLayers-Users] SOLVED: Offline Storage Help

ANC anajera at bicimapas.com.mx
Thu Jan 30 21:01:39 PST 2014


Hello all,

I finally got it working. Using the offline maps as a sample but with some
modifications which in summary were as follows:

1. Removed the single tile option when creating the WMS layer (see
explanation above)
2. Both controls CacheWrite and CacheRead were deactivated on creation.
3. One button was added to start the seeding process which activates the
CacheWrite. Once the seeding is finished, the CacheWrite is deactivated.
This functionality was part of the original seeding process contained in the
sample, but required some tune ups to adapt it to the way the caching
controls are used.
4. Another button for the CacheRead control was created, which triggers a
function that would activate it AFTER the seeding process has finished.
5. By pressing this button the cache reading is activated and tiles show
well when offline even after refreshing/reloading the page.

The only issue now is the low memory capacity that LocalStorage provides. I
get maybe 20 to 27 tiles loaded which for the most part is not enough for
the intended use we have for the application. 

In order to improve the storage capacity, I created a custom OL build using
the modified controls available in the link shown in my previous post
(https://github.com/openlayers/openlayers/pull/643) and indeed the storage
capacity improves considerably but not all the tiles show back  when
refreshing/reloading the page while offline. As these modified controls are
not standard in OL, I will create a new post regarding them on the develpers
forum.

Thanks for all the support provided and I hope this information may help
others trying to use these controls for offline applications.





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


More information about the Users mailing list