Community of VE/MapPoint Users and Developers
This is a discussion on getAddress(ldouble lat, double lon) (And a question with it) within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi All, i'm using this function.. and i wonnna share this with other members.. it seem that many have ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| getAddress(ldouble lat, double lon) (And a question with it) i'm using this function.. and i wonnna share this with other members.. it seem that many have the same question.. how do i transform a lat/lon to a valid address.. here we go.. this is the function i use.. Code: public override string getAddress(double lat, double lon)
{
string address = "";
MapPoint.FindResults results;
MapPoint.Location mLoc = this.mMap.Location.Location;
mLoc = this.mMap.GetLocation(lat, lon);
results = this.mMap.ObjectsFromPoint(this.mMap.LocationToX(mLoc), this.mMap.LocationToY(mLoc));
foreach (object o in results)
{
try
{
MapPoint.Location Loc = (MapPoint.Location)o;
if (Loc != null)
{
address += Loc.StreetAddress.City + " - " + Loc.StreetAddress.Street;
}
}
catch(System.Exception ex)
{
}
}
System.Diagnostics.Trace.WriteLine(address);
return address;
} I've got a question bout the way mappoint handles this problem to.. the result of this functions vary from map zoom in my app.. at different zoom i have different results.. for someone knows much.. is there a way to get the most precise info???? regards, Gianmaria |
| |||
|
Hi, Thanks for feedback. This sure benefit others ! I did edit your message to put the code into "code" block for better readability. I hope you dont mind Yes Mappoint is more or less human I have had weard results sometime with Atlitude of 0, and I always seems to have good results with Altitude of 1
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| vb.net to c# question... | starbuck | MapPoint 2006/2009 Discussion | 0 | 09-14-2004 04:07 AM |
| question | Anonymous | Wish List | 0 | 07-12-2004 06:05 AM |
| Double Click on a Pushpin | Anonymous | MapPoint 2006/2009 Discussion | 4 | 02-28-2004 06:26 PM |
| Double Click on map | Anonymous | MapPoint 2006/2009 Discussion | 0 | 08-08-2003 06:42 PM |
Cheap Florida Flights
Cheap Florida flights are a reality when you book online at Holiday Hypermarket. We search leading tour operators to show you top deals.
European City Breaks
Book European city breaks with Travel Counsellors. A personal travel counselor will help plan your European city break.
Thailand Holidays
Thailand Holidays can suit your budget when you book with dealchecker.co.uk. If you are strapped for cash, visit online to find the deal for you.
Holidays to Cancun
The Holiday Place has special offers on holidays to Cancun during the month of September. Book a late summer holiday with us!
Cheap Canaries Holidays
Are you hunting down cheap Canaries holidays? Well check out ulookubook.com to bag a great value holiday. There are numerous festivals taking place all year round. Why not book your holiday around one?
Holidays
At Travel.co.uk the options for holidays are endless. Do some online comparison shopping!
Cheap Lanzarote Holidays
The Canary Islands beckons you to come! View information on cheap Lanzarote holidays at On The Beach!