会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
weixiaoxiang
博客园
首页
新随笔
联系
订阅
管理
2020年7月14日
rgb随机颜色函数
摘要: let randcolor = () => { let r = 100 + ~~(Math.random() * 100); let g = 135 + ~~(Math.random() * 100); let b = 100 + ~~(Math.random() * 100); return 'r
阅读全文
posted @ 2020-07-14 16:41 weixiaoxiang
阅读(515)
评论(0)
推荐(0)
2020年6月28日
mapshaper转geojson
摘要: 在使用mapshaper在线转geojson时,应将shp和.dbp .prj等后缀名文件一起添加在网站中,这样转成的geojson中将含有shp的属性字段值。
阅读全文
posted @ 2020-06-28 11:10 weixiaoxiang
阅读(663)
评论(0)
推荐(0)
2020年6月18日
postgis
摘要: 1.ST_MakePolygon —从LineString创建多边形(将封闭的线转成面)。 ST_MakePolygon(st_geomfromtext(geom) 2 st_geomfromtext(wkt) 将wkt字符串转为geom
阅读全文
posted @ 2020-06-18 16:19 weixiaoxiang
阅读(301)
评论(0)
推荐(0)
2020年6月17日
Draw
摘要: 1.在使用多边形draw时,双击地图结束绘画的同时地图也会被缩放,需要设置stopClick:true; 1 draw = new ol.interaction.Draw({ 2 source: spacesource, 3 type: drawtype, 4 stopClick:true//取消地
阅读全文
posted @ 2020-06-17 12:00 weixiaoxiang
阅读(328)
评论(0)
推荐(0)
2020年6月16日
ol 聚类ol.source.Cluster的使用
摘要: 示例链接:https://openlayers.org/en/latest/examples/cluster.html
阅读全文
posted @ 2020-06-16 09:30 weixiaoxiang
阅读(488)
评论(0)
推荐(0)
ol ---- overlay autoPan的使用
摘要: 问题: 在使用overlay的autoPan属性时,autoPan:true 失效不起作用; 解决方案: 问题可能是因为在overlay.setPosition(coordinate)前未将该overlay添加到map中; 代码: var popup = new ol.Overlay({ eleme
阅读全文
posted @ 2020-06-16 09:27 weixiaoxiang
阅读(790)
评论(0)
推荐(0)
多层数据注入同一个图层源时,要批量删除某一种要素
摘要: 问题:因为多种类型要素放入同一个源,在删除某一类要素时需要遍历整个图层源,符合条件后才执行 source.removeFeature(feature); 这样后导致程序执行速度很慢。 解决方案:在将各类要素添加到source的同时,将所有要素都存入一个数组FeatureList[]中,在需要删除一类
阅读全文
posted @ 2020-06-16 09:21 weixiaoxiang
阅读(219)
评论(0)
推荐(0)
js遍历数组,并从数组中删除元素
摘要: for (var i = 0; i < arr.length; i++) { if (A == B ) { arr.splice(i, 1); i--;//i需要自减,否则每次删除都会讲原数组索引发生变化 } }
阅读全文
posted @ 2020-06-16 09:10 weixiaoxiang
阅读(6678)
评论(0)
推荐(0)
echarts加载geojson
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document<
阅读全文
posted @ 2020-06-16 09:07 weixiaoxiang
阅读(3793)
评论(0)
推荐(0)
2020年5月15日
C#学习之路
只有注册用户登录后才能阅读该文。
阅读全文
posted @ 2020-05-15 16:51 weixiaoxiang
阅读(0)
评论(0)
推荐(0)
公告