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

Uudised

Viimane: Thu, 15 Mar 2012 14:51:08
Teema: Vabad töökohad pakkuda
Veel uudiseid »

Click on Map

2 replies [Last post]
Byron
User offline. Last seen 1 year 1 week ago. Offline
Joined: 03/22/2010

I want to be able to click/tap any location on the Map and retrieve the lat/long coordinates of my click/tap. Is there away I can do that?

jaak
User offline. Last seen 1 day 22 hours ago. Offline
Joined: 06/19/2008

You should implement MapListener interface, use addMapListener to MapComponent and there you have MapClicked() method with WgsPoint which has lat/long.

/JaakL

Byron
User offline. Last seen 1 year 1 week ago. Offline
Joined: 03/22/2010

Got it. In case someone is wondering this is what needs to be done

1. public class MyMap extends Activity implements MapListener

2. mapComponent.setMapListener(this);

3.
public void mapClicked(WgsPoint arg0) {
// TODO Auto-generated method stub
DisplayPopupMessage("coords: "+arg0.getLon()+","+arg0.getLat());

}