Community of VE/MapPoint Users and Developers
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 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| drawning manual radius circle according to selected zoom... 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 |
| |||
| 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 |
| |||
| 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 |
| ||||
|
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 Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009 |
| |||
|
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 |
| ||||
|
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 Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009 |
| |||
|
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; 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 |
| ||||
|
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 Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009 |
![]() |
| Tags |
| circle, drawning, manual, radius, selected, zoom |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Radius of a Circle | Gianmaria | MapPoint 2006/2009 Discussion | 1 | 07-14-2006 02:32 PM |
| How to draw radius circle of a specific altitude... | Learner | MapPoint 2006/2009 Discussion | 2 | 03-24-2006 05:17 AM |
| finding the radius of a drawed circle | Wilfried | MapPoint 2006/2009 Discussion | 2 | 06-23-2005 02:45 AM |
| Don't want radius shape to increase it's size when I zoom In | Anonymous | MapPoint 2006/2009 Discussion | 1 | 06-07-2004 05:58 PM |
| Zoom In and Zoom Out event detection | victorf | MapPoint 2006/2009 Discussion | 2 | 10-22-2003 01:56 AM |