kunal.mehta@sap.com

Map disappears when changed tabs

Discussion created by kunal.mehta@sap.com on Mar 20, 2014
I have an app with tabbed activity. One of the tabs has the arcgis mapview. Initially the mapview with basemap shows up fine. When tab is changed, the mapSurface is destroyed. However, when the map tab is selected again, the log shows map surface re-created, but basemap is not shown. Below are the logs:

TAB CHANGED:

03-20 15:55:46.030: D/ArcGIS.ThreadPool(10965): <<<<<1798007319,19.133793.194521
03-20 15:56:15.580: D/ArcGIS.LifeCycle(10965):    MapSurface.destroyContext <start>:GLThread 6584
03-20 15:56:15.580: D/ArcGIS.LifeCycle(10965):    MapSurface released
03-20 15:56:15.580: E/libEGL(10965): call to OpenGL ES API with no current context (logged once per thread)
03-20 15:56:15.620: D/ArcGIS.LifeCycle(10965):    MapSurface.destroyContext <done>
03-20 15:56:30.120: D/ArcGIS.LifeCycle(10965): >  MapSurface.Context created. com.esri.android.map.MapSurface{41b65c40 V.E..... ........ 0,0-1280,671}

MAP TAB RESELECTED:

03-20 15:56:30.130: D/ArcGIS.LifeCycle(10965):    MapSurface SurfaceCreated
03-20 15:56:30.130: D/ArcGIS.LifeCycle(10965):    MapSurface SurfaceChanged:1280,671


I am suspecting the basemap layers get removed when MapSUrface is released. But no status change event occurs when mapSurface is recreated. Is there a way to listen to mapSurface change events?

Kunal

Outcomes