New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

flaneur-geocoder

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flaneur-geocoder

Node geocoder, relying on coordinate and Google Places ID to fetch where a location is, via Google Maps

latest
Source
npmnpm
Version
2.3.0
Version published
Maintainers
2
Created
Source

flaneur-geocoder

Build Status Dependencycy status npm version

Introduction

This module intends to help developers using Google Maps and Google Places API to get consistent geocoding returns, with search-oriented information.

Usage

const FlaneurGeocoder = require('flaneur-geocoder')
const geocoder = new FlaneurGeocoder({ apiKey: ... })
geocoder.findWhereIs(48.8381, 2.2805)
.then((result) => {
    console.log(result)
})

Will ouput:

{ types: [ 'locality', 'political' ],
  enPoliticalComponents:
   { locality: 'Paris',
     administrative_area_level_2: 'Paris',
     administrative_area_level_1: 'Île-de-France',
     country: 'France' },
  name: 'Paris',
  location: { lat: 48.856614, lng: 2.3522219 },
  viewport:
   { northeast: { lat: 48.9021449, lng: 2.4699208 },
     southwest: { lat: 48.815573, lng: 2.224199 } },
  searchSettings:
   { coordinate: { lat: 48.856614, lng: 2.3522219 },
     tag: null,
     aroundPrecision: 5097.866542628929,
     aroundRadius: 40782.93234103143 },
  query: { lat: 48.8381, lng: 2.2805 } }

Tests

As for regular usage, tests require a Google Places API Key. To run tests locally, please setup a GOOGLE_PLACES_FLANEUR_API_KEY environment variable with your API key.

Releasing

# Update the version number in `package.json`
npm install
git tag vX.Y.Z
git push origin vX.Y.Z
npm publish

CI

This project is using Travis. As such, maintainers should pay attention to provide the API key set up with Travis machines IP addresses.

Keywords

geocoder

FAQs

Package last updated on 09 May 2018

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