From 998a57074e2eea3411754747ca10dbadf5e149a1 Mon Sep 17 00:00:00 2001 From: Sugendran Ganess Date: Thu, 15 Sep 2011 18:04:09 +1000 Subject: [PATCH] added the detail call for google places --- lib/googlemaps.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/googlemaps.js b/lib/googlemaps.js index 0b12c90..dcf3c0e 100644 --- a/lib/googlemaps.js +++ b/lib/googlemaps.js @@ -16,6 +16,18 @@ exports.places = function(latlng, radius, key, callback, sensor, types, lang, na makeRequest(path, true, returnObjectFromJSON(callback)); } +exports.placeDetails = function(referenceId, key, callback, sensor, lang) { + var args = { + reference: referenceId, + key: key + } + if (lang) args.lang = lang; + args.sensor = sensor || 'false'; + + var path = '/maps/api/place/details/json?' + qs.stringify(args); + makeRequest(path, true, returnObjectFromJSON(callback)); +} + // http://code.google.com/apis/maps/documentation/geocoding/ exports.geocode = function(address , callback , sensor , bounds , region , language){ var args = {