View Full Version : Navigation purpose

17th March 2011, 12:31
I might be wrong here!!!!!!!!!!
Is it possible get the co-ordinate value of an image(say for example map) when user click the mouse button on that image....If so ............how?
I want to perform it on qt gui application
please provide me some materials to read for this purpose...:)

17th March 2011, 13:23
You can easily get the X/Y location of a pixel within an image.

If you want the geographic coordinates from a picture of a map - no, there's no simple way to do that without knowing the map projection used and the transform between the map projection and the display space. Even then, the mathematics can range from relatively simple to quite complex.

But the picture itself generally won't be sufficient to get you there.

17th March 2011, 14:01
You can easily get the X/Y location of a pixel within an image.
can I get the pixel value on clicking the mouse...If so how?

17th March 2011, 14:17
Read the documentation for whatever display framework you are using.

17th March 2011, 14:40
what do you mean by documentation of display framework .....please be specific

17th March 2011, 18:24
please NEED helping hand in this topic

17th March 2011, 18:59
If your using a Qt class to display the image then that class will mostly likely inherit QWidget and so will receive mouse movements and mouse buttons like all other widgets, so you can just subclass the object or implement an event listener on it. It really depends on what you want to do, maybe the ideal thing would be to create something like a ImageMap class that inherits from QImage for better encapsulation.