偶尔用点儿POI数据,所以写了一个下载器。用到的东西还真不少。
功能点
+编写翻页脚本
+CSharp与JS交互
+POI数据转换json
+CSharp的json序列化类
+CSharp读写json
+存储POI到txt
+jquery关联翻页
使用方式:
变更查询内容,直接修改Index.htm中local.search("宾馆");
保存功能,点击菜单保存。即可写入文件。
保存的数据
{"uid":"5211d21944d50b417dc87633","title":"北京锡华商务酒店","point":{"lat":"39.995309","lng":"116.309385"},"address":"北京市海淀区颐和园路12号(海淀体育中心院内)","url":"http:\/\/map.baidu.com\/?s=inf%26uid%3D5211d21944d50b417dc87633%26c%3D131&i=0&sr=1","city":"北京市","phoneNumber":"(010)62646688","postcode":null,"type":0,"isAccurate":false,"province":"北京市","tags":["<font color=\"#c60a00\">宾馆<\/font>","星级<font color=\"#c60a00\">宾馆<\/font>酒店","四星级"],"detailUrl":"http:\/\/api.map.baidu.com\/place\/detail?uid=5211d21944d50b417dc87633&output=html&source=jsapi"}
{"uid":"0a15c7ec249f99e5ed74f804","title":"布丁酒店(北京中关村店)","point":{"lat":"39.958209","lng":"116.342268"},"address":"北京市海淀区大柳树路23号","url":"http:\/\/map.baidu.com\/?s=inf%26uid%3D0a15c7ec249f99e5ed74f804%26c%3D131&i=0&sr=1","city":"北京市","phoneNumber":"(010)59705500","postcode":null,"type":0,"isAccurate":false,"province":"北京市","tags":["<font color=\"#c60a00\">宾馆<\/font>"],"detailUrl":"http:\/\/api.map.baidu.com\/place\/detail?uid=0a15c7ec249f99e5ed74f804&output=html&source=jsapi"}
http://blog.csdn.net/wdxzkp/article/details/10948903
http://www.oschina.net/code/snippet_555043_25852