当前位置:网站首页>Openlayers draw rectangle
Openlayers draw rectangle
2022-04-23 19:08:00 【GIS roast lamb leg is delicious】
var webgissource={};
webgissource.measure = new VectorSource();
webgissource.measurelayer = new Vectorlayer({
source: webgissource.measure,
style: new Style({
fill: new Fill({
color: 'rgba(255, 255, 255, 0.2)'
}),
stroke: new Stroke({
color: '#ffcc33',
width: 2
}),
image: new Icon({
//color: '#4271AE',
scale:0.7,
src: 'static/img/greenpoint.png'
}),
})
});
map.addLayer(webgissource.measurelayer)
measureparms.draw = new Draw({
source: webgissource.measure,
type: “LineString”,
style: new Style({
fill: new Fill({
color: 'rgba(0,0,0,0.2)'
}),
stroke: new Stroke({
color: 'rgba(0, 0, 0, 0.5)',
lineDash: [10, 10],
width: 2
}),
image: new CircleStyle({
radius: 5,
stroke: new Stroke({
color: 'rgba(0, 0, 0, 0.7)'
}),
fill: new Fill({
color: 'rgba(255, 255, 255, 0.2)'
})
})
}),
maxPoints: 2,
geometryFunction: function(coordinates, geometry){
var start = coordinates[0];
var end = coordinates[1];
if(!geometry){
geometry=new Polygon([
[start, [start[0], end[1]], end, [end[0], start[1]], start]
]);
}
geometry.setCoordinates([
[start, [start[0], end[1]], end, [end[0], start[1]], start]
]);
return geometry;
}
});
版权声明
本文为[GIS roast lamb leg is delicious]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231908121102.html
边栏推荐
- 中金财富怎么样?在上边开户安全吗
- 7、 DOM (Part 2) - chapter after class exercises and answers
- 高层次人才一站式服务平台开发 人才综合服务平台系统
- WebView opens H5 video and displays gray background or black triangle button. Problem solved
- Using 8266 as serial port debugging tool
- 開關電源設計分享及電源設計技巧圖解
- All table queries and comment description queries of SQL Server
- [record] typeerror: this getOptions is not a function
- FTP、ssh远程访问及控制
- [today in history] April 23: the first video uploaded on YouTube; Netease cloud music officially launched; The inventor of digital audio player was born
猜你喜欢

ESP32 LVGL8. 1 - arc (arc 19)

Eight bit binary multiplier VHDL

Solutions such as unknown or garbled code or certificate problem prompt in Charles's mobile phone packet capture, actual measurement.

2022.04.23(LC_763_划分字母区间)
![[record] typeerror: this getOptions is not a function](/img/c9/0d92891b6beec3d6085bd3da516f00.png)
[record] typeerror: this getOptions is not a function

Openharmony open source developer growth plan, looking for new open source forces that change the world!

2022.04.23 (lc_763_divided into letter interval)

On the forced conversion of C language pointer

MySQL Téléchargement et installation de la version Linux

After opening the original normal project, the dependency package displays red and does not exist.
随机推荐
Keysight has chosen what equipment to buy for you
I just want to leave a note for myself
Getting started with vcpkg
FTP, SSH Remote Access and control
Minesweeping II of souI instance
Esp32 (UART ecoh) - serial port echo worm learning (2)
js上传文件时控制文件类型和大小
12 examples to consolidate promise Foundation
Sogou cell thesaurus analysis (only extract words and word frequency)
Tencent map and high logo removal method
MySQL Téléchargement et installation de la version Linux
[advanced level 11 of C language -- character and string functions and their simulation implementation (2)]
Feature selection feature_ selection--SelectKBest
RPM package management
Screen right-click menu in souI
开关电源设计分享及电源设计技巧图解
Esp32 drive encoder -- siq-02fvs3 (vscade + IDF)
The type initializer for ‘Gdip‘ threw an exception
12个例子夯实promise基础
RPM包管理