🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

baidu_map

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

baidu_map

wrapper of Baidu map API

1.2.0
latest
Source
npm
Version published
Weekly downloads
2
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

npm download npm version

nodejs sdk for http://lbsyun.baidu.com/index.php?title=webapi (Baidu map)

APIs

See Baidu Web API Doc

Installation

$ npm install baidu_map

General Usage

var BaiduMap = require('baidu_map');

// Get an api object for a certain ak/sk
var baiduMap = BaiduMap(
  {
    ak: 'ak',
    // Optional, if provided, it will calculate the sn every request
    sk: 'sk',
    // Optional, default json, could be xml
    output: 'xml'
  });

// Supported API
{
  geocoder: "/geocoder/v2/",
  direction: "/direction/v1",
  directionRouteMatrix: "/direction/v1/routematrix",
  locationIp: "/location/ip",
  geoconv: "/geoconv/v1/",
  placeSuggestion: "/place/v2/suggestion/",
  placeSearch: "/place/v2/search",
  placeDetail: "/place/v2/detail",
  placeEventSearch: "/place/v2/eventsearch",
  placeEventDetail: "/place/v2/eventdetail"
}

// Sample call
baiduMap.geocoder({city: '深圳市', address: 'some where'}, (err, res, body) => {
  // do something with the response
});

License

license

Keywords

baidu

FAQs

Package last updated on 20 Apr 2016

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