MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Embedded ActiveX control - locationtoX/Y probs...

This is a discussion on Embedded ActiveX control - locationtoX/Y probs... within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; My app needs to find out whether a list of locations (lat,lon) are in the currently displayed screen. The latest ...


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 04-14-2004
Junior Member
White Belt
 
Join Date: Apr 2004
Posts: 10
Send a message via ICQ to 208_Fireball
Embedded ActiveX control - locationtoX/Y probs...

My app needs to find out whether a list of locations (lat,lon) are in the currently displayed screen.

The latest method involves making a location object for each list item's lat and lon, and then calling locationtox and locationtoy to find out the screen position of each lat/lon.

This method is very costly when performing this process for sizeable lists (gets painful after about 1000 at once), I guess mainly due to needing to call the interfaces for all those 1000+ times.

Can anyone suggest ways that I can cut down this painful delay time?

An idea is if I can work out the projection MapPoint uses, I should be able to use the map's altitude, centre lat/lon and the screen width/height to calculate the screen x/y for given lat/lons, taking the load off the interface between me and mappoint, and putting the blame on me if anything's slow

I browsed the forum and could not find any answers to this question.

Any ideas would be appreciated. If there's any more info you'd like me to provide, please don't hesitate to ask.

Thanks,

Fireball
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 04-14-2004
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 899
Blog Entries: 10
If you get a handful of points (ideally widely spaced on the screen) you should be able to calculate your own mapping, assuming you are zoomed in enough that you can assume a "flat Earth". Then the transformation from longitude,latitude to screen coords in a linear transformation.


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
  #3 (permalink)  
Old 06-22-2004
Junior Member
White Belt
 
Join Date: Apr 2004
Posts: 10
Send a message via ICQ to 208_Fireball
Unfortunately I'm not allowed to limit the users to flat-earth-accurate zooms.

A colleague pointed out the projection formula http://mathworld.wolfram.com/MillerC...rojection.html - it maps the 'x' coordinate by subtracting it from a reference longitude, and calculates the 'y' coordinate by a sort of hyperbola transfer function, which gives an output of +/- ~2.303 for a range of input latitudes of +/- 90 degrees.

Can anyone assist me in getting from these formulas to a screen position?

Thanks,

Dave
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 07-05-2004
Junior Member
White Belt
 
Join Date: Apr 2004
Posts: 10
Send a message via ICQ to 208_Fireball
Re: Embedded ActiveX control - locationtoX/Y probs...

Projection's now sorted, but unfortunately, MapPoint does not use what it says is 9200m where the projections swap.

Using the mappoint altitude slider:

In the data-populated map areas, whilst increasing altitude, the map will change from Orthographic to Miller at 11000m. Whilst decreasing altitude, the map will change back to Orthographic at 8000m.

In non-data-populated map areas (E.g., Australia), whilst increasing altitude, the map will change from Orthographic to Miller at the same 11000m, but whilst decreasing altitude, the map will change back to Orthographic at 6000m!

This makes it pretty hard to predict where to use each projection. Any ideas?

Cheers,

Dave
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 07-12-2004
Junior Member
White Belt
 
Join Date: Apr 2004
Posts: 10
Send a message via ICQ to 208_Fireball
Problem solved. I just tried to note the uncertainty area - over the whole map, between 12500 and 5500 you can be uncertain of which projection MapPoint is in, so I just implemented a 4-point "Accuracy Test" of my manually calculated projections. It's normally sorted with the first point, but there are 4 there just incase

Cheers,

Dave
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
activex, control, embedded, locationtox or y, probs


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
Re: Keyboard control in mappoint activex control djcapslock MapPoint 2006/2009 Discussion 1 03-10-2005 11:16 AM
Embedded Graphics and MP Control Anonymous MapPoint 2006/2009 Discussion 3 01-27-2005 05:18 PM
ActiveX Control Anonymous MapPoint 2006/2009 Discussion 3 09-04-2002 06:44 PM
I am trying to build an activeX control using Map.... Anonymous MapPoint 2006/2009 Discussion 1 08-24-2001 06:05 PM
I am using the MapPoint ActiveX control in a VB Ap.... Anonymous MapPoint 2006/2009 Discussion 1 08-24-2001 07:35 AM


All times are GMT -5. The time now is 08:49 PM.


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 55