创建添加文本点Geojson要素图层。
参数描述:
名称 |
类型 |
描述 |
Viewer |
Viewer
|
Cesium的viewer对象。 |
- Author:
-
属性
是否强制清楚缓存
请求矢量切片
方法
请求矢量切片执行自定义方法
createCustomCallbackGeoJsonFeatureLayerProvider(name, geoOptions, option, disFnc) → Promise.<Object>
参数描述:
名称 |
类型 |
描述 |
name |
String
|
可选
图层名称。 |
geoOptions |
object
|
String
|
可选
geojosn对象或者地址
{
url: 'http://192.168.1.40:8090/geoserver/gwc/service/wmts',
layer:'nanjing',
upperLevelLimit: 13,
lowerLevelLimit: 13,
minx:118.51721649800015,
miny:31.863232407499936,
maxx:118.91648798400001,
maxy:32.27649160409993
} |
option |
object
|
可选
参数对象{
Name: "",
text: "",
font_size: '30px',
font_family:'sans-serif'
stylet: this._cesium.LabelStyle.FILL,
fillColor: this._cesium.Color.WHITE,// optional A Property specifying the fill Color.
outlineColor: this._cesium.Color.BLACK,// optional A Property specifying the outline Color.
outlineWidth: 1.0,// optional A numeric Property specifying the outline width.
show: true,// optional A boolean Property specifying the visibility of the label.
showBackground: false,// optional A boolean Property specifying the visibility of the background behind the label.
backgroundColor: new this._cesiumColor(0.165, 0.165, 0.165, 0.8),//optional A Property specifying the background Color.
backgroundPadding: new Cartesian2(7, 5),//optional A Cartesian2 Property specifying the horizontal and vertical background padding in pixels.
scale: 1.0,//optional A numeric Property specifying the scale to apply to the text.
horizontalOrigin: this._cesiumHorizontalOrigin.CENTER, //optional A Property specifying the HorizontalOrigin.
verticalOrigin: this._cesium.VerticalOrigin.CENTER,// optional A Property specifying the VerticalOrigin.
eyeOffset: this._cesium.Cartesian3.ZERO,// optional A Cartesian3 Property specifying the eye offset.
pixelOffset: this._cesium.Cartesian2.ZERO,// optional A Cartesian2 Property specifying the pixel offset.
heightReference: this._cesium.HeightReference.NONE,// optional A Property specifying what the height is relative to.
near: 0,
far: 5000
} |
disFnc |
function
|
可选
回调函数 |
返回:
返回一个Cesium的datasource对象。
创建circleGeofeaturelayer
createLabelGeoJsonFeatureLayerProvider(name, geoOptions, option, disFnc) → Promise.<Object>
参数描述:
名称 |
类型 |
描述 |
name |
String
|
可选
图层名称。 |
geoOptions |
object
|
String
|
可选
geojosn对象或者地址
{
url: 'http://192.168.1.40:8090/geoserver/gwc/service/wmts',
layer:'nanjing',
upperLevelLimit: 13,
lowerLevelLimit: 13,
minx:118.51721649800015,
miny:31.863232407499936,
maxx:118.91648798400001,
maxy:32.27649160409993
} |
option |
object
|
可选
参数对象{
Name: "",
text: "",
font_size: '30px',
font_family:'sans-serif'
stylet: this._cesium.LabelStyle.FILL,
fillColor: this._cesium.Color.WHITE,// optional A Property specifying the fill Color.
outlineColor: this._cesium.Color.BLACK,// optional A Property specifying the outline Color.
outlineWidth: 1.0,// optional A numeric Property specifying the outline width.
show: true,// optional A boolean Property specifying the visibility of the label.
showBackground: false,// optional A boolean Property specifying the visibility of the background behind the label.
backgroundColor: new this._cesiumColor(0.165, 0.165, 0.165, 0.8),//optional A Property specifying the background Color.
backgroundPadding: new Cartesian2(7, 5),//optional A Cartesian2 Property specifying the horizontal and vertical background padding in pixels.
scale: 1.0,//optional A numeric Property specifying the scale to apply to the text.
horizontalOrigin: this._cesiumHorizontalOrigin.CENTER, //optional A Property specifying the HorizontalOrigin.
verticalOrigin: this._cesium.VerticalOrigin.CENTER,// optional A Property specifying the VerticalOrigin.
eyeOffset: this._cesium.Cartesian3.ZERO,// optional A Cartesian3 Property specifying the eye offset.
pixelOffset: this._cesium.Cartesian2.ZERO,// optional A Cartesian2 Property specifying the pixel offset.
heightReference: this._cesium.HeightReference.NONE,// optional A Property specifying what the height is relative to.
near: 0,
far: 5000
} |
disFnc |
function
|
可选
回调函数 |
返回:
返回一个Cesium的datasource对象。
创建circleGeofeaturelayer
createLabelGeoJsonFeatureLayerProvider(name, geoOptions, option, disFnc) → Promise.<Object>
参数描述:
名称 |
类型 |
描述 |
name |
String
|
可选
图层名称。 |
geoOptions |
object
|
String
|
可选
geojosn对象或者地址
{
url: 'http://192.168.1.40:8090/geoserver/gwc/service/wmts',
layer:'nanjing',
upperLevelLimit: 13,
lowerLevelLimit: 13,
minx:118.51721649800015,
miny:31.863232407499936,
maxx:118.91648798400001,
maxy:32.27649160409993
} |
option |
object
|
可选
参数对象{
Name: "",
text: "",
font_size: '30px',
font_family:'sans-serif'
stylet: this._cesium.LabelStyle.FILL,
fillColor: this._cesium.Color.WHITE,// optional A Property specifying the fill Color.
outlineColor: this._cesium.Color.BLACK,// optional A Property specifying the outline Color.
outlineWidth: 1.0,// optional A numeric Property specifying the outline width.
show: true,// optional A boolean Property specifying the visibility of the label.
showBackground: false,// optional A boolean Property specifying the visibility of the background behind the label.
backgroundColor: new this._cesiumColor(0.165, 0.165, 0.165, 0.8),//optional A Property specifying the background Color.
backgroundPadding: new Cartesian2(7, 5),//optional A Cartesian2 Property specifying the horizontal and vertical background padding in pixels.
scale: 1.0,//optional A numeric Property specifying the scale to apply to the text.
horizontalOrigin: this._cesiumHorizontalOrigin.CENTER, //optional A Property specifying the HorizontalOrigin.
verticalOrigin: this._cesium.VerticalOrigin.CENTER,// optional A Property specifying the VerticalOrigin.
eyeOffset: this._cesium.Cartesian3.ZERO,// optional A Cartesian3 Property specifying the eye offset.
pixelOffset: this._cesium.Cartesian2.ZERO,// optional A Cartesian2 Property specifying the pixel offset.
heightReference: this._cesium.HeightReference.NONE,// optional A Property specifying what the height is relative to.
near: 0,
far: 5000
} |
disFnc |
function
|
可选
回调函数 |
返回:
返回一个Cesium的datasource对象。
矢量切片-文本点
createLabelImageGeoJsonFeatureLayerProvider(name, geoOptions, styleOption, GroupID, checked, disFnc) → LabelGeoJsonFeatureLayercopy
调用方法:
let urls = {
url: 'http://183.162.245.49:8099/geoserver/gwc/service/wmts',
layer: 'sf:archsites',
srs: 'EPSG:4326',
upperLevelLimit: 11,
lowerLevelLimit: 22,
};
let de = {
level_min: urls.upperLevelLimit,
level_max: urls.lowerLevelLimit,
fillColor: "#00ffff",
outlineColor: "#000000",
heightReference:0,
pointHeight: undefined,
showBackground: false,
outlineWidth: 2,
text: "[str1]",
font_size: "18px",
font_family: "微软雅黑",
disableDepthTestDistance: Infinity,
near: 0,
far: 1000000,
};
let layer = sgworld.Creator.createLabelImageGeoJsonFeatureLayerProvider(
'矢量切片-点',
urls,
de,
"0",
true,
function () {
sgworld.Navigate.flyToObj(layer)
}
);
参数描述:
名称 |
类型 |
描述 |
name |
String
|
名称 |
geoOptions |
Object
|
数据参数
名称 |
类型 |
描述 |
url |
String
|
服务地址 |
layer |
String
|
图层名 |
srs |
String
|
可选
坐标系 |
upperLevelLimit |
Number
|
可选
最大显示层级 |
lowerLevelLimit |
Number
|
可选
最小显示层级 |
|
styleOption |
Object
|
可选
样式参数
名称 |
类型 |
描述 |
id |
String
|
可选
id |
level_min |
Number
|
可选
最小显示层级 |
level_max |
Number
|
可选
最大显示层级 |
text |
String
|
可选
文本内容 |
image |
String
|
可选
图标地址 |
fillColor |
String
|
可选
文本填充色 |
color |
String
|
可选
图标颜色 |
outlineColor |
String
|
可选
文本边框色 |
backgroundColor |
String
|
可选
文本背景色 |
font_size |
Number
|
可选
文本大小 |
font_family |
String
|
可选
字体 |
heightReference |
Number
|
可选
高度类型 |
pointHeight |
Number
|
可选
高度 |
outlineWidth |
Number
|
可选
文本边框宽度 |
bold |
Boolean
|
可选
加粗 |
italic |
Boolean
|
可选
斜体 |
showBackground |
Boolean
|
可选
显示背景 |
|
option.disableDepthTestDistance |
Number
|
可选
禁用深度检测距离,为Infinity则无视遮挡 |
option.labelData |
Cesium.LabelGraphics.ConstructorOptions
|
可选
文本扩展参数 |
option.imageData |
Cesium.BillbaordGraphics.ConstructorOptions
|
可选
图标扩展参数 |
styleOption.near |
Number
|
可选
最小可视距离 |
styleOption.far |
Number
|
可选
最大可视距离 |
GroupID |
String
|
|
checked |
Boolean
|
|
disFnc |
function
|
|
返回:
创建circleGeofeaturelayer
createLabelPointGeoJsonFeatureLayer(name, geojsonOrurl, option, disFnc) → Promise.<Object>
参数描述:
名称 |
类型 |
描述 |
name |
String
|
可选
图层名称。 |
geojsonOrurl |
object
|
String
|
可选
geojosn对象或者地址 |
option |
object
|
可选
参数对象{
Name: "",
text: "",
font_size: '30px',
font_family:'sans-serif'
stylet: this._cesium.LabelStyle.FILL,
fillColor: this._cesium.Color.WHITE,// optional A Property specifying the fill Color.
outlineColor: this._cesium.Color.BLACK,// optional A Property specifying the outline Color.
outlineWidth: 1.0,// optional A numeric Property specifying the outline width.
show: true,// optional A boolean Property specifying the visibility of the label.
showBackground: false,// optional A boolean Property specifying the visibility of the background behind the label.
backgroundColor: new this._cesiumColor(0.165, 0.165, 0.165, 0.8),//optional A Property specifying the background Color.
backgroundPadding: new Cartesian2(7, 5),//optional A Cartesian2 Property specifying the horizontal and vertical background padding in pixels.
scale: 1.0,//optional A numeric Property specifying the scale to apply to the text.
horizontalOrigin: this._cesiumHorizontalOrigin.CENTER, //optional A Property specifying the HorizontalOrigin.
verticalOrigin: this._cesium.VerticalOrigin.CENTER,// optional A Property specifying the VerticalOrigin.
eyeOffset: this._cesium.Cartesian3.ZERO,// optional A Cartesian3 Property specifying the eye offset.
pixelOffset: this._cesium.Cartesian2.ZERO,// optional A Cartesian2 Property specifying the pixel offset.
heightReference: this._cesium.HeightReference.NONE,// optional A Property specifying what the height is relative to.
near: 0,
far: 5000
} |
disFnc |
function
|
可选
回调函数 |
返回:
返回一个Cesium的datasource对象。
创建circleGeofeaturelayer
createLabelPointGeoJsonFeatureLayer(name, geojsonOrurl, option, disFnc) → Promise.<Object>
参数描述:
名称 |
类型 |
描述 |
name |
String
|
可选
图层名称。 |
geojsonOrurl |
object
|
String
|
可选
geojosn对象或者地址 |
option |
object
|
可选
参数对象{
Name: "",
text: "",
font_size: '30px',
font_family:'sans-serif'
stylet: this._cesium.LabelStyle.FILL,
fillColor: this._cesium.Color.WHITE,// optional A Property specifying the fill Color.
outlineColor: this._cesium.Color.BLACK,// optional A Property specifying the outline Color.
outlineWidth: 1.0,// optional A numeric Property specifying the outline width.
show: true,// optional A boolean Property specifying the visibility of the label.
showBackground: false,// optional A boolean Property specifying the visibility of the background behind the label.
backgroundColor: new this._cesiumColor(0.165, 0.165, 0.165, 0.8),//optional A Property specifying the background Color.
backgroundPadding: new Cartesian2(7, 5),//optional A Cartesian2 Property specifying the horizontal and vertical background padding in pixels.
scale: 1.0,//optional A numeric Property specifying the scale to apply to the text.
horizontalOrigin: this._cesiumHorizontalOrigin.CENTER, //optional A Property specifying the HorizontalOrigin.
verticalOrigin: this._cesium.VerticalOrigin.CENTER,// optional A Property specifying the VerticalOrigin.
eyeOffset: this._cesium.Cartesian3.ZERO,// optional A Cartesian3 Property specifying the eye offset.
pixelOffset: this._cesium.Cartesian2.ZERO,// optional A Cartesian2 Property specifying the pixel offset.
heightReference: this._cesium.HeightReference.NONE,// optional A Property specifying what the height is relative to.
near: 0,
far: 5000
} |
disFnc |
function
|
可选
回调函数 |
返回:
返回一个Cesium的datasource对象。
矢量切片加载(模型点加载)优化版
参数描述:
名称 |
类型 |
描述 |
params |
Object
|
参数对象 |
返回:
序列化字符串
薛鹏 2020/07/30
矢量切片加载(模型点加载)优化版
参数描述:
名称 |
类型 |
描述 |
params |
Object
|
参数对象 |
返回:
序列化字符串
薛鹏 2020/07/30
创建circleGeofeaturelayer
createSXTLabelGeoJsonFeatureLayerProvider(name, geoOptions, option, disFnc) → Promise.<Object>
参数描述:
名称 |
类型 |
描述 |
name |
String
|
可选
图层名称。 |
geoOptions |
object
|
String
|
可选
geojosn对象或者地址
{
url: 'http://192.168.1.40:8090/geoserver/gwc/service/wmts',
layer:'nanjing',
upperLevelLimit: 13,
lowerLevelLimit: 13,
minx:118.51721649800015,
miny:31.863232407499936,
maxx:118.91648798400001,
maxy:32.27649160409993
} |
option |
object
|
可选
参数对象{
Name: "",
text: "",
font_size: '30px',
font_family:'sans-serif'
stylet: this._cesium.LabelStyle.FILL,
fillColor: this._cesium.Color.WHITE,// optional A Property specifying the fill Color.
outlineColor: this._cesium.Color.BLACK,// optional A Property specifying the outline Color.
outlineWidth: 1.0,// optional A numeric Property specifying the outline width.
show: true,// optional A boolean Property specifying the visibility of the label.
showBackground: false,// optional A boolean Property specifying the visibility of the background behind the label.
backgroundColor: new this._cesiumColor(0.165, 0.165, 0.165, 0.8),//optional A Property specifying the background Color.
backgroundPadding: new Cartesian2(7, 5),//optional A Cartesian2 Property specifying the horizontal and vertical background padding in pixels.
scale: 1.0,//optional A numeric Property specifying the scale to apply to the text.
horizontalOrigin: this._cesiumHorizontalOrigin.CENTER, //optional A Property specifying the HorizontalOrigin.
verticalOrigin: this._cesium.VerticalOrigin.CENTER,// optional A Property specifying the VerticalOrigin.
eyeOffset: this._cesium.Cartesian3.ZERO,// optional A Cartesian3 Property specifying the eye offset.
pixelOffset: this._cesium.Cartesian2.ZERO,// optional A Cartesian2 Property specifying the pixel offset.
heightReference: this._cesium.HeightReference.NONE,// optional A Property specifying what the height is relative to.
near: 0,
far: 5000
} |
disFnc |
function
|
可选
回调函数 |
返回:
返回一个Cesium的datasource对象。
删除数据
删除数据
编辑
参数描述:
名称 |
类型 |
描述 |
open |
Boolean
|
可选
是否开启编辑 |
option |
Object
|
可选
参数 |
导出工程数据
导出工程数据
设置数据是否刷新
返回图例
返回:
返回图例
返回:
设置数据是否刷新
设置数据是否刷新
设置数据显示隐藏
设置数据显示隐藏