-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading map completely offline #508
Comments
@dsimcic my suggestion is to build a simple non-Cordova, plain old JavaScript version of the app and see if you can make that basic functionality work that way. Plus you'll be able to share the non-Cordova test app and I can help troubleshoot. |
Hello @andygup, Thank you for any suggestion. Best regards. |
@dsimcic can you drag and drop the unzipped files into the issue here in github? Or even better, can you create a github repo with the files? Sorry, I don't have any way to safely open the zip file. |
@andygup i've created a new private github repo. You should have received the collaboration request. |
@dsimcic the implementation in Additional information is available here: https://github.com/Esri/offline-editor-js/blob/master/doc/howtousetiles.md#approach-2---tiled-map-services-full-offline And, just a reminder that there are tile storage limitations that you should be aware of: #468 (comment). Because of these and other issues, we recommend using our native Runtime SDKs which offer robust, scalable and fully supported offline workflows. |
Last quick item - as noted under Supported Browsers using this library in a hybrid (Cordova/Ionic, etc) environment is not supported. I can only offer suggestions for plain old browser implementations. Reference: http://esri.github.io/offline-editor-js/demo/ (scroll to the bottom of the page). Sorry, I just noticed there's no longer a link to the Supported Browsers Table from the README. |
Hello @andygup, I've noticed also the original sample appcache-tiles.html isn't working when i click on download tiles. Regards. |
This error is most likely because the app isn't correctly recognizing that it's offline. If the app was fully offline it would try to retrieve tiles from the local database and not from I recommend checking if the offline detection is working. When the app first loads set a break point here: https://github.com/Esri/offline-editor-js/blob/master/samples/appcache-tiles.html#L261.
Gotcha, in the online original sample it looks like there is at least one fatal errors due to insecure/mixed content and a few warnings about using Application Cache instead of service workers. If I have time I'll fix the mixed content error, but there's no telling what else might break. This repo has been in maintenance mode for just about exactly 3 years.
|
Thank you for the tip @andygup! Regards. |
Any console errors? I don't have any way to test it right now. Your best best is to set up multiple break points and step thru the offline library code until you find the issue. |
Hi @andygup, Regards. |
Hi @andygup, Regards. |
You got the app to restart correctly while fully offline without an appcache file? That doesn't sound right, or you are relying on the default browser cache which isn't a best practice for a full offline web app, and prone to problems later on down the line.
Make sure to listen for the |
Hi @andygup, Regards. |
I should clarify - app cache is required and not optional. Not sure if that's your primary issue, but it will eventually cause a problem if you aren't using app cache.
Not sure what you mean, can you provide an example? The patterns in the Appcache Tiles Only sample represents the best practice for loading this library and the ArcGIS API for JavaScript v3.x - I am aware the sample has a few bugs when running in the most recent version of Chrome, but you should be able to easily fix those in your local copy of the code. |
Hi @andygup, Best regards and thank you so much again. |
Glad to help. As long as you are happy and your implementation is meeting your requirements I'll close this. |
Hello,
I'm using the OfflineTilesAdvanced object with Offline library v. 3.7.
I can't load map with previously downloaded tiles in DB when i try to start the page completely offline (LAN cable disconnected).
I'm using an appcache file with map service url specified but it doesn't work (i've read documentation about it)
If i start the page online and then i switch to offline everything works like expected.
It seems that the map object can't initialize some map service properties when starts offline.
I've also added some graphics in a graphic layer on the map that i can see properly.
Zoom and pan of the map object are working.
I've noticed also that the event "onExtentChange" doesn't raise the method "_onExtentChangeHandler" of the OfflineTilesAdvanced object so i think that the "_updateTiles" method is not called properly.
I've tried to connect manually with no luck.
I think this maybe could be the reason why i can't see downloaded tiles on the map.
I'm including this scenario in a Cordova solution and is not so easy for me sharing code due the complexity of this solution.
Thank you so much for any suggestion.
Dario
The text was updated successfully, but these errors were encountered: