googlemaps
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -47,2 +47,18 @@ var qs = require('querystring'); | ||
// http://code.google.com/apis/maps/documentation/distancematrix/ | ||
exports.distance = function(origins, destinations, callback, sensor, mode, alternatives, avoid, units, language){ | ||
var args = { | ||
'origins': origins, | ||
'destinations': destinations | ||
} | ||
args.sensor = sensor || 'false'; | ||
if(mode){ args.mode = mode; } | ||
if(avoid){ args.avoid = avoid; } | ||
if(units){ args.units = units; } | ||
if(language){ args.language = language; } | ||
var path = '/maps/api/distancematrix/json?' + qs.stringify(args); | ||
makeRequest(path, false, returnObjectFromJSON(callback)); | ||
} | ||
// http://code.google.com/apis/maps/documentation/directions/ | ||
@@ -49,0 +65,0 @@ exports.directions = function(origin , destination , callback , sensor , mode , waypoints , alternatives , avoid , units , language){ |
{ | ||
"name": "googlemaps", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"main": "./lib/googlemaps", | ||
@@ -5,0 +5,0 @@ "description": "A simple way to query the Google Maps API from Node.js", |
@@ -22,2 +22,3 @@ # Google Maps API for Node.js | ||
* [Places](http://code.google.com/apis/maps/documentation/places/) (thx [evnm](https://github.com/evnm)) | ||
* [Distance Matrix](http://code.google.com/apis/maps/documentation/distancematrix/) (thx [duncanm](https://github.com/duncanm)) | ||
@@ -24,0 +25,0 @@ TODO: |
@@ -15,4 +15,4 @@ var vows = require('vows'), | ||
'returns expected lat/lng for Chicago': function(err, result){ | ||
assert.equal(result.routes[0].legs[0].steps[0].end_location.lat , 43.0733) | ||
assert.equal(result.routes[0].legs[0].steps[0].end_location.lng , -89.4024) | ||
assert.equal(result.routes[0].legs[0].steps[0].end_location.lat , 43.07330000000001); | ||
assert.equal(result.routes[0].legs[0].steps[0].end_location.lng , -89.40240000000001); | ||
} | ||
@@ -19,0 +19,0 @@ } |
@@ -14,3 +14,3 @@ var vows = require('vows'), | ||
'returns the expected elevation for Chicago': function(err, result){ | ||
assert.equal(result.results[0].elevation , 178.6981049); | ||
assert.equal(result.results[0].elevation , 178.6981048583984); | ||
} | ||
@@ -47,3 +47,3 @@ } | ||
'returns the expected elevation for Chicago': function(err, result){ | ||
assert.equal(result.results[9].elevation , 178.6981049); | ||
assert.equal(result.results[9].elevation , 178.6981048583984); | ||
} | ||
@@ -129,2 +129,2 @@ } | ||
} | ||
*/ | ||
*/ |
Sorry, the diff of this file is not supported yet
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
95173
10
1901
53
3