MapPoint Forums

MapForums

Community of MapPoint and Bing Maps Users and Developers




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


Go Back   MapPoint Forums > Map Forums > MapPoint Desktop Discussion

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-08-2005
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.?
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 01-08-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Location: Belgium
Posts: 2,318
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.
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 01-08-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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.
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 01-09-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Location: Belgium
Posts: 2,318
Hi,

Quote:
That's not the answer I wanted but it is the answer I needed
thats good news
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
hand


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
customized drawing toolbar with circle and free hand only? Anonymous MapPoint Desktop Discussion 1 01-19-2005 03:37 PM
I am trying my hand on Mappoint . I am trying to p.... Anonymous MapPoint Desktop Discussion 1 08-01-2002 09:18 PM


All times are GMT -5. The time now is 07:08 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
MP2K Magazine
Visitor Map



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