Cities Within A 50 Mile Radius

Dynamically redirect a web surfer based on their geographic location.
Can also insert localized, geographic content into a web page.

Moderators: Moderators, GeobytesAdmins

Cities Within A 50 Mile Radius

Postby TDietsch » Thu Oct 18, 2007 5:15 pm

Is there any way to get a list of all cities and their codes within a 50 mile radius? The Online Location String Generator lists up to 60 km or 37 miles.
Tony
TDietsch
 
Posts: 3
Joined: Thu Oct 18, 2007 4:22 pm

Re: Cities Within A 50 Mile Radius

Postby Adrian » Thu Oct 18, 2007 6:03 pm

TDietsch wrote:Is there any way to get a list of all cities and their codes within a 50 mile radius? The Online Location String Generator lists up to 60 km or 37 miles.
Yes, one way would be like this:
Code: Select all
http://glrs.geobytes.com/map.htm?GetNearByCities&Radius=50&LocationCode=USILCHIC&template=<geobytes%20city>,%20&units=miles
or in km...
http://glrs.geobytes.com/map.htm?GetNearByCities&Radius=100&LocationCode=USILCHIC&template=<geobytes%20city>,%20&units=km

and as may be obvious, your can change the template parameter to get back which ever parameter that you may require. The available parameters are listed here: http://www.geobytes.com/TagsHeaders.htm
So to return the location codes of near by cities, along with the the city names, you could use:
Code: Select all
http://glrs.geobytes.com/map.htm?GetNearByCities&Radius=50&LocationCode=USILCHIC&template=<geobytes%20locationcode>%20<geobytes%20city>,%20&units=miles

That is assuming that you were looking for a hosted solution, however there are many other ways - such as downloading our "almost free" GeoWorldMap database and then using the sample queries that are listed here: http://forums.geobytes.com/viewtopic.php?t=352
And of course if you are running your own GeoSelect server, then you could direct the above sample requests at it, rather then our server at glrs.geobytes.com

In any case, please let me know if I can assist further.
Adrian
“When it absolutely, positively has to be there, try looking in your Spam folder.” - Adrian McElligott - July 2009
--
Have you tried the Local Search facility on the IP Locator Page yet?
User avatar
Adrian
Moderator
 
Posts: 968
Joined: Thu Nov 20, 2003 9:58 am

GeoDirection City Radius

Postby TDietsch » Thu Oct 18, 2007 8:18 pm

I am trying to redirect all users within a 50 mile radius of my city using GeoDirection. Do I need to list all of the location codes within that radius to accomplish this or is there a more efficient way?
Tony
TDietsch
 
Posts: 3
Joined: Thu Oct 18, 2007 4:22 pm

Re: GeoDirection City Radius

Postby Adrian » Fri Oct 19, 2007 7:03 am

TDietsch wrote:I am trying to redirect all users within a 50 mile radius of my city using GeoDirection. Do I need to list all of the location codes within that radius to accomplish this or is there a more efficient way?


ok - there are two ways to do this, depending on whether you want to send each city within the specified radius to their own custom page or to a common page for all of the cities within the defined area.

This script uses the -r parameter to direct all visitors from within a 80 kilometer radius of USOHTOLE to a target page called MyPage.html after 5 seconds.
Code: Select all
<script language="Javascript"
src="http://gd.geobytes.com/gd?pages=USOHTOLE -r 80&targetpage=MyPage&ext=html&after=5">
</script>


From what I currently understand of your requirements, it is probably what you are looking for. However there is another way to use this 'radius' facility, and that is "without specifying a target page" as we did in the above example.

If you omit the target page parameter from the above example, then GeoDirection will redirect each city's traffic to its own page - you would need a landing page for each city with in the radius - as the script will automatically redirect to the users 'city page'. (A city page being something like - USOHTOLE.html)

Like I said, this option - without the targetpage parameter is most likely not what you are looking for as you would still need to look up all of the location codes for all of the surrounding cities - and worse still create pages for each city. However, while this might seem like a complete waste of time, it is very handy when the server is dynamically creating the pages on the fly - the URI part of the URL tells the server which page to create, but again, it is probably not of much use when you are creating the pages manually.

Another option as you have indicated is to just include a coma separated list of all of the location codes and then redirect to a nominated page manually - as shown in this example: http://www.geobytes.com/GeoDirection.ht ... tePageName
The advantage of this method, while more complex, is that you get more control.

Please let me know if I can assist further.
Adrian
“When it absolutely, positively has to be there, try looking in your Spam folder.” - Adrian McElligott - July 2009
--
Have you tried the Local Search facility on the IP Locator Page yet?
User avatar
Adrian
Moderator
 
Posts: 968
Joined: Thu Nov 20, 2003 9:58 am

follow up q on radius q

Postby ExitSpeed » Fri Oct 26, 2007 11:27 pm

so how do we get the response of this code

http://glrs.geobytes.com/map.htm?GetNea ... &template=<geobytes%20city>,%20&units=miles

