MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




AfterViewChange event and Map.Location

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


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-14-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
AfterViewChange event and Map.Location

In my event handler for AfterViewChange, I access the Location property of the Map and a few other properties of the Map, none of which cause an AfterViewChange event. WHen I click on the edge of the map to scroll it, it goes crazy, not stopping the scrolling for a while.

Any ideas on what the problem is? Ulitmately my goal is to get the latitude and longitude of the map.
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 03-14-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Hi,

probably the edge clicking will fire an AfterViewchange...
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 03-14-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Re: AfterViewChange event and Map.Location

Hi,

Quote:
Originally Posted by Joemomma
Ulitmately my goal is to get the latitude and longitude of the map.
what do you exacly mean by that ? A lat / long pair is just a point!
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 03-14-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
The goal is that when the user changes the view, I need to update another piece of software with the user's map's current location. So the other piece of software will be "following" the user's map.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 03-14-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Hi,

Dont understeand, please enlighten more....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 03-14-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 03-15-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
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.
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
afterviewchange, event, maplocation


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


All times are GMT -5. The time now is 09:16 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map

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!


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