MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




How to draw radius circle of a specific altitude...

This is a discussion on How to draw radius circle of a specific altitude... within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi there, I'm working on a C# desktop application with MapPoint2004 ActiveX control for Europe. I've to allow user to ...


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

Today's Posts Twitter Feed 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 03-22-2006
Junior Member
Yellow Belt
 
Join Date: Feb 2006
Posts: 18
Send a message via MSN to Learner Send a message via Yahoo to Learner
How to draw radius circle of a specific altitude...

Hi there,
I'm working on a C# desktop application with MapPoint2004 ActiveX control for Europe. I've to allow user to draw circles over the map. Everything looks fine until map is on default zoom/altitude. But when the map is zoomed in or zoomed out then circle drawn is not adjusted according to the map's zoom. While floating this question one of the member advised the link to see an article on microsoft site. Here is that link
http://support.microsoft.com/?kbid=2...br /> Regards
__________________
Learn from cradle to the grave
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 03-22-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,177
Hi,

I dont understeand your question. Maybe it is because we speak different languages..
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 03-24-2006
Junior Member
White Belt
 
Join Date: Mar 2006
Posts: 1
Zoomin

Hi

I had a similar problem - it seems that ConvertToPoint does not take into account the Zoom property of the MapSpecification object because it makes use of a View, not aMapSpecification.

The View is then used by the MapSpecification and the MapSpecification is used by GetMap to render the map. Since ConvertToPoint doesn't have zoom info it can't take it into account.

To overcome the problem I worked out a formula to adjust my pixel coordinates taking zoom into account. This seems to work. Perhaps it can be adapted to help with your problem.

I am setting the locations of controls on my "pbMap" picturebox to the points worked out below. These controls were added previously.


PixelCoord[] arrayPoints = new PixelCoord[listStatusObjects.Count];
arrayPoints = renderService.ConvertToPoint(arrayLatLong, currentView, pbMap.Width, pbMap.Height);

for (int i = 0; i < listStatusObjects.Count; i++) //listStatusObjects.Count
{
double z = 1 / currentZoom;
double Xtrans = (arrayPoints[i].X * z) - (pbMap.Width/2 * (z -1));
double Ytrans = (arrayPoints[i].Y * z) - (pbMap.Height/2 * (z -1));

pbMap.Controls[i].Left = (int)Xtrans;
pbMap.Controls[i].Top = (int)Ytrans;
}
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
altitude, circle, draw, radius, specific


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
finding the radius of a drawed circle Wilfried MapPoint 2006/2009 Discussion 4 3 Weeks Ago 09:27 PM
Radius of a Circle Gianmaria MapPoint 2006/2009 Discussion 1 07-14-2006 01:32 PM
drawning manual radius circle according to selected zoom... Learner MapPoint 2006/2009 Discussion 7 03-24-2006 07:06 AM
radius to altitude sharkbait MapPoint 2006/2009 Discussion 1 06-23-2004 10:22 AM
How do I draw a circle, rectangle, ellipse or free.... Anonymous MapPoint 2006/2009 Discussion 1 05-26-2000 12:35 PM


All times are GMT -5. The time now is 12:29 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Bodrum Holiday
Check out the picturesque towns on your Bodrum holiday... Book through UlookUbook!



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