Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

place-lookup

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

place-lookup

A lightweight Node.js module to get the latitude and longitude for any fuzzy place name using the Google Places API

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

place-lookup

A lightweight Node.js module to get the latitude and longitude for any fuzzy place name using the Google Places API

Dependency Status devDependency Status Code Climate

Install

npm install place-lookup --save

Usage

var placeLookup = require('place-lookup');
var apiKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

placeLookup("oxford", apiKey, function(result){
    console.log(result) // Do whatever with the results
});

Results

{ 
    place_name: 'Paris, France',
    location: { lat: 48.856614, lng: 2.3522219 } 
}

How to get yourself a Google Places API key

  • Head over to The Google Developer Console
  • In the top-left corner select "New Project" from the projects dropdown.
  • In the API's menu, search for "Google Places API Web Service" and ensure it is set to enabled
  • On the Credentials pags: Add Credential --> Server Key --> Give it a name, (leave IP blank if your unsure). Click create
  • The 40-ish digit alpha-numeric code is your new key :)

License

MIT (C) Alicia Sykes

FAQs

Package last updated on 17 Dec 2017

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