Skip to content

A simple way to query the Google Maps API from Node.js

Notifications You must be signed in to change notification settings

duncanm/node-googlemaps

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Google Maps API for Node.js

A simple way to query the Google Maps API from Node.js

This was a quick hack to work with Node.js. Criticism/Suggestions/Patches/PullReq's welcome.

Installation

Installing npm (node package manager)

curl http://npmjs.org/install.sh | sh

Installing googlemaps

npm install googlemaps

Status

APIs implemented:

TODO:

Usage

var gm = require('googlemaps');
var sys = require('sys');

gm.reverseGeocode('41.850033,-87.6500523', function(err, data){
	sys.puts(JSON.stringify(data));
});

gm.reverseGeocode(gm.checkAndConvertPoint([41.850033, -87.6500523]), function(err, data){
	sys.puts(JSON.stringify(data));
});

Both examples print: {"status":"OK","results":[{"types":["postal_code"],"formatted_address":"Chicago, IL 60695, USA"...

All the googlemaps functions follow this scheme: function(required, callback, optional)

All callbacks are expected to follow: function(error, results) Where the error returned is an Error object.

Please refer to the code, tests and the Google Maps API docs for further usage information.

About

A simple way to query the Google Maps API from Node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%