New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mlop-geo

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mlop-geo

mlop-geo

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Usage example

var mlopGeocoder = require('mlop-geo');

var options = {
  provider: 'aliyun',
  httpAdapter: 'http-aliyun' // 若是阿里云地图 必须指定为 http-aliyun 对阿里云请求与结果都做了处理
};


var geocoder = mlopGeocoder(options);

// Using callback
geocoder.reverse({
  lat: 31.2303122784 ,
  lon: 121.4735623090
  }, function(err, res) {
  console.log(res);
});

//Or using Promise
geocoder.reverse(
  {
    lat: 31.2303122784 ,
    lon: 121.4735623090
  }
  )
 .then(function(res) {
    console.log(res);
  })
  .catch(function(err) {
    console.log(err);
  });

// output
[ { adcode: '310101',
    country: '中国',
    province: '上海',
    city: '上海',
    district: '黄浦区',
    provider: 'aliyun' } ]
    

FAQs

Package last updated on 15 Feb 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