googlemaps
Advanced tools
Comparing version 1.1.3 to 1.2.0
/** | ||
* Node.js native modules | ||
*/ | ||
var qs = require('querystring'); | ||
var qs = require('qs'); | ||
var crypto = require('crypto'); | ||
@@ -14,2 +14,4 @@ | ||
var qsConfig = { indices: false, arrayFormat: 'repeat' }; | ||
if (config.google_client_id && config.google_private_key) { | ||
@@ -22,3 +24,3 @@ args.client = config.google_client_id; | ||
// signature = signature.replace(/\+/g,'-').replace(/\//g,'_'); | ||
var query = qs.stringify(args).split(''); | ||
var query = qs.stringify(args, qsConfig).split(''); | ||
for (var i = 0; i < query.length; ++i) { | ||
@@ -41,3 +43,3 @@ // request will escape these which breaks the signature | ||
} else { | ||
return path + "?" + qs.stringify(args); | ||
return path + "?" + qs.stringify(args, qsConfig); | ||
} | ||
@@ -44,0 +46,0 @@ |
/** | ||
Transfors an array of styles into a pipe separeted string | ||
Transforms an array of style objects into an array of pipe separated strings | ||
@@ -11,6 +11,16 @@ input = [ | ||
} | ||
}, | ||
{ | ||
'feature': 'landscape', | ||
'element': 'all', | ||
'rules': { | ||
'visibility': 'off' | ||
} | ||
} | ||
] | ||
output = feature:road.local|element:all|hue:0x00ff00 | ||
output = [ | ||
"feature:road|element:all|hue:0x00ff00", | ||
"feature:landscape|element:all|visibility:off" | ||
] | ||
**/ | ||
@@ -43,4 +53,4 @@ | ||
}).join('|'); | ||
}); | ||
} |
{ | ||
"name": "googlemaps", | ||
"version": "1.1.3", | ||
"version": "1.2.0", | ||
"main": "lib/index", | ||
@@ -35,2 +35,3 @@ "description": "A simple way to query the Google Maps API from Node.js", | ||
"check-types": "~1.3.2", | ||
"qs": "^4.0.0", | ||
"request": "~2.44.0", | ||
@@ -37,0 +38,0 @@ "waitress": ">=0.0.2" |
50003
1147
4