Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 3 of 3

Wrong answer from ConvertToLatLong

This is a discussion on Wrong answer from ConvertToLatLong within the MapPoint Desktop 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 ...

  1. #1
    dpietrocarlo is offline Junior Member White Belt
    Join Date
    Sep 2002
    Posts
    1

    Wrong answer from ConvertToLatLong

    I'll try to make this short and understandable.

    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

  2. #2
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4
    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
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  3. #3
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Nobody knows the answer? How to retrieve the name of country
    By Abilio Serafim in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 04-29-2005, 10:09 AM
  2. PLZ... answer me coz am very very new !
    By tracking_sys in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 01-28-2004, 01:43 AM
  3. In response to an answer that I received earlier. ....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-13-2002, 12:57 PM
  4. Thanks for the answer on Pocket Streets map size. ....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-14-2001, 06:41 PM
  5. 27/10/01 Thanks for your previous answer but the ....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 10-26-2001, 11:42 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83