摘要:
已经解决了这个问题了,是我的snap定义过早了,官网上有提示 The snap interaction must be added after the Modify and Draw interactions in order for its map browser event handlers t 阅读全文
摘要:
首先我们先导入Condition import {mouseOnly} from "ol/events/condition"; 实例化一个Select对象之后设置condition属性,值为上面导入的mouseOnly: let select = new Select({ condition: mo 阅读全文
摘要:
基本图形有以下几种: Circle LinearRing LineString MultiLineString MultiPoint MultiPolygon Point Polygon LineString let layer = new VectorLayer({ style: new Styl 阅读全文
摘要:
let layer = new VectorLayer(); //新建一个绘线层 let pointFeature = new Feature(new Point(fromLonLat([114.02, 24]))); pointFeature.setStyle( new Style({ //规则形 阅读全文