Community of VE/MapPoint Users and Developers
This is a discussion on Is it possible to calculate latitud/longitud through address within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi there, Is it possible to calculate latitude and longitude with the help of address. Say you've street address, city, ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Is it possible to calculate latitud/longitud through address Is it possible to calculate latitude and longitude with the help of address. Say you've street address, city, country, post code etc. and you've to calculate the longitude and latitude. Please guide and oblige! Regards
__________________ Learn from cradle to the grave |
| |||
|
Hi, Yes this is good possible. Because each address has a collection of Location objects, however you need a thrick. The CalcPos routine will you find somewhere on this forum (try search on CalcPos). Original in VB fro m Gilles, but various C# copies are posted too. This will start you: Code: FindResults results = mp.ActiveMap.FindAddressResults(street, city, othercity, region, zip, country);
if (results.ResultsQuality <= GeoFindResultsQuality.geoAmbiguousResults)
foreach (object o in results) {
Location loc = o as Location;
if (loc != null) {
double lat;
double lon;
Pushpin PP = mp.ActiveMap.AddPushpin(loc, "");
PP.GoTo();
MPTools.CalcPos(mp.ActiveMap, loc, out lat, out lon);
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| address, calculate, latitud or longitud |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to retrieve complete address from longitudes and latitud | Learner | MapPoint 2006/2009 Discussion | 14 | 01-04-2007 09:40 AM |
| How to retrieve nearest city from longitudes and latitud | fsarraj | MapPoint 2006/2009 Discussion | 3 | 03-08-2006 01:22 PM |
| Calculate distances | Anonymous | MapPoint 2006/2009 Discussion | 1 | 11-18-2004 11:58 AM |
| Calculate route | Anonymous | MapPoint 2006/2009 Discussion | 0 | 07-03-2003 03:25 AM |
| I am having trouble... I am trying to calculate r.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 07-10-2002 11:30 AM |