MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




XYToLocation Limitations

This is a discussion on XYToLocation Limitations within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Has anyone else experienced a problem with the MapPoint Control and XYToLocation method? I have used this method with VBA, ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-26-2004
Junior Member
Yellow Belt
 
Join Date: Feb 2003
Posts: 28
XYToLocation Limitations

Has anyone else experienced a problem with the MapPoint Control and XYToLocation method? I have used this method with VBA, VB and in several add-ins. Now I am creating an application that uses the MapPoint Control and I receive a run-time error "The parameter is incorrect." According to the documentation, XYToLocation takes an two longs, an x and a y value. There is no mention of a "minimum window size," or a relationship to the altitude. After running this a few times, it looks like the success of the method is dependent upon the altitude and the height and width of the map window. Does anyone have any specifications on this method besides what the documentation has to offer?

Sample output from running my code:
height = window height
width = window width
x = height/2
y = width /2
Long = resultant longitude
Lat = resultant latitude
Alt = current map altitude

Code:
height: 474 width: 788
x: 237 y: 394
Long: -118.340380094652 Lat: 33.7549985135525 Alt: 20

height: 410 width: 700
x: 205 y: 350
Long: -118.343601811638 Lat: 33.7523305436096 Alt: 20

height: 266 width: 658
x: 133 y: 329
-2147024809 The parameter is incorrect.
Long: 0 Lat: 0 Alt: 20


height: 197 width: 591
x: 98 y: 296
-2147024809 The parameter is incorrect.
Long: 0 Lat: 0 Alt: 20

height: 127 width: 579
x: 64 y: 290
-2147024809 The parameter is incorrect.
Long: 0 Lat: 0 Alt: 20

height: 133 width: 414
x: 66 y: 207
-2147024809 The parameter is incorrect.
Long: 0 Lat: 0 Alt: 20

height: 266 width: 525
x: 133 y: 262
Long: -118.362419905387 Lat: 33.7366550973123 Alt: 20

height: 164 width: 180
x: 82 y: 90
Long: -118.301369519975 Lat: 33.7874543229921 Alt: 20

height: 129 width: 170
x: 64 y: 85
Long: -118.316505793891 Lat: 33.7748780336992 Alt: 20

height: 94 width: 241
x: 47 y: 120
-2147024809 The parameter is incorrect.
Long: 0 Lat: 0 Alt: 20

height: 122 width: 236
x: 61 y: 118
Long: -118.359875718943 Lat: 33.7387751003645 Alt: 20


height: 110 width: 221
x: 55 y: 110
Long: -118.300049711108 Lat: 33.7885592398372 Alt: 2
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 06-05-2004
Junior Member
White Belt
 
Join Date: Dec 2003
Posts: 6
Martel,

I am running into the same problem, when the object is out of the window due to zooming, when I redraw the object, I got a run-time error saying that the parameter is invalid. How do you resolve this issue?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 06-07-2004
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 890
Blog Entries: 9
Doesn't XYToLocation map screen coordinates to Locations?

In which case, any X,Y screen coordinate outside of the current window is invalid by definition.
Also, as you zoom in, I would expect the accuracy to get better.


Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
limitations, xytolocation


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
MP2004 - XYToLocation AndyWood MapPoint 2006/2009 Discussion 2 06-05-2006 11:13 AM
plotting pushpin limitations Anonymous MapPoint Web Service and Virtual Earth 2 11-11-2004 12:57 PM
How can I overcome the limitations of "Avoid Area" Anthony_Hunt MapPoint 2006/2009 Discussion 2 05-26-2004 07:58 AM
Limitations of 10,000 records with MapPoint 2002 (Trial) Anonymous MapPoint 2006/2009 Discussion 1 01-05-2003 05:55 PM


All times are GMT -5. The time now is 02:48 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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