Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 8 of 8

drawning manual radius circle according to selected zoom...

This is a discussion on drawning manual radius circle according to selected zoom... within the MapPoint Desktop 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 ...

  1. #1
    Learner is offline Junior Member Yellow Belt
    Join Date
    Feb 2006
    Posts
    18

    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

  2. #2
    Learner is offline Junior Member Yellow Belt
    Join Date
    Feb 2006
    Posts
    18

    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

  3. #3
    Learner is offline Junior Member Yellow Belt
    Join Date
    Feb 2006
    Posts
    18

    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

  4. #4
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60
    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

  5. #5
    Learner is offline Junior Member Yellow Belt
    Join Date
    Feb 2006
    Posts
    18
    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

  6. #6
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60
    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

  7. #7
    Learner is offline Junior Member Yellow Belt
    Join Date
    Feb 2006
    Posts
    18
    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

  8. #8
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60
    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. finding the radius of a drawed circle
    By Wilfried in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 06-10-2009, 10:27 PM
  2. Radius of a Circle
    By Gianmaria in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-14-2006, 02:32 PM
  3. How to draw radius circle of a specific altitude...
    By Learner in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 03-24-2006, 05:17 AM
  4. Don't want radius shape to increase it's size when I zoom In
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 06-07-2004, 05:58 PM
  5. Zoom In and Zoom Out event detection
    By victorf in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 10-22-2003, 01:56 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96