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 »

click event not working for Place

3 replies [Last post]
jasonz
User offline. Last seen 1 year 27 weeks ago. Offline
Joined: 07/25/2010

Hi,I am developing app for Blackberry,now I using your map product (rimui_maps_lib-1.1.0a),and the map source from Bing,I put some placese on the map with image and PlaceLabel(showing some info for the place),everything is fine,the image showed,the placeLabel show too, but when I click the place it is nothing happen,the elementClicked(OnMapElement element)is not called when I click the place,other two are called(elementEntered and elementLeft).so please help me with this,thanks.

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

The issue here is that BlackBerry scroller/touchpad click does not give keypresses, so normal onKeyDown event is not called and you need to implement NavigationClick/UnClick events. Sample:

// 1.define SELECT keypress for MapComponent
// code 32 is code of "space" of in BB

final UserDefinedKeysMapping keysMapping = new UserDefinedKeysMapping();
...
keysMapping.defineKey(ControlKeys.SELECT_KEY, 32);
...
mapComponent.setControlKeysHandler(keysMapping);

// 2. implement navigationClick/unClick events
// forward them to mapComponent as "space" keypresses
    protected boolean navigationClick(int status, int time) {
        fieldChangeNotify(1);
        keyPressed(32);
        return true;
    }

    protected boolean navigationUnclick(int status, int time) {
        keyReleased(32);
        return true;
    }

/JaakL

jayachandrap
User offline. Last seen 13 weeks 4 days ago. Offline
Joined: 07/07/2011

i tried by using cursor it doesn't work in non touch dvices

jayachandrap
User offline. Last seen 13 weeks 4 days ago. Offline
Joined: 07/07/2011

i tried by using the cursor but it doesn't work