NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > General Marketplace > Web Development > Web Development Wanted
Reload this Page Search Script Zip Code Distance Option

Web Development Wanted Requests for websites, templates, custom programming, logos or graphics.

Advanced Search
0 members in live chat ~  
NamePros Design Contests NamePros Design Contests
Forum Sponsorship
Join in on the FUN! You can start an affordable design contest and pick from entries talented members submit or you can enter a design contest for a chance to win CASH PRIZES! What are you waiting for? Get started in the fun TODAY! - Banners, Logos, Mascots, and MORE! (Please READ the design Contest section rules Prior to starting or entering a contest)



Closed Thread
 
LinkBack Thread Tools
Old 07-17-2007, 12:51 PM THREAD STARTER               #1 (permalink)
Senior Member
Join Date: Dec 2004
Location: Florida
Posts: 2,627
Fewski has much to be proud ofFewski has much to be proud ofFewski has much to be proud ofFewski has much to be proud ofFewski has much to be proud ofFewski has much to be proud ofFewski has much to be proud ofFewski has much to be proud ofFewski has much to be proud ofFewski has much to be proud of
 


Save The Children

Search Script Zip Code Distance Option


I have a search script that right now when you enter a zip code, it only finds ads that are in the zip code. I want it to have a few options (50 miles, 100 miles, 200 miles, and 500 miles).

Please let me know your quote.

Like I said, I have the script to do the search - I just need someone to add a zip code distance option.

Thanks
Fewski is offline  
Old 07-19-2007, 03:33 AM   #2 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,074
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
Just a note. Before you can do something like that you will need to buy a database such as the 1 http://www.teamredline.com/ offer.

This will give you the longitude and latitude of the zip codes which then enable you to work out the distance.
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Old 08-01-2007, 04:56 PM   #3 (permalink)
jsp
Account Suspended
 
jsp's Avatar
Join Date: Sep 2006
Location: Washington, DC
Posts: 243
jsp is a name known to alljsp is a name known to alljsp is a name known to alljsp is a name known to alljsp is a name known to alljsp is a name known to all
 



Longitude and Latitude are not implemented in google maps
jsp is offline  
Old 08-01-2007, 05:19 PM   #4 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,074
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
Originally Posted by additionalfriends
Longitude and Latitude are not implemented in google maps
Who said anything about google maps. The op wanted to be able to work out the distance between 2 zip codes. Google maps was never mentioned.
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Old 08-01-2007, 05:21 PM   #5 (permalink)
jsp
Account Suspended
 
jsp's Avatar
Join Date: Sep 2006
Location: Washington, DC
Posts: 243
jsp is a name known to alljsp is a name known to alljsp is a name known to alljsp is a name known to alljsp is a name known to alljsp is a name known to all
 



easily the best, most efficient, and cheapest solution to your problem, but if not your interest..understood
jsp is offline  
Old 08-01-2007, 05:30 PM   #6 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,074
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
If i remember correctly to calculate the distance between 2 points using data retrieved from google maps is quite complex. I am sure I have a book around somewhere that explains how to do it and it entails calculating the curvature of the earth etc.
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Old 08-01-2007, 06:38 PM   #7 (permalink)
jsp
Account Suspended
 
jsp's Avatar
Join Date: Sep 2006
Location: Washington, DC
Posts: 243
jsp is a name known to alljsp is a name known to alljsp is a name known to alljsp is a name known to alljsp is a name known to alljsp is a name known to all
 



Not actually too involved, as most of the most complex operations are integrated...Uses the Haversine formula, implemented in JavaScript is:


var R = 6371; // km
var dLat = (lat2-lat1).toRad();
var dLon = (lon2-lon1).toRad();
var a = Math.sin(dLat/2) * Math.sin(dLat/2) +
Math.cos(lat1.toRad()) * Math.cos(lat2.toRad()) *
Math.sin(dLon/2) * Math.sin(dLon/2);
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
var d = R * c;

where var d is your distance-
And no need to buy a zip code database, I have one you can have for free, if interested.
????: NamePros.com http://www.namepros.com/web-development-wanted/351184-search-script-zip-code-distance-option.html

____________________
BUT, as far as what youre trying to do it sounds like some additonal iterations of your search script, in combination with a distance modifier would do the job, i have a good idea of what would be required to do this, if interested let me know
Last edited by additionalfriends; 08-01-2007 at 06:45 PM.
jsp is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 12:31 AM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger