2017年1月24日

leaflet简单例子,绘制多边形

摘要: var crs = L.CRS.EPSG900913; var map = L.map('map', { crs: crs, width: '100%', height: '100%', maxZoom: 17, editable: true, renderer: new L.SVG() }).se 阅读全文

posted @ 2017-01-24 09:54 米仓山下 阅读(5196) 评论(0) 推荐(0) 编辑

nodejs利用superagent爬取数据的简单例子

摘要: 爬取世界银行统计数据 安装:npm install superagent /** * Created by zh on 16-9-7. */ var request = require('superagent') , fs = require('fs'); var xlsx = require("n 阅读全文

posted @ 2017-01-24 09:48 米仓山下 阅读(921) 评论(0) 推荐(0) 编辑

后端Nodejs利用node-xlsx模块读取excel

摘要: /** * Created by zh on 16-9-14. */ var xlsx = require("node-xlsx"); var list = xlsx.parse("/home/zh/桌面/API_BTN_DS2_zh_excel_v2.xlsx"); console.log(lis 阅读全文

posted @ 2017-01-24 09:37 米仓山下 阅读(4264) 评论(0) 推荐(0) 编辑

OpenStreetMap、googleMap等经纬度和行列号之间相互转化(python,JavaScript,php,Java,C#等)

摘要: # OpenStreetMap经纬度转行列号 def deg2num(lat_deg, lon_deg, zoom): lat_rad = math.radians(lat_deg) n = 2.0 ** zoom xtile = int((lon_deg + 180.0) / 360.0 * n) 阅读全文

posted @ 2017-01-24 09:29 米仓山下 阅读(2329) 评论(0) 推荐(0) 编辑

利用whoosh对mongoDB的中文文档建立全文检索

摘要: 1、建立索引 #coding=utf-8 from __future__ import unicode_literals __author__ = 'zh' import sys,os from whoosh.index import create_in,open_dir from whoosh.f 阅读全文

posted @ 2017-01-24 09:20 米仓山下 阅读(2566) 评论(0) 推荐(0) 编辑

js前端读写文件的方法(json、excel)

摘要: 1、前端读取文件的实现 关键:利用文件上传对话框预览本地文件、利用FileReader读取文件 前端预览本地文件 前端预览本地文件 <input tabindex="-1" id="select_range" data-input="false" class="font-small" type="f 阅读全文

posted @ 2017-01-24 08:38 米仓山下 阅读(16964) 评论(1) 推荐(1) 编辑

导航