Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying To display a Map Image and Use Mouse Move Events
Message
 
To
16/06/2003 16:44:50
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Miscellaneous
Thread ID:
00800526
Message ID:
00800539
Views:
17
*200 dots per inch
*1:80,000 scale
*968 pixels wide
*3231 pixels high
*-80.07 Longitute Left upper
*26.57 Latitude left upper

Perhaps I'm missing something that would result in more complexity.

Basing your lat/long as though it were an XY coordinate, your base XY is -80.07, 26.57. Using a mousemove event on the image would be an offset to those 2 numbers. There's 2 things I can think that would have to also be taken into account as far as the offsets.

1) Do I have a 0 value anywhere on this image, either horizontally or vertically ? If so, where does that occur and how will moving across the image change the offset from my base values ?

2) What is the total scale of my image ? Do I cover 50 degrees long and 30 degrees lat ? If that's the case, your offset per pixel on the image would be ( imgWidth / TotalDegreesLong ) for horizontal and ( imgHeight / TotalDegreesLat ) for vertical. When moving the mouse, these values would tell you how much to add to your base offset when displaying the new location.

If I'm on the right track but you need help with the graphic->pixel->latlong conversion, drop me an email at chrisz@bass-trigon.com. I know nothing about latlongs, but I have spent several years doing work with pixel offset imaging. Fighting with these type conversions can be a little tricky.
Chris Zangarine
Software Development Engineer
Pipeline Compliance System (PCS)
American Innovations
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform