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 »

Gps Location

3 replies [Last post]
Nomalys
User offline. Last seen 28 weeks 6 days ago. Offline
Joined: 08/17/2011

Hello,

I try to locate my position with this code that I see in your tutorial :

if (System.getProperty("microedition.location.version") != null) {
final LocationSource dataSource = new LocationAPIProvider(3000);
try {
final Image gpsPresentImage = Image.createImage("/def_kml.png");
final Image gpsConnectionLost = Image
.createImage("/def_kml.png");
final LocationMarker marker = new NutiteqLocationMarker(
new PlaceIcon(gpsPresentImage, 4, 16), new PlaceIcon(
gpsConnectionLost, 4, 16), 3000, true);
dataSource.setLocationMarker(marker);
mapComponent.setLocationSource(dataSource);
} catch (final IOException e) {
}
}

When I'm implementing the code and test on device, I don't have any result. I would know what the problem is.

Thanks,

Nomalys.

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

I would check:
1. Does device support location API
2. Any messages in console/logs
3. Is valid GPS data coming in - e.g. do other apps show location

I've seen that several emulators did not provide emulated GPS data, even if they in principle had this in menu, so changing emulator helped.

/JaakL

Nomalys
User offline. Last seen 28 weeks 6 days ago. Offline
Joined: 08/17/2011

Hello Jaak,

I test on device (BB Torch 9800, Bold 9900, ...), not on emulator, the device support location API.

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

Can you activate SDK logging and get log messages. This could give hint what is happening there.

/JaakL