Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
optional
参数选项:
|
Example:
示例代码:
let iconUrl = "/geomap-api/JsCesuimDemo/public/Plot/plotIcons/";
let libData = [{
name: "arrowSymbol",
title: "箭头符号",
list: [{
name: "singlearrow",
type: "singlearrow",
options: {
lineColor: Cesium.Color.fromCssColorString('#01F0FE'),
lineWidth: 5,
lineStyle: GeoElement.LINE_STYLE.NONE,
fillMode: "gradient",
fillColor: Cesium.Color.fromCssColorString('#01F0FE'),
fillStartColor: Cesium.Color.fromCssColorString('#01F0FE'),
fillEndColor: Cesium.Color.fromCssColorString('#4FACFE'),
visibleSwallowTail: true
},
title: "粗单尖直箭头",
img: iconUrl + "cudanjianzhi.png"
},
{
name: "doublearrow",
type: "doublearrow",
options: {
lineColor: Cesium.Color.fromCssColorString('#01F0FE'),
lineWidth: 5,
lineStyle: GeoElement.LINE_STYLE.NONE,
fillMode: "gradient",
fillColor: Cesium.Color.fromCssColorString('#01F0FE'),
fillStartColor: Cesium.Color.fromCssColorString('#01F0FE'),
fillEndColor: Cesium.Color.fromCssColorString('#4FACFE'),
visibleSwallowTail: true
},
title: "钳击箭头",
img: iconUrl + "qianji.png"
},
{
name: "linearrow",
type: "linearrow",
options: {
lineColor: Cesium.Color.fromCssColorString('#01F0FE'),
lineWidth: 20,
lineStyle: GeoElement.LINE_STYLE.SOLID
},
title: "直线箭头",
img: iconUrl + "cuzhi.png"
},
{
name: "curvearrow",
type: "curvearrow",
options: {
lineColor: Cesium.Color.fromCssColorString('#01F0FE'),
lineWidth: 20,
lineStyle: GeoElement.LINE_STYLE.SOLID
},
title: "曲线箭头",
img: iconUrl + "gongji.png"
},
]
},
{
name: "lableSymbol",
title: "点及文字",
list: [{
name: "iconText",
type: "billboard",
title: "文字",
options:{
labelGraphcis:{
"text": "test",
"font": '10px sans-serif'
}
},
img: iconUrl + "i-text.png"
},
{
name: "iconLabel",
type: "billboard",
title: "注记",
img: iconUrl + "i-label.png"
}, {
name: "iconDot1",
type: "billboard",
options: {
labelGraphcis:{
"text": "test",
"font": '10px sans-serif'
},
billboardGraphics:{
image: iconUrl + "i-icon1.png",
scale: 1,
color: null,
width: null,
height: null
}
},
title: "图标点1",
img: iconUrl + "i-icon1.png"
},
{
name: "iconDot2",
type: "billboard",
options: {
billboardGraphics:{
image: iconUrl + "i-icon2.png",
scale: 1,
color: null,
width: null,
height: null
}
},
title: "图标点2",
img: iconUrl + "i-icon2.png"
},
{
name: "iconDot3",
type: "billboard",
options: {
billboardGraphics:{
image: iconUrl + "i-icon3.png",
scale: 1,
color: null,
width: null,
height: null
}
},
title: "图标点3",
img: iconUrl + "i-icon3.png"
},
{
name: "divDot1",
type: "icon",
options: {
},
title: "DIV点1",
img: iconUrl + "i-div1.png"
},
{
name: "divDot2",
type: "icon",
title: "DIV点2",
img: iconUrl + "i-div2.png"
},
]
},
{
name: "basicSymbol",
title: "基本符号",
list: [{
name: "polyline",
type: "polyline",
title: "折线",
img: iconUrl + "polyline.png"
},
{
name: "polygon",
type: "polygon",
title: "多边形",
img: iconUrl + "polygon.png"
},
{
name: "circle",
type: "circle",
title: "圆",
img: iconUrl + "circle.png"
},
{
name: "ellipse",
title: "椭圆",
img: iconUrl + "ellipse.png"
},
]
},
];
var symbolSortPanel = new Cesium.GeoElementLibPanelWidget({
viewer: viewer,
layer,
libData
});
Methods
清除元素项选择状态
获取当前被选择的标绘项名称
获取当前被选择的标绘项
隐藏面板
标绘元素选择事件响应
设置标绘目录数据
Name | Type | Description |
---|---|---|
libData |
Object |
显示面板