Map API

Nutiteq Maps Lib SDK enables developing advanced mobile mapping applications.
Platforms: Android, RIM BlackBerry, Java ME (J2ME)
Download maps API SDK »
Untitled Document

Products

» View demos
» Downloads

Latest news

Last at Tue, 3 Apr 2012 23:31:42
Topic: MapXT SDK evaluation
See more news »

Memory/Cache configuration

1 reply [Last post]
admin
User offline. Last seen 2 years 21 weeks ago. Offline
Joined: 05/08/2008

Some phones, especially with limited memory (e.g. Nokia S40) may require tuning of network cache, as default cache parameters could cause OutOfMemory exceptions.

Default network cache configuration for MapComponent and MapItem is set with following commands:

final MemoryCache memoryCache = new MemoryCache(128 * 1024);
final RmsCache rmsCache = new RmsCache("ML_NETWORK_CACHE", 64 * 1024, 5);
setNetworkCache(new CachingChain(new com.nutiteq.cache.Cache[] { memoryCache, rmsCache }));

You can override these settings if you call same commands with different parameters after creation of MapItem or MapComponent, and before call of StartMapping().

One strategy for troubleshooting of OutOfMemory you could remove rmsCache, memoryCache or both from the CachingChain, then no caching is used. If this helps, then optimal values for the cache should be found for the device and specifically for your application.

Take also look to Javadoc comments, especially http://www.nutiteq.com/javadoc/com/nutiteq/cache/RmsCache.html which has some hints how to estimate good cache size.