View Single Post

  #2 (permalink)  
Old 03-29-2005
Winwaed's Avatar
Winwaed Winwaed is offline
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 848
Blog Entries: 7
You could compare the settings in the two Location objects.

Eg. is it a street address? If so, do they match?
Are they positioned by coordinates? If so, do they match?


You could also use Gilles code (on this website) that finds the longitude and latitude of any Location object. You will have to be careful with rounding errors and decide on a tolerance value for comparing - a simple, are they equal? does not working with floating point numbers.

Eg. is lat1 == lat2?
Should really use the check lat1>(lat2-EPS) AND lat1<(lat2+EPS)

EPS should be very small - this is your tolerance value.


Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009
Reply With Quote