MapPoint Forums

MapForums

Community of VE/MapPoint 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 ...


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

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-13-2005
Member
Yellow Belt
 
Join Date: Dec 2004
Posts: 44
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,017
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


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 11:21 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5
MP2K Magazine
Visitor Map

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!


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