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 »

How to use correctly the Nutiteq API key

6 replies [Last post]
giordano
User offline. Last seen 28 weeks 6 days ago. Offline
Joined: 07/29/2011

Hi.

I'm trying to develop an app for Android completely free.
Someone can you explain me exactly how to generate a key to use Nutiteq library for my application?
What exactly mean "Application name" and what mean "Vendor name"?
Also, where they must be placed these two strings in my project?
I've one trouble that i think depends on how I've generated and used the Nutiteq API key.
Follows what i've done and what is the (bad) result.

After have tried your Hello Map example, that works fine, I've tried to develop the same functionality in a new project that could be a building block of my app, following these steps:

  1. User registration
  2. Creation of my Android project in Eclipse IDE with the following parameters:
    • Project name and Application name: Percorsi
    • Build Target: Android 1.6
    • Package name: com.giordano
    • Min SDK 4
  3. Then i've followed the steps of your manual "http://www.nutiteq.com/system/files/Hello Map tutorial - Android_1_0_2.pdf" to reproduce the Hello Map example  
  4. Three attempts to generate the right key for my app at URL http://www.nutiteq.com/generate_key.html to substitute the API key used in Hello Map:
    • Application: Percorsi Vendor: Giordano
    • Application: Percorsi Vendor: giordano
    • Application: com.giordano Vendor: giordano
  5. When I run my application on simulator the attempt to visualize the map crash with the following message: "The application Percorsi (process com.giordano) has stopped unexpectedly. Please try again. Force Close"

Please help me.
Thanks in advance.
Best regards,

Giordano

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

Did you get it sorted out? You should use "giordano" and "com.giordano" as strings in BasicMapComponent and it should work. If not, we would need application log to see exact messages there. Anyway, this Force Close should not really happen.

Normally it just does not display map if something is wrong with license data.

/JaakL

ahsan78
User offline. Last seen 13 weeks 5 days ago. Offline
Joined: 01/05/2012

did you solve this problem? I don't see where to put vendor and app_name for Android app. Can you please help? I am putting the license key in constructor of BasicMapComponent.

Please help me out.

Thanks.

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

For Android app the application name is defined in Manifest file, something like "com.mycompany.myapp". Use same when you generate license in web. Company name cannot be defined in Android application separately, so you can use technically whatever you like there.

/JaakL

ahsan78
User offline. Last seen 13 weeks 5 days ago. Offline
Joined: 01/05/2012

Hi Jaak,
Thanks for your reply.. I am facing another problem integrating Nutiteq.

I am using the following code like the provided sample:

private BasicMapComponent mapComponent;
mapComponent = new BasicMapComponent("2b44928ae11fb9384c4cf38708677c484ef709024b6315.67897294",new AppContext(this), 1, 1, new WgsPoint(29.9758602192000000, 31.2828109345000000),14);
SimpleWMSMap wms = new SimpleWMSMap("http://174.123.33.202:8082/geoserver/gwc/service/wms?TILED=true&TILESORIGIN=25.06213671874999,25.912181118327&VERSION=1.1.1&&SRS=EPSG%3A4326&SERVICE=WMS&",
256, 6, 18, "Egypt_allinone", "image/png","&EXCEPTIONS=application%2Fvnd.ogc.se_inimage", "GetMap", "");

wms.setWidthHeightRatio(1.0);
mapComponent.setMap(wms);
mapComponent.setPanningStrategy(new ThreadDrivenPanning());
mapComponent.startMapping();

mapComponent.addPlace(p);

But when I run the app, I get part of the map and part of the map is shown red with follwoing error message:

01-18 13:15:23.033: ERROR/dMisr(220): Downloader: http://174.123.33.202:8082/geoserver/gwc/service/wms?TILED=true&TILESORIGIN=25.06213671874999,25.912181118327&VERSION=1.1.1&&SRS=EPSG%3A4326&SERVICE=WMS&LAYERS=Egypt%5Fallinone&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=%26EXCEPTIONS%3Dapplication%252Fvnd%2Eogc%2Ese%5Finimage&EXCEPTIONS=application%2Fvnd%2Eogc%2Ese%5Finimage&SRS=EPSG%3A4326&BBOX=29.94873,31.124267,29.970703,31.135253&WIDTH=256&HEIGHT=256

01-18 13:15:23.043: ERROR/dMisr(220): Network error 1 : http://174.123.33.202:8082/geoserver/gwc/service/wms?TILED=true&TILESORIGIN=25.06213671874999,25.912181118327&VERSION=1.1.1&&SRS=EPSG%3A4326&SERVICE=WMS&LAYERS=Egypt%5Fallinone&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=%26EXCEPTIONS%3Dapplication%252Fvnd%2Eogc%2Ese%5Finimage&EXCEPTIONS=application%2Fvnd%2Eogc%2Ese%5Finimage&SRS=EPSG%3A4326&BBOX=29.94873,31.124267,29.970703,31.135253&WIDTH=256&HEIGHT=256

01-18 13:15:23.053: ERROR/dMisr(220): Could not retrieve http://174.123.33.202:8082/geoserver/gwc/service/wms?TILED=true&TILESORIGIN=25.06213671874999,25.912181118327&VERSION=1.1.1&&SRS=EPSG%3A4326&SERVICE=WMS&LAYERS=Egypt%5Fallinone&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=%26EXCEPTIONS%3Dapplication%252Fvnd%2Eogc%2Ese%5Finimage&EXCEPTIONS=application%2Fvnd%2Eogc%2Ese%5Finimage&SRS=EPSG%3A4326&BBOX=29.970703,31.14624,29.992675,31.157226&WIDTH=256&HEIGHT=256

Although my BlackBerry version is working fine with same wms map server.

Can you please help on this?

Thanks in advance.

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

There seems to be some communication issue between SDK and GeoWebCache, if you open given URL then you see specific error message. Maybe this TILESORIGIN=25.06213671874999,25.912181118327 parameter is wrong, it is something specific to GeoWebCache.

I just tried your code on BlackBerry, and I got also there non-working URLs like http://174.123.33.202:8082/geoserver/gwc/service/wms?TILED=true&TILESORIGIN=25.06213671874999,25.912181118327&VERSION=1.1.1&&SRS=EPSG%3A4326&SERVICE=WMS&LAYERS=Egypt_allinone&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=%26EXCEPTIONS%3Dapplication%252Fvnd%2Eogc%2Ese_inimage&EXCEPTIONS=application%2Fvnd%2Eogc%2Ese_inimage&SRS=EPSG%3A4326&BBOX=29.992675,31.278076,30.014648,31.289062&WIDTH=256&HEIGHT=256

/JaakL