Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ifit/node-googlemaps
Browse files Browse the repository at this point in the history
  • Loading branch information
grobot committed Nov 14, 2012
2 parents f4e7563 + ea37e35 commit 6ef025b
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 3 deletions.
33 changes: 33 additions & 0 deletions .gitignore
@@ -0,0 +1,33 @@
lib-cov
*.seed
*.log
*.node
*.o
*.o.d
*.mk
*.gypi
*.cache.py
*.wafpickle-7
*.lock-wscript
*.csv
*.dat
*.out
*.pid
*.gz
*.swp
.DS_Store
dump.rdb
.jshintrc

pids
logs
results

/public/js/app.js
/public/css/style.css
npm-debug.log
/client/config.js
.build
/docs

/node_modules
9 changes: 7 additions & 2 deletions lib/googlemaps.js
Expand Up @@ -297,7 +297,7 @@ exports.staticMap = function(center, zoom, size, callback, sensor ,

// http://code.google.com/apis/maps/documentation/streetview
exports.streetView = function(size, location, callback, sensor,
heading, fov, pitch) {
heading, fov, pitch, urlOnly) {
var args = {
'size': size,
'location': location
Expand All @@ -324,7 +324,12 @@ exports.streetView = function(size, location, callback, sensor,
args.sensor = sensor || 'false';
var path = '/maps/api/streetview';

return makeRequest(path, args, false, callback, 'binary');
if (urlOnly) {
return 'http://maps.googleapis.com' + buildUrl(path, args)
}
else {
return makeRequest(path, args, false, callback, 'binary');
}
};

// Helper function to check and convert an array of points, be it strings/numbers/etc
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -25,4 +25,4 @@
"scripts": {
"test": "NODE_ENV=test vows test/*.js --spec"
}
}
}

0 comments on commit 6ef025b

Please sign in to comment.