Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by150%
Maintainers
1
Weekly downloads
 
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

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

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc