Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

[android] change timing of onMapReady to facilitate runtime style - #6046

Merged
ivovandongen merged 1 commit into
masterfrom
6032-onmapready-style
Sep 20, 2016
Merged

ivovandongen merged 1 commit into
masterfrom
6032-onmapready-style

Conversation

@ivovandongen

@ivovandongen ivovandongen commented Aug 17, 2016 •

Copy link
Copy Markdown
Contributor

Fixes #6032

This may have a significant impact, so let's get a good set of testcases here:

  • "Initial load" - no cached resources
    • Clean install testapp
    • Open offline activity
    • Make sure onMapReady callback is called
  • "regular use"
    • Kill and reopen the testapp
    • Open offline activity
    • Make sure onMapReady callback is called
  • "ambient cache use"
    • Turn on flight mode
    • Kill and reopen the testapp
    • Open offline activity
    • Make sure onMapReady callback is called
  • "offline use"
    • Download offline region
    • Turn on flight mode
    • Kill and reopen the testapp
    • Open offline activity
    • Make sure onMapReady callback is called

cc @tobrun please add any cases you find

@ivovandongen ivovandongen added the Android Mapbox Maps SDK for Android label Aug 17, 2016
@ivovandongen ivovandongen added this to the android-v4.2.0 milestone Aug 17, 2016
@tobrun

tobrun commented Aug 17, 2016

Copy link
Copy Markdown
Member

The things I can think of are related to marker loading at startup, too many icon invalidations made the markers flash. I would just validate if everything on MarkerViews and GL Markers are still working as normal.

@ivovandongen

Copy link
Copy Markdown
Contributor Author

With only ambient caching, the view markers example crashes in flight mode. No logs that stand out though. Only:

08-17 11:40:14.365 20487-32058/com.mapbox.mapboxsdk.testapp W/com.mapbox.mapboxsdk.http.HTTPRequest: [HTTP] Request could not be executed: Unable to resolve host "api.mapbox.com": No address associated with hostname
08-17 11:40:14.368 20487-20487/com.mapbox.mapboxsdk.testapp E/mbgl: {pboxsdk.testapp}[Setup]: loading style failed: Unable to resolve host "api.mapbox.com": No address associated with hostname
08-17 11:40:14.755 20487-32058/com.mapbox.mapboxsdk.testapp W/com.mapbox.mapboxsdk.http.HTTPRequest: [HTTP] Request could not be executed: Unable to resolve host "api.mapbox.com": No address associated with hostname
08-17 11:40:14.758 20487-20487/com.mapbox.mapboxsdk.testapp E/mbgl: {pboxsdk.testapp}[Style]: Failed to load sprite: Unable to resolve host "api.mapbox.com": No address associated with hostname
08-17 11:40:15.812 20487-32058/com.mapbox.mapboxsdk.testapp W/com.mapbox.mapboxsdk.http.HTTPRequest: [HTTP] Request could not be executed: Unable to resolve host "api.mapbox.com": No address associated with hostname
08-17 11:40:15.815 20487-20487/com.mapbox.mapboxsdk.testapp E/mbgl: {pboxsdk.testapp}[Style]: Failed to load sprite: Unable to resolve host "api.mapbox.com": No address associated with hostname

Which seems to indicate the style wasn't cached at all. Still, it shouldn't crash.

@tobrun

tobrun commented Aug 18, 2016

Copy link
Copy Markdown
Member

I did not find any crashes in normal usage. @ivovandongen do you want to create a follow up issue on #6046 (comment)? I feel this is not related to this PR and this one is good to merge.

@ivovandongen ivovandongen self-assigned this Sep 19, 2016
@ivovandongen
ivovandongen force-pushed the 6032-onmapready-style branch 2 times, most recently from b7bb079 to aeee892 Compare September 20, 2016 10:39
@ivovandongen

Copy link
Copy Markdown
Contributor Author

@tobrun I think this is ready. Could you review the changes please?

@ivovandongen ivovandongen changed the title [android] #6032 - change timing of onMapReady callback so that the st… [android] change timing of onMapReady to facilitate runtime style Sep 20, 2016

@tobrun tobrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚢

@ivovandongen
ivovandongen merged commit aa47680 into master Sep 20, 2016
@jfirebaugh
jfirebaugh deleted the 6032-onmapready-style branch September 20, 2016 16:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Android Mapbox Maps SDK for Android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants