Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i cant click on map pin #1

Closed
rincethomas33 opened this issue Apr 10, 2015 · 21 comments
Closed

i cant click on map pin #1

rincethomas33 opened this issue Apr 10, 2015 · 21 comments

Comments

@rincethomas33
Copy link

[Blackberry Java] - i am using touch device. when i click, nothing is happening. when i double click, then map pin is getting focus. how to give focus, when i single click the map pin ?

@jsotuyod
Copy link
Member

Hi, thanks for using our library.

My best guess is that you are not compiling with touch support. Our library support Blackberry OS 4.6+, and such old versions did not support touch events (which where added in 4.7.0).

To support both flavors, our library uses conditional compilation. In particular, we use the variable TouchEnabled to include / filter touch-related code, as can be seen here. Without that definition, touch will be disabled.

You can read more about the preprocessor and how to configure such directives to include / exclude pieces of code here

Please let me know if this solves this issue, so I can close it and add proper clarifications to the README.

@rincethomas33
Copy link
Author

hi, when i double tap on the pin(blackberry 9850 touch device), then only its getting focus. after that i have to click the trackball. then it will show the details of the pin. when i click the tap on the pin, nothing is happening.

@jsotuyod
Copy link
Member

Can you please confirm you have set the TouchEnabled definition for the preprocessor?

@rincethomas33
Copy link
Author

yes . its added.
//#ifdef TouchEnabled
import net.rim.device.api.ui.TouchEvent;
import net.rim.device.api.ui.TouchGesture;
//#endif

@jsotuyod
Copy link
Member

That's on the code, but you need to define it on the project properties:

Project properties example

Just as JDE_4_7_0 is defined there, you need to define TouchEnabled

@rincethomas33
Copy link
Author

when i check the project properties, its showing like below.
img
there is no compile tab.

@jsotuyod
Copy link
Member

What's on your application's descriptor?

@rincethomas33
Copy link
Author

there are 3 tabs on my application's descriptor
build
alternative
app

@jsotuyod
Copy link
Member

Right there on the first one. Bottom left it says "Preprocessor Directives", click on "Add...", add TouchEnabled and make sure it's checked as Active.

@rincethomas33
Copy link
Author

ok. thanks dear friend........ its working now. Thanks a ton........

@rincethomas33
Copy link
Author

in your post mention this too. so it will be helpful to all developers.

@jsotuyod
Copy link
Member

Glad it worked, I'll make sure to update the docs and README with this info.

@rincethomas33
Copy link
Author

one more doubt- if i am using non touch devices, then how user will know which one gets focus ?

@jsotuyod
Copy link
Member

The CustomMap constructor takes a Bitmap as a parameter, which is meant to be used as a crosshair to show trackpad-based devices where they would be clicking.

In this example we are using a blue round crosshair. The crosshair is always in the middle of the map. When you move the trackpad, the map moves around. Once you place the crosshair over a marker, you can click to open it.

@rincethomas33
Copy link
Author

map is not scrolling on non touch devices. when i scroll the trackball, its not moving.

@jsotuyod
Copy link
Member

It won't by default, check the example I talked about before. The code to have it scroll is in there.

@rincethomas33
Copy link
Author

i added the code of key down and repeat. still its not scrolling. i have to add anything else?. zoom in and zoom out is working(using keys "o" and "i")

@jsotuyod
Copy link
Member

No, nothing else should be needed... make sure the MapField ha focus and it should scroll...

@rincethomas33
Copy link
Author

its like something is holding map back :P still its not scrolling

@rincethomas33
Copy link
Author

@rincethomas33
Copy link
Author

did you find any errors in my code? or what i am doing wrong there ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants