Hi,
(1) If I have a location, is there a way to get latitude and longitude?
(2) How to implement "Location Sensor" in MapPoint 2004, which shows Latitude/Longitude in a small box?
Thanks for help.
This is a discussion on How to get latitude and longitude within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, (1) If I have a location, is there a way to get latitude and longitude? (2) How to implement ...
Hi,
(1) If I have a location, is there a way to get latitude and longitude?
(2) How to implement "Location Sensor" in MapPoint 2004, which shows Latitude/Longitude in a small box?
Thanks for help.
I need to do the same thing.
For estimation of Lat Long
As for the show Location Sensor - if you mean the one built into MapPoint I dont think there currently is a method to ShowLocationSensor in the programming language.Gilles Kohl's "CalcPos" routine is what you need. It can be found in the following article:
http://www.mp2kmag.com/a13--kohl.ext....mappoint.html
It uses the measure distance functionality and a bit of geometry to calculate a location's coordinates.
Richard
_________________
Winwaed Software Technology
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
Ciao,
Calv1ns
Hi,
For the location sensor here is a code snipped from MouseMove event:
The pos.CalcPos is same routine as Gilles Kohl's one.Code:private void MP_MouseMoveEvent(object sender, AxMapPoint._IMappointCtrlEvents_MouseMoveEvent e) { AxMapPoint.AxMappointControl mp = (AxMapPoint.AxMappointControl)sender; Location Loc = mp.ActiveMap.XYToLocation(e.x, e.y); if (Loc != null) { double Lat; double Lon; pos.CalcPos(Loc, out Lat, out Lon); statusStripLat.Text = Lat.ToString("F4"); // is 11 meter nauwkeurigheid statusStripLon.Text = Lon.ToString("F4"); } }
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
There are currently 1 users browsing this thread. (0 members and 1 guests)