Community of VE/MapPoint Users and Developers
This is a discussion on Center Map to a pushpin? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hello All - Is there a way i can center the map to a pushpin? I would like to animate ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
|
Hi, Yes you can: Code: Location Loc = MP.ActiveMap.GetLocation(Lat, Lon, Alt);
Pushpin PP = MP.ActiveMap.AddPushpin(Loc, "");
PP.Symbol = 1;
MP.ActiveMap.GoToLatLong(Lat, Lon, Alt);
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Hi, Wierd. seems ok to me. ok this is copy/paste should work Code: private void testToolStripMenuItem1_Click(object sender, EventArgs e)
{
double Lat = 51.249434;
double Lon = 4.483;
Double Alt = 1;
Location Loc = MP.ActiveMap.GetLocation(Lat, Lon, Alt);
Pushpin PP = MP.ActiveMap.AddPushpin(Loc, "");
PP.Symbol = 1;
MP.ActiveMap.GoToLatLong(Lat, Lon, Alt);
}
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Hi Wilfried, What language are you using? I can't seem to find this fucntion GoToLatLon. In C++, I normally do a mLoc = mMap.GetLocation(dLat, dLon, dAlt); mpPin = mMap.AddPushpin(mLoc,"Yeehoo"); mpPin.SetSymbol(21); mpPin.SetBalloonState(2); mLoc.GoTo(); |
| |||
|
Hi, this is in C#, but should make no difference as far as it is calling the mappoint functions. Very wierd ! you can also use of course the location.Goto() or also ther is a pushpin.Goto();
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Quote:
|
![]() |
| Tags |
| center, map, pushpin |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Center Point | colin_turner99 | MapPoint 2006/2009 Discussion | 1 | 07-14-2006 02:38 PM |
| Finding Center of Data | kerleyp | MapPoint 2006/2009 Discussion | 2 | 08-18-2005 04:34 PM |
| Find center of a polygon | Anonymous | MapPoint 2006/2009 Discussion | 11 | 05-25-2005 09:54 AM |
| Determining Center of a Zipcode | shaistasohail | MapPoint 2006/2009 Discussion | 0 | 10-21-2002 11:13 PM |
| VB6 + ACCESS : Center to a pushpin and other things... | Anonymous | MapPoint 2006/2009 Discussion | 0 | 09-05-2002 11:40 AM |