MapField with Points - blackberry

I want to make a screen where i have to show the map with the all received lat and long. and i want to show this map in 200*200 resolution only.
Can i make the point bitmap as focusable so i can be click on it and show other screen.

How to show more than one location in Blackberry MapField?
hope this link helps you in solving your problem;Do you have any idea how to display a small text box kind of thing when multiple points are selected?

Related

Detect text in a scanned page

I'm trying to detect the text in a scanned page and get the coordinates of it.
See the attached image for an example of scanned page.
I need the vertical coordinates for spliting page from the useless parts, and then detect the text's coordinates.
What kind of tools could I use to split and detect text's coordinates?
Take a look at the Stroke Width Transform.
See also this SO answer.

Getiing BGR values by clicking a particular location of an image

Is there any method in Opencv using which when we click on a particular location of an image, it gives pixel location as well as B,G,R values. Thank You!
There is an answered similar post here.
Basically, you need to use setMouseCallback() and create your own callback function.
You can start from here to get the mouse location: http://www.wisegai.com/2012/10/29/using-mouse-callbacks-with-opencv-and-the-cvhighgui-module/
(I don't know in which coordinate system will be the click, i.e. of the window, of the image or of the screen)
And these might help for the second part.
How to read the screen pixels?
Screen Capture Specific Window
In term of coordinates it might have an impact the window frame, you'll have to try or google a little bit further.

Show popup window for visible spots on globe

I have a globe, similar to http://mrdoob.github.com/three.js/examples/webgl_trackballcamera_earth.html.
My globe has some spots on different locations (f.ex. Paris, Rome or London). Whenever one of these spots come into view, a popup window with additional information to that location should popup appear, and again disappears when that spot rotates out of view, quite similar to http://workshop.chromeexperiments.com/cloudglobe/.
You need 3D coordinates of those points and you need to transform(rotate or whatever) them with globe. Then use this code http://www.opengl.org/wiki/GluProject_and_gluUnProject_code to get screen space coordinates of those points. After that it is simple question of HTML, CSS and some javascript. You know where they are on screen so, for example, you can put some absolute positioned divs with text. But you will need to check on which side of globe those spots are - use rotation phase of the sphere or z-coordinate of the point or simple do color-based picking to see if this spot is visible.

How to set field position on screen at any point on blackberry?

I am new to blackberry and i want to set one of my Field position to the left corner of screen & another field at right corner of screen at same level but i am unable to do it.how could it be possible?
I also don't want to give coordinate as a hard coded value but want to calculate using screen width & height cause i want to run same application on Torch I & Torch II model of blackberry.
Thanks in advance
Put AbsoulteFieldManager on screen and then you will have ability to set custom positions for your fields with add(field, x, y).
Take a look on this tutorial.

Detect touch coordinates on a sinle UIImageview

I have a single imageview with a static country map divided into regions of that country. What I'd like to do is detect the touch location on the image and provide content about the corresponding region. Since region borders are not linear, how can I save each region's area? Do I need several imageviews (or even custom UIButtons with those images) each belonging to one region or is it possible the way I'd like?
This is the first thing that came to my mind so maybe there is a simpler and better way which I'd love to hear about and I couldn't know how to search for this so apologies if there is a duplicate. And of course I'd appreciate the help.
Thanks
One simple & exact way would be to use Ole Begemann's OBShapedButtons - one for each state.
This will allow you to detect exactly which state was selected. Simply put image of each state in separate buttons (with transparent surroundings) and align buttons next to eachother so that state-borders allign one to another.
Buttons will detect the location of the press and if one button was pressed on its transparent region the touch will be passed along until the correct button gets it.
The simplest way to do something like what you want would be to just put some UIButtons over the top of your UIImageView, making their type custom (so they are transparent). Generally fill in the area of each country with UIButtons. If you test your app, you will probably notice that people will touch the center of each country, so I wouldn't worry about getting 100% coverage. Depending on the shape of the countries, one or two square UIButtons would probably be enough.
If you did want to go the 100% coverage route, you could embed each country in a separate UIImageView subclass, and when you detect a touch anywhere, go through each country image and see if the point touched isn't transparent. When you hit that (a non-transparent pixel) you have found the country. See this post for relevant code: How to get the color of a pixel in an UIView?

Resources