MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




drawning manual radius circle according to selected zoom...

This is a discussion on drawning manual radius circle according to selected zoom... within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi there, I'm using MapPoint2004(Europe) for my C# application. I've to let user draw circle of his/her own choice with ...


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 02-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
drawning manual radius circle according to selected zoom...

Hi there,
I'm using MapPoint2004(Europe) for my C# application. I've to let user draw circle of his/her own choice with the drag of mouse over the map. The circle need to be zoom-sensitive and should be readjusted automatically with the zoom in or zoom out. It should be the same radius circle functionality as is in the standard drawing toolbar of map Point. While doing this, I've got the following problem:
When the original map is zoomed to 150Km, the circle is drawn ahead of the mouse movement. And when the map is zoomed to 36000Km the circle is drawn far behind the mouse movement.
In my view, the problem can be solved if length-to-kilometer ratio of radius can be changed in accordance with the selected zoom.
Anybody with solution or suggestions in this regard is highly obliged.
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 02-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
drawning manual radius circle according to selected zoom...

Hi There,
Is there anyway to change the zoom factor of autoshape that is going to be drawn according to the zoom factor of the map?
Thanks for considering my problem in advance.
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
  #3 (permalink)  
Old 02-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
drawning manual radius circle according to selected zoom...

Hi There,
In connection with my aforesaid problem is there anyway to change the zoom factor of autoshape that is going to be drawn according to the zoom factor of the map?
Thanks for considering my problem in advance.
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
  #4 (permalink)  
Old 02-22-2006
Winwaed's Avatar
Mapping-Tools.com
Black Belt
 
Join Date: Feb 2004
Posts: 1,142
Blog Entries: 22
Converting the "Zoom Altitude" to a true Nx magnification zoom is difficult. You need to know some things like the screen and window dimensions...

I would look at trying to do something different to get the same "big picture" effect that you're after. (why does it need to change with the zoom level?)


Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
See the Geoweb Guru for online mapping
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 02-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
Thank you very Richard for sparing some precious moments to consider my problem. I'd really like to know what would be your course of action in this sort of situation. Please share and oblige.
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
  #6 (permalink)  
Old 02-23-2006
Winwaed's Avatar
Mapping-Tools.com
Black Belt
 
Join Date: Feb 2004
Posts: 1,142
Blog Entries: 22
The discussion/How-To is here:

http://support.microsoft.com/?kbid=297348

Note the parameters that you need.


As I said before, it is difficult to get a good result - I would try to think about the big-picture of what you are trying to achieve, and try a different approach.



Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
See the Geoweb Guru for online mapping
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 03-24-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
Hi WinWaed,
I've seen the article on How to draw circle in accordance with map zoom but I cann't stay cleared about how to use the calculated Altitude in drawing the circle. Secondly, the method "RadiusToAltitudeKM" that calculates the Altitude there returns very small value of altitude something like .0000..........
I've tried to convert the method in C# and it looks like
Code:
double dblScreenWidth = Screen.GetBounds(new Point(0,0)).Width;
double dblScreenHeight = Screen.GetBounds(new Point(0,0)).Height;
double dblPhysicalWidth = SystemInformation.PrimaryMonitorSize.Width;
double dblPhysicalHeight = SystemInformation.PrimaryMonitorSize.Height;
double dblPercentW = dblScreenWidth / this.ctlMap.ActiveMap.Width;
double dblAltitudeW = dblPercentW * pdblRadius / (2.5 * (dblPhysicalWidth / 2));
double dblPercentH = dblScreenHeight / this.ctlMap.ActiveMap.Height;
double dblAltitudeH = dblPercentH * pdblRadius / (2.5 * (dblPhysicalHeight / 2));
double dblReturnAlt = (dblAltitudeW > dblAltitudeH)?dblAltitudeW:dblAltitudeH;
return dblReturnAlt;
Don't know whether I could convert it accurately or not since it is calculating altitude in fraction like .0000.....
Secondly where should this newly calculated altitude be used to solve the problem.
If you can help me solve this problem through this approach or with some different approach it will be so kind of you.
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
  #8 (permalink)  
Old 03-24-2006
Winwaed's Avatar
Mapping-Tools.com
Black Belt
 
Join Date: Feb 2004
Posts: 1,142
Blog Entries: 22
Using doubles looks like a good idea - integer maths could give you some odd rounding results (like zeros). I would also check your units.

To be honest I haven't done much with the above article. I found it when I first started working with MapPoint and filed it for the future. I was trying to find a more useful zoom - ie. "zoom so the window is 100 miles across".
In the end I just made approximate recommendations.

You would then use the altitude to set your shape size.
(higher altitude => wider shape - I think it should actually be a linear relationship)

I will repeat (again), I don't think you are going to get a satisfactory result and you should seriously reconsider the overall concept of what you are trying to achieve.


Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
See the Geoweb Guru for online mapping
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
circle, drawning, manual, radius, selected, zoom


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
How to draw radius circle of a specific altitude... Learner MapPoint 2006/2009 Discussion 2 03-24-2006 04:17 AM
Don't want radius shape to increase it's size when I zoom In Anonymous MapPoint 2006/2009 Discussion 1 06-07-2004 04:58 PM
Zoom In and Zoom Out event detection victorf MapPoint 2006/2009 Discussion 2 10-22-2003 12:56 AM


All times are GMT -5. The time now is 11:05 PM.


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

Tenerife Holiday
Find a great deal on a Tenerife holiday through UlookUbook! Check out the options online...



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