Socket
Socket
Sign inDemoInstall

google-places-browser

Package Overview
Dependencies
4
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-places-browser

Google place API client for the browser


Version published
Maintainers
1
Weekly downloads
3

Weekly downloads

Readme

Source

google-places-browser Build Status

Google place API client for the browser

Install

$ npm install --save google-places-browser

Usage

var Autocomplete = require('google-places-browser/autocomplete')
var Places = require('google-places-browser/places')

var autocomplete = Autocomplete(window.google)
var places = Places(window.google)

autocomplete.places({input: 'San Francisco'}, function (err, results) {
  //=> handle err/result array  
})

places.details({placeId: 'id'}, function (err, place) {
  //=> handle err/place  
})

API

All API methods wrap Google's callback in Node-style (err, args...) errbacks. Errors have a code property that exposes the the returned service status.

Places(google) -> object
google

Required
Type: object

The Google Maps JS API.

Returns an alternate place API with the following methods that wrap the PlacesService class:

  • details
  • nearby
  • radar
  • text
Autocomplete(google) -> object
google

Required
Type: object

The Google Maps JS API.

Returns an alternate autocomplete API with the following methods that wrap the AutocompleteService class:

  • place
  • query

License

MIT © Ben Drucker

Keywords

FAQs

Last updated on 24 Feb 2016

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