How long to drive between postcodes
Version History 15th October : Bug fix, incorrect distance when the route crossed the IDL 30th September : Bug fix, incorrect behaviour once a 2nd, 3rd etc. Previously it had no update and sometimes retained the value of the previous search driving distance 7th January : Resolved minor issue where driving directions route from old measurement was still appearing when another search was done 13th November : Implemented Google Maps API V3 7th March : New mode of transport added Passenger Aeroplane 2nd December : Now brings up the suggested cities and countries much faster.
Also shows most popular places at the top of the list 20th January : Improved automatic zoom to give more consistent results 15th December : Added Save Data option 29th November : Added Land Transport measurement option 4th November : Dynamic URL to save how far is it between X and Y 21st October : Added GlocalSearch search to find more places automatically 18th July : Fixed drop down lists so they fall over all content below 1st July : Work done on allowing users to add a new locations if they are not on the system 30th June : Page Created with basic functionality Relevant Links Leaflet - a JavaScript library for interactive maps.
By Free Map Tools on 18th October Is there a api for this that we can call to get the distance between two lat longs? By Vineet on 18th October I'm trying to print just the map and finding it way above my pay grade. By Scott on 23rd April Working great.
Very helpful. Sorry By Mabel on 3rd March Showing the most recent 20 out of comments. Add your own comment below and let others know what you think: Comments Your Name optional Post. Site Search. Measure in :. Distance as the Crow Flies :. Choose the: Fastest route Shortest route. Units: Kilometres Miles.
Calculate Stop. Google now require billing to be enabled on your account, so beware of how much you'll be charged. These are formatted by the geocoder and localized according to the language parameter passed with the request. An array of elements, which in turn each contain a status , duration , and distance element.
See DistanceMatrixRow for more information. Contains the status of the request, and may contain debugging information to help you track down why the request failed. See DistanceMatrixStatus for more information. Rows are ordered according to the values in the origin parameter of the request.
Each row corresponds to an origin, and each element within that row corresponds to a pairing of the origin with a destination value. Each row array contains one or more element entries, which in turn contain the information about a single origin-destination pairing.
See DistanceMatrixElement for more information. See DistanceMatrixElementStatus for more information. The total distance of this route, expressed in meters value and as text. The textual value uses the unit system specified with the unit parameter of the original request, or the origin's region. See TextValueObject for more information. The length of time it takes to travel this route, expressed in seconds the value field and as text.
The textual representation is localized according to the query's language parameter. The length of time it takes to travel this route, based on current and historical traffic conditions. The duration is expressed in seconds the value field and as text. The duration in traffic is returned only if all of the following are true:. If present, contains the total fare that is, the total ticket costs on this route.
This property is only returned for transit requests and only for transit providers where fare information is available. An ISO currency code indicating the currency that the amount is expressed in.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4. For details, see the Google Developers Site Policies. Known as the Haversine formula, it uses spherical trigonometry to determine the great circle distance between two points. Wikipedia has more on the formulation of this popular straight line distance approximation.
To visualize the calculation, we can draw a Polyline between the two markers. Add the following lines after the markers in the JavaScript:. Reload the map and you should see a dark, diagonal line connecting the two markers, from one side of Central Park to the other. Using the JavaScript equivalent of the Haversine formula, we can determine the length of the Polyline, the straight distance between our two markers.
The function accepts two marker objects and returns the distance between them in miles. To call the function and report the distance below the map, add this code below your Polyline in the initMap function:.
0コメント