Issue
I have an Android 13mb application, which displays offline/cached map from sd card. I am using mapnik mapsource, and has 33, 000 map tiles.
m_mapView.setTileSource(TileSourceFactory.MAPNIK);
Problem:
When viewing the map, it takes time to load the maptiles. Furthermore, when scrolling it will freeze for about 2-3 seconds, then it will force closed. Can I use try catch?
Solution
If these images are large or many, then you may simply not have enough memory to keep them all in memory at once. You will have to find a way to intelligently load and unload the tiles to fit into available heap space, which is 32MB.
However, I have another guess: are you calling recycle()
on the Bitmap
objects that you do not need anymore? if you don't you can quickly get this error, even when there is enough memory.
Answered By - Sean Owen
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.