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 »

How to get the clicked KmlPlace

2 replies [Last post]
orgoz
User offline. Last seen 1 year 32 weeks ago. Offline
Joined: 05/06/2010

Hi,

I am an android development beginner and have a problem.
I created a BasicMapComponent with a KmlUrlReader service and implemented elementClicked() method.

I would get a field "id" which is present in the Kml string.
How I can get a KmlPlace from a OnMapElement to execute this : place.getExtendedData().getValue("id") ?

I know that the following code is not correct but it's what I want to do :

public void elementClicked(OnMapElement element) {
Log.d("elementClicked", ((KmlPlace) element).getExtendedData().getValue("id"));
}

Thanks for your help

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

try:

Log.d("elementClicked",mapComponent.getAdditionalInfo((Place) element).getExtendedData("id"));

/JaakL

orgoz
User offline. Last seen 1 year 32 weeks ago. Offline
Joined: 05/06/2010

Thanks a lot !
It works very well.