MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




getAddress(ldouble lat, double lon) (And a question with it)

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 the ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Today's Posts Twitter Feed 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 05-13-2005
Member
Yellow Belt
 
Join Date: Dec 2004
Posts: 47
getAddress(ldouble lat, double lon) (And a question with it)

Hi All,
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;
}
this is c# code.. but can be easly transformned to vb.

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
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 05-13-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,177
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 From a large altitude it does not see all details

I have had weard results sometime with Atlitude of 0, and I always seems to have good results with Altitude of 1
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
double, getaddressldouble, lat, lon, question


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
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


All times are GMT -5. The time now is 08:29 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Dalaman Holiday
Enjoy a wonderfully peaceful Dalaman holiday... Book through UlookUbook and save!



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 56 57 58 59