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

Just hand it to me

This is a discussion on Just hand it to me within the MapPoint Desktop Discussion forums, part of the Map Forums category; I want to programatically select the pan mode, (the cursor is a hand) rather than a pointer that allows me ...

  1. #1
    PMACAFEE is offline Member Yellow Belt
    Join Date
    Dec 2004
    Posts
    41

    Just hand it to me

    I want to programatically select the pan mode, (the cursor is a hand) rather than a pointer that allows me to rubber band a square.

    Can someone help, I looked through the docs.?

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

    You have 2 options to pan programatily:

    this is the first:

    Code:
                double Lat;
                double Lon; 
                Int32 x = MP.Height / 2; 
                Int32 y = MP.Width / 2; 
                double Alt = MP.ActiveMap.Altitude; 
                Location Loc = MP.ActiveMap.XYToLocation(x, y); 
                pos.CalcPos(Loc, out Lat, out Lon); 
                Lat += 1; 
                MP.ActiveMap.GoToLatLong(Lat, Lon, Alt);
    this is the other:
    Code:
    MP.ActiveMap.Pan(GeoPanCmd.geoNorth, Amount);
    With the first one you can of course exacly pan the amount of distance you want. The CalcPos does a Geocode from out of the location. You find various article here to do it.

  3. #3
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Wilfried, That's not the answer I wanted but it is the answer I needed.

    What I wanted to do was be able to use the mouse pan mode in my control. I found the two settings:

    MapCntrl.MousePointer = geoPointerHand
    MapCntrl.ActiveMap.DragBehavior = geoDragHand

    But my next question was was going to be on how to hold a perspective (position and altitude/zoom) while (or after) adding new reverse-geocoded pins.

    I think your code is perfect for that thanks.

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

    That's not the answer I wanted but it is the answer I needed
    thats good news

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. customized drawing toolbar with circle and free hand only?
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 01-19-2005, 04:37 PM
  2. I am trying my hand on Mappoint . I am trying to p....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 08-01-2002, 10:18 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