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.?
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 ...
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.?
Hi,
You have 2 options to pan programatily:
this is the first:
this is the other: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);
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.Code:MP.ActiveMap.Pan(GeoPanCmd.geoNorth, Amount);
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
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.
Hi,
thats good newsThat's not the answer I wanted but it is the answer I needed![]()
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
There are currently 1 users browsing this thread. (0 members and 1 guests)