问题
I see the load messages when loading OSMdroid mapview that if not loading tiles online, then automatically it shifts to look at sdcard mount state and its folder ../osmdroid
05-15 16:26:47.462: I/org.osmdroid.views.MapView(4366): Using tile source: org.osmdroid.tileprovider.tilesource.XYTileSource@427c0bb8
05-15 16:26:47.472: I/org.osmdroid.tileprovider.modules.MapTileFileStorageProviderBase(4366): sdcard state: mounted
05-15 16:26:47.472: I/org.osmdroid.tileprovider.modules.MapTileFileStorageProviderBase(4366): sdcard state: mounted
How can I disable this reading of SDcard mount state? Is this possible? Why am I asking is because, It seems to allot memory for the map packages available, and constantly my GC is being overriding and UI response is slow or stuck until GC_FOR_ALLOC finishes. I'm using *zip map package ranging from zoomlevel 0-18.
回答1:
The OSM MapView allots the required memory depending on the MapPackage and the initial settings, so management of memory with respect to android application must be handled internally and triggering an GC is quiet common, and handling memory for android app needs to be checked and performance of each app has to be analyzed and debugged correctly.
来源:https://stackoverflow.com/questions/23676419/osmdroid-mapview-reads-sdcard-state-if-mounted-before-load-of-mapview