Socket
Book a DemoInstallSign in
Socket

google-places-browser

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-places-browser

Google place API client for the browser

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
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

google

FAQs

Package last updated on 24 Feb 2016

Did you know?

Socket

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.