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, 6 Dec 2011 18:37:53
Topic: New BlackBerry sample app
See more news »

Network error

19 replies [Last post]
Leo
User offline. Last seen 2 years 23 weeks ago. Offline
Joined: 07/10/2009

Sometimes I am getting Network error and maping stops aftere that to get map again I need to restart appliacation again. Any feedback on why this happens and how to detect it and start maping again without restarting map?

jaak
User offline. Last seen 12 hours 54 min ago. Offline
Joined: 06/19/2008

In principle there are methods stopMapping() and startMapping() which should restart mapping and downloader threads. Maybe this helps.

Without more detailed information it is hard to help: we'd need to know at least device where it happens.

/JaakL

Leo
User offline. Last seen 2 years 23 weeks ago. Offline
Joined: 07/10/2009

Currently I am developing on Storm. It happens on simulator as well as Device. While error occur it shows "Network Error" in red letter insted of tiles. Is there anyway I can check it about error? So I can handle in application?

jaak
User offline. Last seen 12 hours 54 min ago. Offline
Joined: 06/19/2008

I would try with different BlackBerry-specific "deviceside=" parameters. However, it does not really explain why this happens after some time.

final DefaultDownloadStreamOpener opener = new DefaultDownloadStreamOpener(";deviceside=true");
mapComponent.setDownloadStreamOpener(opener);

You can try to check specific exception from the log console (using e.g. on-device debugging).

/JaakL

Leo
User offline. Last seen 2 years 23 weeks ago. Offline
Joined: 07/10/2009

I am already using this parameter. May I know in which condition nutiteq api will throw "Network Error!" in red letter and show it on MapComponent?. I am getting this error very frequent but not able to determine how its happening. Also I am implementing ErrorListener interface but its seems its not catching it.

Thanks,
Leo

jaak
User offline. Last seen 12 hours 54 min ago. Offline
Joined: 06/19/2008

The problem is that we would need to replicate the issue. I put our basic map viewer to www.nutiteq.com/beta/blackberry/ directory. Can you download it and install to the emulator and real device, and tell what is the result. In our devices and emulator (I use 9530 Verizon emulator ver 4.7.0.75.) we cannot replicate the issues with networking.

Could you email me your application to support@nutiteq.com for our deeper review? Also we need specific instruction how to replicate it, like how much zooming, panning, other actions do you do to get it.

/JaakL

Leo
User offline. Last seen 2 years 23 weeks ago. Offline
Joined: 07/10/2009

N/W error: Sorry to say but I may not be able to provide code information. But I am posting screenshot of the error message. Its happens 2-3 a day and very unpredictable. I have created singleton object of MapComponent and using it on two different places. But some times as soon as app starts it gives error shown in screen shot. it occurs during start of the app only.  Do you have any contact number where I can talk or any specific time for live chat. I really appreciate your help in this matter. Thanks,N/W error: Sorry to say but I may not be able to provide code information. But I am posting screenshot of the error message. Its happens 2-3 a day and very unpredictable. I have created singleton object of MapComponent and using it on two different places. But some times as soon as app starts it gives error shown in screen shot. it occurs during start of the app only. Do you have any contact number where I can talk or any specific time for live chat. I really appreciate your help in this matter. Thanks,

Leo
User offline. Last seen 2 years 23 weeks ago. Offline
Joined: 07/10/2009

Hi:

I finally able to get error reason.

I am implementing errorlistener interface. When it throws error method licenseError(Strinf arg0) gets called. and value of arg0 is "Network error!".

I wonder why randomly it throws license error which is random and very infrequent.

Thanks,

jaak
User offline. Last seen 12 hours 54 min ago. Offline
Joined: 06/19/2008

One idea is that the downloader is not fully initialized, so networking requests, or deviceside parameters, are not fully set for some unknown reason. Please take a look to the network logs/traces, also library logs.

/JaakL

Leo
User offline. Last seen 2 years 23 weeks ago. Offline
Joined: 07/10/2009

But exception should be caught in networkError(String arg0) method of ErrorListener interface. But it is being caught by licenseError(String arg0) method.

is it still a network issue or license issue?

jaak
User offline. Last seen 12 hours 54 min ago. Offline
Joined: 06/19/2008

It is most likely network issue, it just happens while performing the license request.

Can you make network traces, or at least turn on library logging in the application, so it is seen whether this connection error is just about license request, or also for all other (map tile) requests?

/JaakL

jaak
User offline. Last seen 12 hours 54 min ago. Offline
Joined: 06/19/2008

To initialize library logger use:
Log.enableAll();

This should enable logging of library messages (including some info about networking) to the system out.

Library log can be requested from within the application as text using
mapComponent.getLibraryLog();

/JaakL

Emilio
User offline. Last seen 2 years 12 weeks ago. Offline
Joined: 03/20/2009

Well I am developing a Blackberry app, and having the same issue. In the simulator works fine, but not in the real device.

The app is signed and the ";deviceside=true" is there. Another network stuff is working right in the app but not the map... I am getting always "Network Error";

So, I have turn On the Log, and the output is:
Info> License: -32 Network error!
Error> Downloader: APN is not specified
...
...

What is APN?

Thanks

Emilio
User offline. Last seen 2 years 12 weeks ago. Offline
Joined: 03/20/2009

Solved:

http://www.blackberryfaq.com/index.php/Carrier_specific_APN/TCP_settings

Mandla
User offline. Last seen 2 years 10 weeks ago. Offline
Joined: 09/02/2009

Hi,

I am getting the same problem on a Sony Ericsson W580. The error is also "Network Error!" and this happens right after the map tiles have been downloaded.

Will you please shed light on what could be causing this and how this error can be avoided?

Thanks in advance for your assistance

Mandla
User offline. Last seen 2 years 10 weeks ago. Offline
Joined: 09/02/2009

Just to add to that, The code I am using for map initialization is -:

mapItem = new MapItem("", "MY_NUTITEQ_KEY", midle,getWidth(),getHeight(), new WgsPoint(Lon, Lat), defaultZoom);
mapItem.setPanningStrategy(new ThreadDrivenPanning());

final MemoryCache memoryCache = new MemoryCache(50 * 1024);
final RmsCache rmsCache = new RmsCache("ML_NETWORK_CACHE", 64 * 1024, 5);
mapItem.setNetworkCache(new CachingChain(new com.nutiteq.cache.Cache[] { memoryCache,rmsCache }));
final DefaultDownloadStreamOpener opener = new DefaultDownloadStreamOpener(";deviceside=true");
mapItem.setDownloadStreamOpener(opener);

mapItem.setMap(new NutiteqStreamedMap("http://aws.nutiteq.com/mapstream.php?cmkey=MY_CLOUDMADE_KEY&", "CloudMade", 64, 0, 19));

jaak
User offline. Last seen 12 hours 54 min ago. Offline
Joined: 06/19/2008

First of all, do not use this downloadStreamOpener for other devices than BlackBerry. If maps come, but then are replaced with "network error", then it could be license request issue (like wrong key). You should check network traces (WTK emulator has quite nice TCP monitor) and library log to get more specific error message.

/JaakL

Mandla
User offline. Last seen 2 years 10 weeks ago. Offline
Joined: 09/02/2009

Hi Jaak,

I have tried this with emulator and it works fine. The problem is on the real device. On the real device I get the error "Network Error"

I have not been able to perform on-device debugging and am therefore not able to provide the exact exception details.

Any ideas?

Thanks

jaak
User offline. Last seen 12 hours 54 min ago. Offline
Joined: 06/19/2008

Have you tried different other possible DefaultDownloadStreamOpener() parameter values, it could be your operator/setup specific? Official info about it is in http://www.blackberry.com/developers/docs/4.7.0api/javax/microedition/io/Connector.html

/JaakL