into a variable to use in our javascript? I need to get the cities around 50 miles of this location, then check that list against my list of BigCities.

any ideas? thanks
ExitSpeed
 
Posts: 6
Joined: Thu Oct 25, 2007 4:14 pm

Postby MattGSO » Wed Jan 23, 2008 4:17 pm

Silly Question:

I'd like to get a list of cities and zips within a 50 mile radius of 27107. I just need the list.

Is there a way to gernate that?
MattGSO
 
Posts: 1
Joined: Wed Jan 23, 2008 4:12 pm

Postby Adrian » Wed Jan 23, 2008 5:15 pm

Sorry, but unfortunately we can not provide all of the zip codes. - try searching Google for "zip codes" - there are a lot of providers there.
Adrian
“When it absolutely, positively has to be there, try looking in your Spam folder.” - Adrian McElligott - July 2009
--
Have you tried the Local Search facility on the IP Locator Page yet?
User avatar
Adrian
Moderator
 
Posts: 968
Joined: Thu Nov 20, 2003 9:58 am

Re: Cities Within A 50 Mile Radius

Postby gentlebug » Thu Sep 10, 2009 6:26 pm

Can someone help me? I need to find a list of cities within a certain radius. The cities change and so do the distances.
gentlebug
 
Posts: 1
Joined: Thu Sep 10, 2009 6:15 pm

Re: Cities Within A 50 Mile Radius

Postby mandville » Fri Sep 11, 2009 1:38 pm

Such a list is a bit difficult, can you explain how you plan to use it?
Claire. Forum Moderator, Research and GDB Team
User avatar
mandville
Moderator
 
Posts: 445
Joined: Fri Jul 09, 2004 7:56 pm
Location: brighton UK

Re: Cities Within A 50 Mile Radius

Postby Benet_ » Fri May 13, 2011 9:11 am

i think you need to use search engine to find such a list, this information must be in the net
Benet_
 
Posts: 1
Joined: Fri May 13, 2011 7:49 am

Re: Cities Within A 50 Mile Radius

Postby willjthomas » Sun Nov 27, 2011 9:24 pm

How about google maps? Woun´t they give you a list of where you are and what is in the vicinity? Nearest towns and their zip codes.

Best,
will
willjthomas
 
Posts: 3
Joined: Sun Nov 27, 2011 9:09 pm
Location: Iceland

Re: Cities Within A 50 Mile Radius

Postby ihanna » Tue Jun 05, 2012 2:38 am

I've been trying to do this too but to no avail. I'll try it again.. :)

“I am always doing things I can’t do. That is how I get to do them.” -Pablo Picasso
ihanna
 
Posts: 2
Joined: Tue Jun 05, 2012 2:26 am

Re: Cities Within A 50 Mile Radius

Postby ihanna » Tue Jun 05, 2012 9:33 am

TDietsch wrote:Is there any way to get a list of all cities and their codes within a 50 mile radius? The Online Location String Generator lists up to 60 km or 37 miles.


wow.. I think this is a tough one. But I want to learn this too. So far, the replies here are pretty helpful.

thanks,

hanna

“I am always doing things I can’t do. That is how I get to do them.” -Pablo Picasso
ihanna
 
Posts: 2
Joined: Tue Jun 05, 2012 2:26 am

Re: Cities Within A 50 Mile Radius

Postby farnandes89 » Fri Aug 17, 2012 8:46 pm

Adrian wrote:
TDietsch wrote:Is there any way to get a list of all cities and their codes within a 50 mile radius? The Online Location String Generator lists up to 60 km or 37 miles.
Yes, one way would be like this:
Code: Select all
http://glrs.geobytes.com/map.htm?GetNearByCities&Radius=50&LocationCode=USILCHIC&template=<geobytes%20city>,%20&units=miles
or in km...
http://glrs.geobytes.com/map.htm?GetNearByCities&Radius=100&LocationCode=USILCHIC&template=<geobytes%20city>,%20&units=km

and as may be obvious, your can change the template parameter to get back which ever parameter that you may require. The available parameters are listed here: http://www.geobytes.com/TagsHeaders.htm
So to return the location codes of near by cities, along with the the city names, you could use:
Code: Select all
http://glrs.geobytes.com/map.htm?GetNearByCities&Radius=50&LocationCode=USILCHIC&template=<geobytes%20locationcode>%20<geobytes%20city>,%20&units=miles

That is assuming that you were looking for a hosted solution, however there are many other ways - such as downloading our "almost free" GeoWorldMap database and then using the sample queries that are listed here: viewtopic.php?t=352
And of course if you are running your own GeoSelect server, then you could direct the above sample requests at it, rather then our server at glrs.geobytes.com

In any case, please let me know if I can assist further.


Great post.Thanks for the post and also for code.Really helpful to get cities. :)
farnandes89
 
Posts: 1
Joined: Fri Aug 17, 2012 8:34 pm


Return to GeoDirection

Who is online

Users browsing this forum: No registered users and 0 guests