Community of VE/MapPoint Users and Developers
This is a discussion on AfterViewChange event and Map.Location within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; In my event handler for AfterViewChange, I access the Location property of the Map and a few other properties of ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| AfterViewChange event and Map.Location Any ideas on what the problem is? Ulitmately my goal is to get the latitude and longitude of the map. |
| |||
|
Hi, probably the edge clicking will fire an AfterViewchange...
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: AfterViewChange event and Map.Location
Hi, Quote:
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Hi, Dont understeand, please enlighten more....
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Let's say you have two maps running. The user pans to a new location on one of the maps. I want to tell the other map to pan to that same location. Theoretically, this can be done using the AfterViewChange event by getting the first map's Location object, and then calculating the latitude and longitude of that Location object. Next, I would tell the second map to set its Location to the same latitude/longitude of the first map's Location property. |
| |||
|
Hi, Now I understeand. For the first map just find the center of the map by Width / 2 and Height / 2 to get x, y. For the second map use XYToLocation(x, y).GoTo(); to pan to the specific point. Eventually you can also save / use Altitude to get them both at same zoom level. The problem you had in your event handler is probably due to lengty code. Try make it as efficient as possible in speed, or execute it "outside" the event handler, eg by posting a message to a custom message handler.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| afterviewchange, event, maplocation |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Trying to get the MapPoint.Location at a mouse event | BobFromBoston | MapPoint 2006/2009 Discussion | 6 | 07-30-2005 07:41 AM |
| Where is the Quit event? | Anonymous | MapPoint 2006/2009 Discussion | 3 | 04-08-2005 07:36 AM |
| VC++ OnSelectionChange event | MP2KUser2 | MapPoint 2006/2009 Discussion | 0 | 10-13-2004 01:24 PM |
| How to add click event for VB.Net ? | Anonymous | MapPoint 2006/2009 Discussion | 2 | 12-31-2003 12:15 AM |
| mouse down event | henemonster | MapPoint 2006/2009 Discussion | 1 | 03-31-2003 02:04 PM |
Cheap flights to Lisbon
Experience the amazing sight of the Lisbon Coast yourself. Pick from a selection of cheap flights to Lisbon on Holiday Hypermarket.
City Break Holidays
Top 10 City Breaks Holidays. Based on holidays booked this year, these are the most popular City Breaks Holidays for 2006
Cheap Flights to Cape Town
Here at dealchecker.co.uk we’ll shop around for cheap flights to Cape Town so you don’t have to. Find and Compare prices from over twenty UK travel agents with just one search.
Nile Cruises
Nile cruises are one of the best ways to discover the riches of Egypt. See ancient ruins and lush verdure from the River Nile. Book today!
Egypt
In Egypt you find an ancient city buzzing with life. There is an abundance of historical sites to see, not just the pyramids. The Opera House is certainly worth a visit and you can enjoy some open-air theatre too.
Holiday
For the holiday of your life, that is easy to plan, visit Travel.co.uk to see all the options.
Cheap Portugal Holidays
Hotels of all ratings! Find information on cheap Portugal holidays at On The Beach!