10 2022 档案

摘要:已经解决了这个问题了,是我的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 碎月 阅读(466) 评论(0) 推荐(0) 编辑
摘要:首先我们先导入Condition import {mouseOnly} from "ol/events/condition"; 实例化一个Select对象之后设置condition属性,值为上面导入的mouseOnly: let select = new Select({ condition: mo 阅读全文
posted @ 2022-10-11 14:33 碎月 阅读(426) 评论(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 碎月 阅读(2223) 评论(0) 推荐(0) 编辑
摘要:基本图形有以下几种: Circle LinearRing LineString MultiLineString MultiPoint MultiPolygon Point Polygon LineString let layer = new VectorLayer({ style: new Styl 阅读全文
posted @ 2022-10-09 15:36 碎月 阅读(339) 评论(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 碎月 阅读(212) 评论(0) 推荐(0) 编辑
摘要:简介 serve是一款超轻量级web服务器 当我们想要在服务器运行一些代码,但是又不会配置服务器的时候,就可以使用serve就可以搞定了。 serve可以将任何一个文件夹当作服务器的目录供自己使用。 Github:https://github.com/vercel/serve 使用 首先用node. 阅读全文
posted @ 2022-10-08 10:33 碎月 阅读(459) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示