Skip to content

Latest commit

 

History

History
35 lines (33 loc) · 1.26 KB

README.md

File metadata and controls

35 lines (33 loc) · 1.26 KB

Notice: This repo is completely unused and can be deleted.

Status

Latest Build

Circle CI

Master Build

Circle CI

Use

Note: This is a very thin wrapper over https://github.com/nchaulet/node-geocoder

var locate = require('makerbot-locate');
locate('11201', function(err, result) {
  if (err) console.error(err);
  console.log(result);
  /* [{
    formattedAddress: 'Brooklyn, NY 11201, USA',
    latitude: 40.6986772,
    longitude: -73.9859414,
    extra:
     { googlePlaceId: 'ChIJ10KLdUlawokRxmIQu1GuCHk',
       confidence: 0.5,
       premise: null,
       subpremise: null,
       neighborhood: null,
       establishment: null },
    administrativeLevels: { level1long: 'New York', level1short: 'NY' },
    zipcode: '11201',
    city: 'New York',
    country: 'United States',
    countryCode: 'US'
  }] */
});

Results are memoized so subsequent calls with the same address string should return almost instantly.