当前位置:网站首页>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
边栏推荐
- SSDB foundation 3
- 2022.04.23(LC_714_买卖股票的最佳时机含手续费)
- How about CICC wealth? Is it safe to open an account up there
- Esp32 (UART ecoh) - serial port echo worm learning (2)
- Practice of Druid SQL and security in meituan review
- ESP32 LVGL8. 1 - msgbox message box (msgbox 28)
- Druid SQL和Security在美团点评的实践
- Simple use of navigation in jetpack
- Solutions such as unknown or garbled code or certificate problem prompt in Charles's mobile phone packet capture, actual measurement.
- mysql_linux版本的下載及安裝詳解
猜你喜欢

From technical system to business insight, the closing chapter of the practice of small and medium-sized R & D team structure

Partage de la conception de l'alimentation électrique de commutation et illustration des compétences en conception de l'alimentation électrique

Raspberry pie 18b20 temperature

Practice of Druid SQL and security in meituan review

I just want to leave a note for myself

该买什么设备,Keysight 给你挑好了

Switching power supply design sharing and power supply design skills diagram

PyGame tank battle

FTP, SSH Remote Access and control

ESP32 LVGL8. 1 - arc (arc 19)
随机推荐
PyGame tank battle
Screenshot using projectmediamanager
Introduction to micro build low code zero Foundation (lesson 3)
[报告] Microsoft :Application of deep learning methods in speech enhancement
One stop service platform for high-level talents and development of comprehensive service platform system for talents
SSDB基础3
2022.04.23(LC_714_买卖股票的最佳时机含手续费)
binlog2sql 工具安装使用及问题汇总
Quick start to static class variables
【历史上的今天】4 月 23 日:YouTube 上传第一个视频;网易云音乐正式上线;数字音频播放器的发明者出生
redis优化系列(三)解决主从配置后的常见问题
2022.04.23 (the best time for lc_714_to buy and sell stocks, including handling charges)
浅谈c语言指针的强制转换
SSDB foundation 3
Download xshell 6 and xftp6 official websites
Click the input box to pop up the keyboard layout and move up
SSDB Foundation
The type initializer for ‘Gdip‘ threw an exception
How can programmers quickly develop high-quality code?
How about CICC wealth? Is it safe to open an account up there