MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Saving current view of map

This is a discussion on Saving current view of map within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; My application is used multiple users to view the location of GPS-equipped service trucks. I would like to be able ...


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 04-02-2005
Junior Member
White Belt
 
Join Date: Apr 2005
Posts: 2
Saving current view of map

My application is used multiple users to view the location of GPS-equipped service trucks. I would like to be able to select a menu item and save the current view (lat, lon and altitude), so that I can restore the current view the next time the program starts.

I've tried using XYToLocation to get the location at specific coordinates, but it just doesn't seem to work.

I think I'm missing something simple. Can anyone help?

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
  #2 (permalink)  
Old 04-04-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Hi,

When application is closing save lat,long,alt using the center of the map as reference:

Code:
            int x = MP.Width / 2;
            int y = MP.Height / 2;
            Location Loc = MP.ActiveMap.XYToLocation(x, y);
            pos.CalcPos(Loc, out Lat, out Lon);
            Alt = MP.ActiveMap.Altitude;
When application start restore it:

Code:
            if (Lat + Lon + Alt != 0)
                MP.ActiveMap.GoToLatLong(Lat, Lon, Alt);
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 04-05-2005
Junior Member
White Belt
 
Join Date: Apr 2005
Posts: 2
Thanks for the help - my application can now save and restore a view of the map.

Thanks again!
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
current, map, saving, view


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
How can I show my current gps location in the ocx control orto MapPoint 2006/2009 Discussion 2 07-16-2004 11:54 AM
Getting current GPS coordinates in VB6 Anonymous MapPoint 2006/2009 Discussion 2 06-10-2004 06:09 PM
get longitude/latidude of current view programmaticly Anonymous MapPoint 2006/2009 Discussion 0 03-10-2004 05:45 PM
Is it possible to expand upon the current 255 push.... Anonymous MapPoint 2006/2009 Discussion 1 04-16-2002 10:32 PM
I am the current user of MapPoint2000. I would lik.... Anonymous MapPoint 2006/2009 Discussion 1 01-18-2001 08:28 AM


All times are GMT -5. The time now is 01:39 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


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