摘要: WKT用于表示矢量的几何空间图形 点:POINT(1 1) 线:LINESTRING(3 4,10 50,20 25) 面:POLYGON((1 1,5 1,5 5,1 5,1 1),(2 2,2 3,3 3,3 2,2 2)) 多点:MULTIPOINT(3.5 5.6, 4.8 10.5) 多线 阅读全文
posted @ 2022-12-23 10:15 碎月 阅读(683) 评论(0) 推荐(0) 编辑
摘要:   == 普通的英文半角空格   ==   ==   == no-break space (普通的英文半角空格但不换行)   == 中文全角空格 (一个中文宽度)   ==   == en空格 (半个中文宽度)   阅读全文
posted @ 2022-12-04 12:45 碎月 阅读(1234) 评论(0) 推荐(0) 编辑
摘要: 利用递归方式遍历所有属性进行深层对象拷贝,支持拷贝函数,对象,数组等: function cloneDeep(object) { if (typeof (object) == 'object') { if (Array.isArray(object)) { var obj = [] } else { 阅读全文
posted @ 2022-11-16 15:03 碎月 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 如果需要跳转我们设定好路由的页面,不能使用a标签设置用来跳转的路由路径,需要使用官方自带的<router-link></router-link>标签来访问路由路径。 阅读全文
posted @ 2022-11-09 18:57 碎月 阅读(443) 评论(0) 推荐(0) 编辑
摘要: 已经解决了这个问题了,是我的snap定义过早了,官网上有提示 The snap interaction must be added after the Modify and Draw interactions in order for its map browser event handlers t 阅读全文
posted @ 2022-10-20 10:14 碎月 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 首先我们先导入Condition import {mouseOnly} from "ol/events/condition"; 实例化一个Select对象之后设置condition属性,值为上面导入的mouseOnly: let select = new Select({ condition: mo 阅读全文
posted @ 2022-10-11 14:33 碎月 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 绘制-Draw 新建一个用来绘制要素的图层: const vector = new VectorLayer({ source: new VectorSource(), style: { "fill-color": "rgba(255, 255, 255, 0.2)", "stroke-color": 阅读全文
posted @ 2022-10-11 12:08 碎月 阅读(1885) 评论(0) 推荐(0) 编辑
摘要: 基本图形有以下几种: Circle LinearRing LineString MultiLineString MultiPoint MultiPolygon Point Polygon LineString let layer = new VectorLayer({ style: new Styl 阅读全文
posted @ 2022-10-09 15:36 碎月 阅读(278) 评论(0) 推荐(0) 编辑
摘要: let layer = new VectorLayer(); //新建一个绘线层 let pointFeature = new Feature(new Point(fromLonLat([114.02, 24]))); pointFeature.setStyle( new Style({ //规则形 阅读全文
posted @ 2022-10-08 12:01 碎月 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 简介 serve是一款超轻量级web服务器 当我们想要在服务器运行一些代码,但是又不会配置服务器的时候,就可以使用serve就可以搞定了。 serve可以将任何一个文件夹当作服务器的目录供自己使用。 Github:https://github.com/vercel/serve 使用 首先用node. 阅读全文
posted @ 2022-10-08 10:33 碎月 阅读(374) 评论(0) 推荐(0) 编辑