473,320 Members | 1,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Google Maps X mile radius form a point

Good morning,
I didn't see a forum for Google Maps so I figured this would be the best place to post. My question has more to do with geocoding than JS, but I will be using JS to perform the search and the calculations. First of all I want to convert miles to lat lng. Say my Lat is 43.5643 what would be the Lat's 5 miles in either direction.

Here's what I'm working on. I have an XML file with all the lat's and lng's (Geopts) of locations. I'm trying to allow a user to perform a search for locations within a selected distance from an address, zip, or city/state. I've already set up all the framework to verify the address and geocode it. In order to save calls to Google Maps Client Geocoder I want to perform all the caculations without using distanceFrom(). For my pourposes a bounding box is fine. We don't need to refine it to an actual circle. I know there is probably a framework already setup for this, but I want to actually learn it myself. So your help will be greatly appreciated.

Thank you,
CpVermont
Mar 8 '08 #1
2 2545
hsriat
1,654 Expert 1GB
First of all I want to convert miles to lat lng. Say my Lat is 43.5643 what would be the Lat's 5 miles in either direction.
One latitude is approx 69 Miles (found on google).

And there is no uniform conversion of longitudes into miles. Distance between longitudes is maximum at equator and 0 at poles.

But I know one thing that it takes 4 minute for Sun to move from one longitude to the next.

So at a particular latitude, you can find distance between longitudes by dividing the latitudinal circumference of that latitude with (24*60/4).

milesInOneLongitude = latitudinalCircumference / (24*60/4)


Harpreet
Mar 8 '08 #2
One latitude is approx 69 Miles (found on google).

And there is no uniform conversion of longitudes into miles. Distance between longitudes is maximum at equator and 0 at poles.

But I know one thing that it takes 4 minute for Sun to move from one longitude to the next.

So at a particular latitude, you can find distance between longitudes by dividing the latitudinal circumference of that latitude with (24*60/4).

milesInOneLongitude = latitudinalCircumference / (24*60/4)


Harpreet
First of all I want to thank Harpreet for taking the time to check up on this for me. After reading the replies I was able to do some more research into this. I checked out google maps api and found out that the distanceFrom() function does not use google's geocoder. So I plan on using a loop to loop through all the Geopts and a filter to exclude the ones that are obviously too far and then use google's distanceFrom() to get the exact matches. So again Thank You Harpreet.
Mar 11 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Sean | last post by:
Have you ever wanted to add the great features inherent in Google Maps? Here is how you do it. ============== == STEP ONE == ============== Create a new MS Access form called frmGoogleMap....
0
by: windandwaves | last post by:
Hi Folk Some of you may find this function useful. It makes it easier to create maps using Google Maps. I link it to a database of points. The main use of the function is that it creates all...
1
by: xahlee | last post by:
Elisp Tutorial: Make Google Earth Xah Lee, 2006-12 This page shows a example of writing a emacs lisp function that creates a Google Earth file, and creates a link to the file, as well a link...
3
by: Harch84 | last post by:
Hi I am using a javascript for google maps to geocode two locations and I thin want to retrieve the two coordinates and enter them into a Perl Script. Now I have managed to set up the page with the...
1
by: sunnyluthra1 | last post by:
Hi, I was creating an Application in MS Access for Geocoding a particular Address from Google to get the Lat & Long. I successfully able to did that. Here is the code:...
6
by: pagina21 | last post by:
I am a true beginner in Access and coding. I am creating a database with facility information and I want to use the address of a specific facility to display a map on my form or at least open a...
3
by: Phil Stanton | last post by:
I have a button on a form which when pressed displays a google map of the address. Code is Private Sub Googlemap_Click() MakeURL ("") End Sub
0
by: TrevRex | last post by:
Hello, I work for a non-profit in San Diego as a GIS Specialist. I have had to teach myself about some scripting to create some dynamic maps, but I am still very limited in my skills, so I have...
5
by: Nike1984 | last post by:
I'm fairly new to Javascript and it's more of a guessing game for me... I'm trying to build an app for Google Maps and just had some issues recently. First off I just wanted to say that everything...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.