Community of MapPoint and Virtual Earth Users and Developers
This is a discussion on How to send events to the MapPoint Control (in C#) ? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi I would like to be able to move the map to the right, left, down or up but programmatically, ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| How to send events to the MapPoint Control (in C#) ? I would like to be able to move the map to the right, left, down or up but programmatically, with, if possible, functions like SendMessage/PostMessage that would be "DllImported" into a C# project + A mappoint control (2002 version). Thank you very much if anyone has the solution to this, its urgent thanks |
| |||
|
Hi, Possible there are other ways, but I tryed this one: 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);
Then at last I change the Latiude and call the GoToLatLong method. But like I say it seems a little overkill. Possible there is a simple function call to do this
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Hi, On this link you find how to calculate lat and long given a Location objectt: http://www.mp2kmag.com/mappoint/disc...pic.asp?t=3291
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Hi, I found another method: Code: MP.ActiveMap.Pan(GeoPanCmd.geoNorth, Amount); "PanFactor Optional Double. Amount to pan, expressed as a fraction of the screen width or height. " But how large is that fraction ? I did a few experiment, and a vaule of 1 pan the map half the distance it fills on the screen.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| control, events, mappoint, send |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Send SMS through COM | Anonymous | MapPoint 2006/2009 Discussion | 3 | 06-09-2008 06:25 AM |
| Catch mappoint events using C++ (without MFC...) | Jeurink | MapPoint 2006/2009 Discussion | 8 | 03-15-2005 04:35 AM |
| Triggering Events in MapPoint... | joer1234 | MapPoint 2006/2009 Discussion | 0 | 09-29-2004 10:52 PM |
| How does Microsoft send you updates on MapPoint 20.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 11-21-2001 06:53 AM |
| How do I send you information to be updated for yo.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 11-19-2001 07:48 AM |
Majorca Holiday
Enjoy a Majorca holiday at a good price when you check out the offers on UlookUbook for this popular destination!