Be sure to read the Terms of Service, there is a good chance
you can't use
the yahoo service and be
legit. Specifically the point where it says you cannot use
the Yahoo maps
service for a product/service
that competes with products/services offered by Yahoo.
Yahoo has personals.
For about $150 you can buy the entire US zip code list with
1 year of
updates, or one month for $59.95
from zipcodeworld.com
Note, I think the long/lat method is +/- 10 miles accuracy.
Chris F
_____
From: AspNetAnyQuestionIsOk@yahoogroups.com
[mailto:AspNetAnyQuestionIsOk@yahoogroups.com] On Behalf Of
Mbelcher
Sent: Monday, November 27, 2006 7:50 PM
To: AspNetAnyQuestionIsOk@yahoogroups.com
Subject: RE: [AspNetAnyQuestionIsOk] asp.net calculate
distances between
cities
Thanks I will look into this one.
_____
From: AspNetAnyQuestionIs
<mailto:AspNetAnyQuestionIsOk%40yahoogroups.com>
Ok@yahoogroups.com
[mailto:AspNetAnyQuestionIs
<mailto:AspNetAnyQuestionIsOk%40yahoogroups.com>
Ok@yahoogroups.com] On Behalf Of Rob K
Sent: Sunday, November 26, 2006 8:10 PM
To: AspNetAnyQuestionIs
<mailto:AspNetAnyQuestionIsOk%40yahoogroups.com>
Ok@yahoogroups.com
Subject: Re: [AspNetAnyQuestionIsOk] asp.net calculate
distances between
cities
hi
I went threw this exercise about 6 months ago.
Yahoo's service seemed to be the most robust, reliable,
fastest and cheapest
(at least for the US & Canada + up to 5000 web service
calls/day free from
the same IP).
http://developer. <http://developer.
<http://developer.yahoo.com/maps/rest/V1/geocode.html>
yahoo.com/maps/rest/V1/geocode.html>
yahoo.com/maps/rest/V1/geocode.html (I evaluated several)
The code for doing the longitude/latitude point-to-point
calculation was:
Public Shared Function LatLonDistance( _
ByVal dLat1 As Double, ByVal dLon1 As Double, _
ByVal dLat2 As Double, ByVal dLon2 As Double) As Double
Dim dLat1_rad, dLon1_rad, dLat2_rad, dLon2_rad As Double
Dim a, b, c As Double
Const DegToRad As Double = 180.0 / PI
If Not IsNumeric(dLat1) OrElse _
Not IsNumeric(dLon1) OrElse _
Not IsNumeric(dLat2) OrElse _
Not IsNumeric(dLon2) Then
Return 0.0
End If
dLat1_rad = dLat1 / DegToRad
dLon1_rad = dLon1 / DegToRad
dLat2_rad = dLat2 / DegToRad
dLon2_rad = dLon2 / DegToRad
a = Sin((dLat2_rad - dLat1_rad) / 2.0)
b = Sin((dLon2_rad - dLon1_rad) / 2.0)
c = a * a + Cos(dLat1_rad) * Cos(dLat2_rad) * b * b
Return 3956.088331329 * 2.0 * Atan2(Sqrt(c), Sqrt(1.0 - c))
End Function
This will do street addresses as well as zip code.
Rob
Mbelcher <AspNetAnyQuestionIs
<mailto:AspNetAnyQuestionIsOk%40FarOutComputerSystems.com
>
Ok FarOutComputerSy
<mailto:Ok%40FarOutComputerSystems.com> stems.com>
wrote: Hi people, I am working on a dating
site. I am trying to add the
functionality of being able for the user to enter search
criteria and then
based upon distances it pulls up members. For example to
search for single
women within a 50 mile radius of zip 21207 and have it pull
them up in the
order of closest to the farthest. I have seen this on many
other dating
sites. Is there some free component or place that has
information on how to
code this? I ask here as most are experienced and have
already used the
right tools. There are also a ton of them to purchase as
well and it gets
confusing. I am running things on IIS6 with .net 2.0 and
programming in
vb.net.
Thanks
Mike
[Non-text portions of this message have been removed]
---------------------------------
Check out the all-new Yahoo! Mail beta - Fire up a more
powerful email and
get things done faster.
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:AspNetAnyQuestionIsOk-digest@yahoogroups.com
mailto:AspNetAnyQuestionIsOk-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.c
om/info/terms/
|