| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This is a node module for gecoding.Using this module,we can gecoding a lot of address to GPS.The input could be csv File or txt File,which contains a lot of lines like "UESTC,ChengDu".
$ npm install node-gecoding- [百度地图LBS](http://api.map.baidu.com/lbsapi/cloud/webservice.htm ) - [腾讯地图LBS](http://lbs.qq.com/webservice_v1/guide-geocoder.html)
把申请到的key填入setting.js里(也可以在程序里配置,见测试代码),ps:目前只实现了结果输出到redis数据库的多线程
module.exports = {
bd_maptoken:'baidu-apikey',
tx_maptoken:'tengxun-apikey',
//redis:'localhost',
//post:6379,
//channel:'gecoding'
}格式化输入文件,逗号分割地址与城市[CSV,TXT]
电子科技大学,成都 \n 四川大学,成都 \n 西南财经大学,成都 \n 四川师范大学,成都 \n 西南交通大学,成都 \n
var gcoding=require('node-gecoding');
//参数:文件路径,选择的api
var argument=['./data/hello.txt','tx','./data/hello.csv','bd'];
var cfg = { //与setting配置效果相同
bd_maptoken:'baidu-map-apikey',
tx_maptoken:'tengxun-map-apikey'
}
gcoding.config(cfg);
gcoding.gecoding_aync(argument);| Back | FazBrowse Home | New Git URL |