Skip to content

yupitel/latlng-address

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

latlng-address

this library is wrapper to call reverse geocoding function in the Google Maps API from node.js

Purpose

get address with latitude / longitude by reverse geocoding.

Parameter

field data type necessity description
latitude double required latitude data
longitude double required longitude data
option object optional about the detail, check below.

Optional parameter

optional parameter is set in the option argument.

Sample Code

About the key data, please register map api servie.
https://developers.google.com/maps/documentation/javascript/examples/geocoding-reverse?hl=ja

const LatLngAdr = require('latlng-address');

const config = {
  key: {YOUR KEY},
  stagger_time: 1000,
  encode_polylines: false,
  secure: true
};

const lla = new LatLngAdr(config);

lla.getAddress(40.782906, -73.965433)
.then((address) => {
  console.log(address);
});

About

get address info with latitude and longitude by google map api

Resources

Stars

Watchers

Forks

Packages

No packages published