I use maps_lib-1.0.2. My test app works OK in WTK emulator and real phones, particularly Nokia E65, Nokia N97, but I experience following problem on Nokia 6682 -
only 1 tile is shown. Everything else works OK (cursor moves, etc) but only one tile is shown.
I use CloudMade with 64 tile set, with following code:
private static final CloudMade CLOUD = new CloudMade("... my key here ...", 64, 1);
mapComponent = new BasicMapComponent(
"... my key here ...",
"Wireless Lab", "LIST",
getWidth(), getHeight(), new WgsPoint(lon, lat), zoom);
mapComponent.setMap(CLOUD);
mapComponent.setPanningStrategy(new ThreadDrivenPanning());
final MemoryCache memoryCache = new MemoryCache(50 * 1024);
final RmsCache rmsCache = new RmsCache("ML_NETWORK_CACHE", 64 * 1024, 5);
mapComponent.setNetworkCache(new CachingChain(new com.nutiteq.cache.Cache[] { memoryCache, rmsCache }));
Log from real device (Nokia 6682) looks like:
Debug> TO: interrupt after 20094
Debug> Connection opened in 2078
Info> Downloading http://lbs.nutiteq.com/license.php?mykey=...key_here...&app=LIST&vendor....&platfrom=Nokia6682%2F4%2E41%2E0&locale=en%2DUS&smsc=...smsc_here...
Debug> Response read in 812
Debug> Connection opened in 5281
Info> Downloading http://tile.cloadmade.com/...my_key_here.../1/64/13/5098/2538.png
---
So it looks like the lib doesn't download next tiles. What to check next?
The device is S60 2nd edition. It is almost 5 years old device, we actually do not test on these devices. The device may have too little memory (cache parameters should be lower), or library may require other special adaptations to work on the device (or on this platform version).
I would try:
1. smaller cache values (for both memory and RMS)
2. other map types/styles (e.g. OSM)
3. using streaming with CloudMade (test with map.setMap(new NutiteqStreamedMap("http://aws.nutiteq.com/mapstream.php?cache=yes&ts=64&cmkey=YOUR-CLOUDMADE-KEY&", "CloudMade", 64, 0, 19));
OpenAerialMap.org service is down. When and if it will ever resume, nobody knows. If you can suggest good alternative, please let me know.
Hi Jaak, thanks for the reply.
Yes, Nokia 6682 is rather old phone but I think that the problem is not in small heap (it has dynamic heap, I believe it can allocate up to (or more) 2M depending on current RAM usage. I think the problem is network-related.
I would be glad to contribute debugging this issue on my phone, if you provide source code.
I tried NutiteqStreamedMap, it worked OK in emulator but doesn't work on Nokia 6682 - do not show even single tile.
By the way, I was not able to find info on URL parameter of NutiteqStreamedMap, in documentation. I see there are also StreamedCloudMadeMap() but it doesn't need a CloudMade key?
The streamed maps URL and response formats are descibed in http://www.nutiteq.com/system/files/MGMaps%20server%20API%20specification_011208_v3_0_0.pdf document
Thanks, that is the document I was looking for.
I debugged this problem on Nokia 6682 hardware, with mgmap sources. Results are following:
1. when using a streamed map (from nutiteq server) ,I was testing NutiteqStreamedMap - on first request to server ie:
Info > Downloading http://aws.nutiteq.com/mapstream.php?cache=yes&ts=128&cmkey=38089bf5cbe94174bd5868e8244acfa0&z=14&ver=2&t=10193,5077,10193,5076,10192,5077,10192,5076,10193,5078,10192,5078,10194,5077,10194,5076,10194,5078
it gets wrong (empty) reply from server. In StreamedTileRetriever.streamOpened() Tools.readLine2 doesn't read text from input stream, receiving -1 just on first call of InputStream.read().
I think that for some reason the server closes stream abnormally. Could you please check server logs if requests from nokia 6682 ever arrives there and what is happening then?
When client sends request with license key (with device info) - it just hangs and I see in logs error "TO: interrupted after ...".
If I use an unstreamed map (ie cloudmade) directly, it retrieves one tile OK (from cloudmade) but hangs on license request to nutiteq server, the same as described above.
Support for Nokia 6682 is not critical for me, so I can live without this fix. Seems that something doesn't work on server side for Nokia 6682 case - I can't say if it can affect other devices.
MGMaps standalone application seems to work OK on my Nokia 6682 with different map sources. Strange - I would expect the same problem there...
From server-side it looks ok, it gets proper request and gives response. Sometimes it can be even operator-specific issue, eg. some operators try to content transcoding for some devices (in WAP gateway), and they are not good on this. When you just load images then it works fine, but not with more specific (binary or text) services. Can you print out on device log what it exactly gets from the server? We have added some HTTP headers in server to avoid the transcoding, and this has helped so far, but maybe something more is needed.
MGMaps does not use streaming, also it does not do license request, it just loads images, so maybe the same issue does not come out there.
Hi JaakL,
Yes, your idea that it may be a carrier (transcoding) issue, makes sense. I tested it only with one carrier, and I'm not sure if other phones (where it worked OK) were tried with this carrier. I'll give it a try tomorrow.
I saw your code with HTTP "Cache-Control" header - I even tried removing it to see if it makes any difference - it doesn't.
Here go logs for unstreamed cloudmade map (retyped manually from phone screen, so may have mistakes):
---
Debug > Connection opened in 4859
Info > Downloading http://lbs.nutiteq.com/license.php?mykey=&app=LIST&vendor=Wireless%20Lab&ver=%40%7Bapp%2Eversion%7D&platform=Nokia6682%2F4%2E41%2E0&locale=en%2DUS&smsc=%2B79202909090
Debug > Response read in 1454
Debug > Connection opened in 3516
Info > Downloading http://tile.cloudmade.com//1/64/14/10193/5077.png
Debug > TO: ineterrupt after 20016
Debug > Connection opened in 3047
Info > Downloading http://lbs.nutiteq.com/license.php?mykey=&app=LIST&vendor=Wireless%20Lab&ver=%40%7Bapp%2Eversion%7D&platform=Nokia6682%2F4%2E41%2E0&locale=en%2DUS&smsc=%2B79202909090
Debug > Response read in 1547
Debug > Connection opened in 4047
Info > Downloading http://tile.cloudmade.com//1/64/14/10193/5076.png
---
and so on - it hangs on license check and is interrupted on timeout. tiles are downloaded with the timeout interval (new tile in 20 secs)
When I was debugging streamed map (I do not have it right now, so can't provide logs), I traced it very precisely - after opening request to the streamed map (see the url in previous post) - the _first_ read reads '-1' - it happens to be readLine2. It returns empty string and then it produces an exception (I think when splitting the string), in logs it shows as "Streamed.read(): 0". I added there exception class printing as well, and it was OutOfBoundException (AFAIK).
Hope it can help,
Mike
I tested the problem with SIM of other carrier - results are the same. So it looks like a problem of particular handset, carrier-agnostic.
Also I tested that on "right" phones the map works OK regardless carrier.
Well, let's leave the issue as it is unless more devices report the same problem.
Mike
I also tried to use
private static final StreamedOpenAerialMap OPENA = new StreamedOpenAerialMap(5,15);
In emulator it gives red squares with the log like:
Info > Downloading http://lbs.nutiteq.ee/mts_oam.php?z=10&ver=2&t=637,317,637,316,636,317,636,316,637,318,637,315,636,318,636,315,638,317,638,316,635,317,635,316,637,319,636,319,638,318,638,315,635,318,635,315,639,317,639,316,638,319,635,319,639,318,639,315,639,319
Debug > Connection opened in 312
Error > Could not retrieve http://lbs.nutiteq.ee/mts_oam.php?z=10&ver=2&t=637,317
...