当前位置:网站首页>openlayers draw矩形
openlayers draw矩形
2022-04-23 19:08:00 【Gis烤羊腿真好吃】
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烤羊腿真好吃]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_38190600/article/details/93224774
边栏推荐
- std::stoi stol stoul stoll stof stod
- Client interns of a large factory share their experience face to face
- SSDB基础3
- Sogou cell thesaurus analysis (only extract words and word frequency)
- Fundamentals of machine learning theory -- some terms about machine learning
- Introduction to ROS learning notes (I)
- [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 drive encoder -- siq-02fvs3 (vscade + IDF)
- 特征选择feature_selection--SelectKBest
- Xlslib use
猜你喜欢

C: generic reflection

Druid SQL和Security在美团点评的实践

Simplified path (force buckle 71)

Practice of Druid SQL and security in meituan review

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

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

Redis optimization series (III) solve common problems after master-slave configuration
![[报告] Microsoft :Application of deep learning methods in speech enhancement](/img/29/2d2addd826359fdb0920e06ebedd29.png)
[报告] Microsoft :Application of deep learning methods in speech enhancement

网络协议之:sctp流控制传输协议

Network protocol: SCTP flow control transmission protocol
随机推荐
ESP32 LVGL8. 1 - input devices (input devices 18)
从技术体系到商业洞察,中小研发团队架构实践之收尾篇
c1000k TCP 连接上限测试1
One of the reasons why the WebView web page cannot be opened (and some WebView problem records encountered by myself)
Implementation of TCP UDP communication with golang language
ESP32 LVGL8. 1 - slider slider (slider 22)
ESP32 LVGL8. 1 - calendar (calendar 25)
Sogou cell thesaurus analysis (only extract words and word frequency)
MySQL Téléchargement et installation de la version Linux
The fifth bullet of MySQL learning -- detailed explanation of transaction and its operation characteristics
12 examples to consolidate promise Foundation
12个例子夯实promise基础
Esp32 (UART 485 communication) - 485 communication of serial port (3)
简化路径(力扣71)
Yyds dry goods inventory stringprep --- Internet string preparation
About the operation of unit file reading (I)
2022.04.23(LC_714_买卖股票的最佳时机含手续费)
#yyds干货盘点#stringprep --- 因特网字符串预备
Seata处理分布式事务
ESP32 LVGL8. 1 - roller rolling (roller 24)