Socket
Socket
Sign inDemoInstall

googlemaps

Package Overview
Dependencies
0
Maintainers
0
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    googlemaps

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


Version published
Weekly downloads
17K
decreased by-7.24%
Maintainers
0
Install size
93.8 kB
Created
Weekly downloads
 

Readme

Source

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:

  • Geocoding
  • Directions
  • Elevation
  • Places (thx evnm)
  • Distance Matrix (thx duncanm)

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.

FAQs

Last updated on 24 Jul 2011

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc