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 3 of 3

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 Desktop 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 ...

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

    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

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    I dont understeand your question. Maybe it is because we speak different languages..

  3. #3
    lesliev is offline 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;
    }

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. drawning manual radius circle according to selected zoom...
    By Learner in forum MapPoint Desktop Discussion
    Replies: 7
    Last Post: 03-24-2006, 08:06 AM
  4. radius to altitude
    By sharkbait in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 06-23-2004, 11:22 AM
  5. How do I draw a circle, rectangle, ellipse or free....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-26-2000, 01:35 PM

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