Community of MapPoint and Virtual Earth Users and Developers
This is a discussion on Wrong answer from ConvertToLatLong within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I'll try to make this short and understandable. I am trying to get the CORRECT lat/long points from a rendered ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Wrong answer from ConvertToLatLong I am trying to get the CORRECT lat/long points from a rendered image in a picturebox using the ConvertToLatLong function. As you mouse over (or click ) the X and Y of the picture box are passed into the "convert" function which then gives you the lat/long correspning to that point. 1. If I create a brand new MapView, choose a centerpoint and don't set any MapOptions I get the correct results. BUT... 2. If I set scale (or height & width) I get whacked out results. The same goes for zooming or panning (even after #1 above). So for example when my program first comes up I would like to see the US. So I create a new MapView and set the height and width at like 4000. I click on an area like Buffalo, NY which should give me (lat/long of 40s/-70s) and I get things in the (17s/-108s) I have tried a NUMBER of different work arounds and I have read the documentation over and over. I just don't understand why it is messed up. One thing I can say is if I run #1 and then zoom out say (3x) - I get the view of the US. My CenterPoints in both #1 and #1-zoom3 are the same,, my scale, height, width and ESPECIALLY Bounding Rectangle are all VERY different, BUT the only thing I have adjusted is the Zoom. I hope someone can help me out. If I have not been clear, please let me know. Thanks in advance. Daryl |
| ||||
|
Did you figure out the solution to your problem? There's a geodesy library on this site you might poke around: http://www.mp2kmag.com/articles.asp?...odesy.mapstuff Let us know if you figure it out.. Eric
__________________ |
| |||
|
I did figure it out - after extensive testing it was user error. I had switched X and Y in a function call, but what masked that as the fact was that when you were zoomed in close, it really didn't matter what the X and Y pixles were, you were looking at a SMALL difference in lat/long on a close zoom so it "seemed" like it was the ConvertFunction was working because you got "correct looking" results. Only when the mapped was zoomed out did the difference in X,Y and Lat/Long manifest itself. With the X and Y switched I was getting very strange values when looking at a map zoomed out to say the "USA" level. -Daryl |
![]() |
| Tags |
| answer, converttolatlong, wrong |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Nobody knows the answer? How to retrieve the name of country | Abilio Serafim | MapPoint 2006/2009 Discussion | 1 | 04-29-2005 10:09 AM |
| PLZ... answer me coz am very very new ! | tracking_sys | MapPoint 2006/2009 Discussion | 0 | 01-28-2004 01:43 AM |
| In response to an answer that I received earlier. .... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 05-13-2002 12:57 PM |
| Thanks for the answer on Pocket Streets map size. .... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 11-14-2001 06:41 PM |
| 27/10/01 Thanks for your previous answer but the .... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 10-26-2001 11:42 PM |
Ibiza Holiday
Visit the party capital of Europe with an Ibiza holiday! Check out the deals online on UlookUbook...