Name | Type | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
elementId |
Element | String | 放置视图的div的id | ||||||||||||||||||||||||||||||||
options |
Object |
optional
包含以下属性的对象
|
Example:
var webGlobe = new WebSceneControl('GlobeView');
var webGlobe = new WebSceneControl('GlobeView',{showInfo:true});
//或者如下
var options ={
showInfo:false,
viewerMode:'3D',
keyEventEnable:false
};
var webGlobe = new WebSceneControl('GlobeView',options);
Members
readonlyellipsoid : Ellipsoid
当前椭球
图层
气泡
readonlyscene : Scene
场景
事件句柄
是否显示瓦片网格信息
readonlyviewer : Viewer
视图
Methods
通用添加影像图层
Name | Type | Description |
---|---|---|
google等图层 |
imagelayer |
- removeAllImageLayers 说明:在图层需要频繁切换的情况下,与removeImageLayer配合使用
See:
添加场景特效
添加地图文档
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
String | 文档地址 | ||||||||||||||||||||||||||||||||||||||||||||||||
options |
Object |
|
||||||||||||||||||||||||||||||||||||||||||||||||
代理 |
DefaultProxy |
Example:
function callBackfunction(layer){
console.log(layer)
}
// layers 属性类似二维服务
// layers=show:0,1 表示只显示 layerIndex 为 0, 1 的图层
// layers=hide:0,1 表示只隐藏 layerIndex 为 0, 1 的图层
支持添加g3d注记服务层,扩展注记层可配置参数 参数见 Label类
webGlobe.append('http://192.168.88.122:6163/igs/rest/g3d/label',{
scaleByDistance:new Cesium.NearFarScalar(1.5e5, 1.0, 1.5e9, 1.0),
fillColor:Cesium.Color.ROYALBLUE ,
heightReference: Cesium.HeightReference.NONE,
translucencyByDistance:new NearFarScalar(1.5e5, 1.0, 1.5e9, 0.5)
});
webGlobe.append('http://192.168.90.102:6163/igs/rest/g3d/1218示例', {
autoReset:false,
synchronous:true,
layers: 'layers=show:0',
loaded:callBackfunction
});
webGlobe.append('http://192.168.90.102:6163/igs/rest/g3d/1218示例', {
autoReset:false,
synchronous:true,
layers: 'layers=show:0',
getDocLayers: function (docLayers) { docLayers[0].flyTo(viewer); }
});
加载二维地图文档瓦片
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
String | 发布的文档地址 | ||||||||||||||||||||||||
options |
Object |
其他附加属性包含以下属性的对象
|
Returns:
瓦片对象
Example:
//如果裁瓦片的时候是按照经纬度裁剪的瓦片则只设置最大级数即可
// var otherOptions ={
// maxLevel:10
//};
var otherOptions ={
tileRange:webRoot.Rectangle.fromDegrees(73.4625656504558,9.7218626686719958,139.249771965239,53.5800002118608),
colNum:3,
rowNum:2,
maxLevel:10,
proxy:'/Handler.ashx'//不存在跨域可不设置
};
var mapGisTile = webGlobe.append2DDocTile('http://localhost:6163/igs/rest/mrms/docs/二维矢量',otherOptions);
加载三维地图文档瓦片
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
String | 发布的文档地址 | ||||||||||||||||||||||||
sceneIndex |
Number | 图层所在场景索引 | ||||||||||||||||||||||||
layerIndex |
Number | 图层索引 | ||||||||||||||||||||||||
options |
Object |
其他附加属性包含以下属性的对象
|
Returns:
瓦片对象
Example:
//如果裁瓦片的时候是按照经纬度裁剪的瓦片则只设置最大级数即可
// var otherOptions ={
// maxLevel:10
//};
var otherOptions ={
tileRange:webRoot.Rectangle.fromDegrees(73.4625656504558,9.7218626686719958,139.249771965239,53.5800002118608),
colNum:3,
rowNum:2,
maxLevel:10,
proxy:'/Handler.ashx'//不存在跨域可不设置
};
var mapGisTile = webGlobe.append3DDocTile('http://54.222.218.173:6163/igs/rest/g3d/lcmap/',0,0,otherOptions);
加载3DTile数据
Name | Type | Description |
---|---|---|
url |
String | 数据url |
onsuccess |
function | 加载成功回调 |
Returns:
kml数据对象
添加baidu地图服务:提供ptype='tile'和ptype='sate'、 'traffic'三种百度地图(瓦片和卫星、交通)
Name | Type | Description |
---|---|---|
options |
object | {ptype:'sate'} |
添加图片标签
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
lat |
Number | 经度 | ||||||
lon |
Number | 纬度 | ||||||
height |
Number | 高度 | ||||||
name |
String | 名称 | ||||||
bImageUrl |
String | 图片地址 | ||||||
bWidth |
Number | 图片宽度 | ||||||
bHeight |
Number | 图片高度 | ||||||
options |
Object |
扩展参数
|
Returns:
添加的公告板对象 移除通过removeEntity(entity)
Example:
var options = {
id:125,
description:'描述'
};
var billBoard = webGlobe.appendBillboard(113.2, 31, 200, 'name','http://localhost:8088/car.png', 64, 64,options);
添加缓存服务图层(地形模型 通用接口 主要用于mongodb的服务)
图层的返回值必须在回调函数中 异步获取添加成功的图层
添加czml文件
Name | Type | Description |
---|---|---|
url |
String | 文件地址 |
successCall |
function | 成功后的回调 |
Example:
var czml = webGlobe.addCZML('SampleData/model.czml');
AppendEntityWithVideo(videoContainID, geomGraphic, options) → Entity
添加带视频的几何实体
Name | Type | Description |
---|---|---|
videoContainID |
string | 视频(video)的dom元素id |
geomGraphic |
Graphic | 几何图形 |
options |
object | 材质参数 example: |
Returns:
返回添加成功的几何实体
添加高德地图服务
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
|
添加GeoJson文件
Name | Type | Description |
---|---|---|
url |
String | 文件地址 |
Example:
var gjson = webGlobe.appendGeoJson('SampleData/china.topojson');
添加谷歌地图服务
Name | Type | Description |
---|---|---|
type |
String | 地图类型 矢量‘m@207000000’ 影像‘s@130’ 栅格‘t@130,r@207000000 道路‘h@207000000’ |
添加google地图服务(扩展):
ptype为以下:
h: skeleton map light
m:全地图
p: terrain+map
r: skeleton map dark
t:地形图
s:卫星地图
也可以进行组合,例如:s,r 或者 t,h
Name | Type | Description |
---|---|---|
options |
object | {ptype:'s'} |
添加
Name | Type | Description |
---|---|---|
entityOption |
object | 包含entity中相关选项设置 { id: name: availability: show: description: position: orientation: viewFrom: parent: } |
Returns:
返回点对象 移除通过removeEntity(entity)
绘制贴地线
Name | Type | Description |
---|---|---|
pnts |
Array.<Number> | |
color |
Color |
Returns:
primitive
Example:
var pnts = [-115.0, 37.0, -107.0, 33.0]; //不加高程 应该加高程这里也没意义 所以修改了接口去掉高程
var color = new Cesium.Color(red, green, blue, alpha);
根据给定点画贴地多边形
Name | Type | Description |
---|---|---|
outPnts |
Array | 外圈坐标数组(经纬度) |
Array |
Array | inerPnts 内圈坐标数组(经纬度) |
color |
Color | 填充颜色(默认不指定时为蓝色) 通过getColor(red, green, blue, alpha) |
添加带洞多边形(二维)
Name | Type | Description |
---|---|---|
name |
String | 名称 |
latLons_out |
Array | 外圈坐标 :[x1,y1,x2,y2,x3,y3] |
latLons_in |
Array | 内圈Array<[x1,y1,x2,y2,x3,y3]> |
options |
object | 参数对象 |
Returns:
绘制的多边形区对象 移除通过removeEntity(entity)
通过地址添加图片,包括本地图片和网络图片
Name | Type | Description |
---|---|---|
url |
String | 图片地址 |
west |
float | 西经 |
south |
float | 南纬 |
east |
float | 东经 |
north |
float | 北纬 |
Example:
var earthface = webGlobe.appendImageByUrl('../Mapgis/img/earthface.jpg', -180.0, -90, 180.0, 90);
加载Kml、kmz数据
Name | Type | Description |
---|---|---|
url |
String | |
options |
String |
Returns:
kml数据对象
添加文字标签
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
lat |
Number | 经度 | ||||||||||||||||||||||||||||||||||||||||
lon |
Number | 纬度 | ||||||||||||||||||||||||||||||||||||||||
height |
Number | 高程 | ||||||||||||||||||||||||||||||||||||||||
lText |
String | 标签内容 | ||||||||||||||||||||||||||||||||||||||||
options |
Object |
|
Returns:
标签对象 移除通过removeEntity(entity)
Example:
var label = webGlobe.appendLabel(114.2, 31, 200, '这是一个标签', {
font:'14pt 楷体',
style:Cesium.LabelStyle.FILL_AND_OUTLINE,
verticalOrigin:Cesium.VerticalOrigin.BOTTOM,
pixelOffset:new Cesium.Cartesian2(0, -9)});
appendLabelIcon(text, lon, lat, height, font, fillColor, iconUrl, iconWidth, iconHeight, farDist, nearDist, txtPos, attribute) → entity
添加图标注记
Name | Type | Description |
---|---|---|
text |
String | 注记文字内容 |
lon |
Number | 经度 |
lat |
Number | 纬度 |
height |
Number | 高程 |
font |
String | 字体 这里将字体和大小放在一起 eg:'14pt 楷体' |
fillColor |
Color | 字体的填充色 |
iconUrl |
String | 图标路径 |
iconWidth |
Number | 图标宽度 |
iconHeight |
Number | 图标高度 |
farDist |
Number | 最远显示距离 |
nearDist |
Number | 最近显示距离 |
txtPos |
String | 位置 'center','top','bottom' |
attribute |
String | 其他属性信息 |
Returns:
labelIcon 图标注记对象 移除通过removeEntity(entity)
Example:
var labelIcon = webGlobe.appendLabelIcon('注记文本',110,33,0,'14pt 楷体','/car.png',64,64,10000000,1,bottom,'这是属性信息查询时可以看到');
添加图标注记
Name | Type | Description |
---|---|---|
name |
String | 注记文字内容 |
description |
String | 描述 |
position |
Cartesian3 | 位置 |
billboardGraphics |
BillboardGraphics | 图片对象 |
labelGraphics |
LabelGraphics | 文本对象 |
Example:
var labelGraphics = { //文字标签
text: "文字标签内容",
font: '14pt monospace',
fillColor: Cesium.Color.WHITE,
style: Cesium.LabelStyle.FILL_AND_OUTLINE,
outlineWidth: 1,
outlineColor: Cesium.Color.WHITE,
verticalOrigin: Cesium.VerticalOrigin.CENTER, //垂直方向以底部来计算标签的位置
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
pixelOffset: new Cesium.Cartesian2(0.0, 0.0), //偏移量
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
pixelOffsetScaleByDistance: new Cesium.NearFarScalar(1.5e2, 3.0, 1.5e7, 0.5), //随远近缩放
translucencyByDistance: new Cesium.NearFarScalar(1.5e5, 1.0, 1.5e7, 0.0) //随远近隐藏
};
var billboardGraphics ={
//图标
image: iconUrl,
width: iconWidth,
height: iconHeight,
//heightReference: this.root.HeightReference.CLAMP_TO_GROUND,
//随远近缩放
//pixelOffset:new this.root.Cartesian2(0.0, -image.height),
pixelOffsetScaleByDistance: new Cesium.NearFarScalar(1.5e5, 3.0, 1.5e7, 0.5),
//随远近隐藏
translucencyByDistance: new Cesium.NearFarScalar(1.5e5, 1.0, 1.5e7, 0.0),
//定位点
//verticalOrigin: Cesium.VerticalOrigin.BOTTOM
horizontalOrigin: Cesium.HorizontalOrigin.TOP
};
var labelIcon = webGlobe.appendLabelIcon('注记文本','这是属性信息查询时可以看到',Cesium.Cartesian3.fromDegrees(110,33,0),billboardGraphics,labelGraphics);
添加图标注记
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
lon |
Number | 经度 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lat |
Number | 纬度 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
height |
Number | 高程 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options |
Object |
optional
可配置参数
|
Returns:
labelIcon 图标注记对象 移除通过removeEntity(entity)
Example:
var options = { iconUrl: '/car.png', text: '注记文本', font: '14pt 楷体', labelShowBackground: true, attribute: '这是属性信息查询时可以看到' }
var labelIcon = webGlobe.appendLabelIconEx(110, 33, 0, options);
Name | Type | Description |
---|---|---|
info |
Object | 请求到的注记信息 |
scene |
Object | 场景对象 |
options |
Object |
注记可配置参数 注记对象参数 Label |
根据给定点画线
Name | Type | Description |
---|---|---|
name |
String | 名称 |
pointsArray |
Array | 点数组 |
width |
Number | 线的宽度 |
color |
Color | 线颜色(默认不指定时为蓝色) 通过getColor(red, green, blue, alpha) |
isGround |
Boolean | 设置为是否贴地(可识别带高度的坐标) |
options |
Object | 包含的附加属性 |
Returns:
绘制的线 移除通过removeEntity(entity)
- getColor
- removeEntity
Example:
//不带高度
var arrayp =[104.0, 28.0,
106.0, 27.0,
107.0, 28.0,
108.0, 29.0];
//带高程 并且isGround设置为true
var arrayp =[104.0, 28.0,1000,
106.0, 27.0,1000,
107.0, 28.0,1000,
108.0, 29.0,800];
var lineByPoints = webGlobe.drawLine('1',arrayp,2);
See:
根据给定点绘制贴地线(可编辑)
Name | Type | Description |
---|---|---|
name |
String | 名称 |
pointsArray |
Array | 点数组 |
step |
Number | 离散步长 |
level |
Number | 地形级别 |
callback |
function | 回调函数 |
Returns:
绘制的线 移除通过removeEntity(entity)
- removeEntity
Example:
var arrayp =[104.0, 28.0,
106.0, 27.0,
107.0, 28.0,
108.0, 29.0];
See:
添加m3d缓存服务(支持地形、模型等图层)
Name | Type | Description |
---|---|---|
baseUrl |
String | 服务地址(发布的m3d缓存服务) |
options |
Object | optional |
Example:
webGlobe.appendM3dCache('http://localhost:8089//terrain-tiles', {});
添加m3d服务图层(mongodb)
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
String | 服务地址(发布的m3d缓存服务) | ||||||||||||
options |
Object |
|
||||||||||||
代理 |
DefaultProxy |
Example:
function callBackfunction(layer){
}
webDlobe.appendM3dLayer('http://localhost:6163/igs/rest/g3d/cache/jg', {
autoReset:false
loaded:callBackfunction
});
添加mapgis地形数据
Name | Type | Description |
---|---|---|
url |
String | 地形服务地址 |
sceneIndex |
Number | 场景索引 |
layerIndex |
Number | 图层render索引 |
proxy |
String | 代理地址 |
Returns:
terrain 地形图层对象
添加Mapgis发布的瓦片服务
Name | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
String | 瓦片服务地址 | |||||||||||||||||||||
options |
Object |
其他附加属性包含以下属性的对象
|
Example:
//如果裁瓦片的时候是按照经纬度裁剪的瓦片则只设置最大级数即可
// var otherOptions ={
// maxLevel:10
//};
var otherOptions ={
tileRange:webRoot.Rectangle.fromDegrees(73.4625656504558,9.7218626686719958,139.249771965239,53.5800002118608),
colNum:3,
rowNum:2,
maxLevel:10,
proxy:'/Handler.ashx'//不存在跨域可不设置
};
var mapGisTile = webGlobe.appendMapGISTile('http://54.222.218.173:6163/igs/rest/mrms/tile/YX_TILE',otherOptions);
appendMapGISVectorDocMap(url, options) → Array.<MapGISVectorLayer>
加载MapGIS矢量地图文档
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
String | 发布的文档地址,或Igs图层服务地址,对应的layers参数不同,使用Igs图层服务地址通过gdbp仅能加载二维矢量图层,eg:二维地图文档地址:http://[host]:[port]/igs/rest/mrfs/docs/{docName},三维地图文档地址:http://[host]:[port]/igs/rest/g3d/{docName},Igs图层服务地址:http://[host]:[port]/igs/rest/mrfs/layer | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options |
Object |
其他附加属性包含以下属性的对象
|
Returns:
图层数组
Example:
var options1 = {
autoReset: false,
tileFeaturesCount: 400,
filter: {
where: 'OBJECTID>500'
},
style: {
type: 'building',
styleOptions: {
heightField: 'HEIGHT',
heightRatio: 10,
color: Cesium.Color.WHITE,
outline: true
}
}
}
//多图层style设置,多图层filter同理
var options2 = {
style: [
{
type: 'line',
styleOptions: {
color: Cesium.Color.WHITE,
width: 1.0
}
},
//空对象,即使用默认样式
{},
{
type: 'line',
styleOptions: {
color: Cesium.Color.RED,
width: 1.0
}
}
]
}
//地图文档加载示例
url = 'http://localhost:6163/igs/rest/mrms/docs/二维矢量';
options = {
layers: 'layers=show:0,1'
}
var mapGisVectorDocLayers = webGlobe.appendMapGISVectorDocMap(url, options);
//gdbp地址加载示例
url_gdbp = 'http://localhost:6163/igs/rest/mrfs/layer';
option_gdbp={
layers:'gdbp1,gdbp2,gdbp3'
}
var mapGisVectorDocLayers = webGlobe.appendMapGISVectorDocMap(url_gdbp, option_gdbp);
//移除
webGlobe.removeMapGISVectorDocMap(mapGisVectorDocLayers);
appendMapGISVectorLayer(url, options) → MapGISVectorLayer
加载矢量图层
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
String | 发布的文档地址 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options |
Object |
其他附加属性包含以下属性的对象
|
Returns:
图层对象
Example:
var options = {
autoReset: true,
layers: 'layers=hide:1',
tileFeaturesCount: 400,
//heightAttributeName: 'HEIGHT',
style: {
type: 'building',
styleOptions: {
heightField: 'HEIGHT',
heightRatio: 10,
color: colors[0],
//outline: true,
outlineColor: Cesium.Color.BLACK,
outlineWidth: 1.0
}
},
//heightRatio: 10,
clampToGround: true
}
var mapGisVectorLayer = webGlobe.appendMapGISVectorLayer('http://localhost:6163/igs/rest/mrms/docs/二维矢量',options);
//移除
webGlobe.removeMapGISVectorLayer(mapGisVectorLayer);
添加模型(gltf文件)
Name | Type | Description |
---|---|---|
id |
Number | 模型id |
url |
String | 模型url路径 |
lon |
Number | 模型所在经度 |
lat |
Number | 模型坐在纬度 |
height |
Number | 高度 |
scale |
Number | 缩放比 |
Returns:
model 移除通过 removeModel()
批量添加模型
Name | Type | Description |
---|---|---|
modelsString |
String | 模型组织 |
successCall |
function | 成功后的回调 |
通过文件批量添加模型
Name | Type | Description |
---|---|---|
filePath |
String | 模型组织文件 |
successCall |
function | 成功后的回调 |
- removeModels
See:
添加OpenWeather服务:免费的天气预报云图
type Pressure Temperature Windspeed Clouds Label
appendPoint(lat, lon, height, pName, pPixelSize, pColor, pOutlineColor, pOutlineWidth, description) → entity
添加点
Name | Type | Description |
---|---|---|
lat |
Number | 经度 |
lon |
Number | 纬度 |
height |
Number | 高程 |
pName |
String | 名称 |
pPixelSize |
Number | 像素大小 |
pColor |
Color | (webGlobe.getColor(1,0,0,1))颜色 |
pOutlineColor |
Color | 外边线颜色 |
pOutlineWidth |
Number | 边线宽度 |
description |
string | 属性描述信息 |
Returns:
返回点对象 移除通过removeEntity(entity)
- getColor
Example:
var point = webGlobe.appendPoint(115.2, 31, 200, '点', 100, webGlobe.getColor(1,0,0,1), webGlobe.getColor(1,1,0,1), 2);
See:
通用添加点
Name | Type | Description |
---|---|---|
lat |
Number | 经度 |
lon |
Number | 纬度 |
height |
Number | 高程 |
pName |
String | 名称 |
description |
string | 属性描述信息 |
options |
object | entity参数信息对象 |
画多边形区
Name | Type | Description |
---|---|---|
name |
String | 名称 |
points |
Array | 点数组(顺序是逆时针) |
fillColor |
Color | 区填充色 默认白色半透明 通过webSceneControl.getColor(red, green, blue, alpha) |
outlineColor |
Color | 外框线颜色 默认红色半透明 |
Returns:
绘制的多边形区对象 移除通过removeEntity(entity)
- getColor
- removeEntity
Example:
var arryp =[-108.0, 25.0, 100000,
-100.0, 25.0, 100000,
-100.0, 30.0, 100000,
-108.0, 30.0, 300000];
var webGlobe = new webSceneControl('GlobeView');
webGlobe.appendPolygon('1',arryp,webGlobe.getColor(1,0,0,1),webGlobe.getColor(0,0,1,1));
See:
添加PopUP:需考虑相机的高度对PopUp大小、透明度、偏移值的影响
Name | Type | Description |
---|---|---|
containID |
string | 容器的div id(注意该容器不能放在球容器中) |
content |
string | popup的内容,可以为带html标签的字符串 |
posion |
Posion:Cartesian3 | popup的位置(地图单位) |
offset |
Array | [x,y]偏移值,像素单位 |
closeCallback |
function | popup的close按钮点击回调函数 |
options |
Object |
Example:
AppendPopUp('aaa','测试1测试1测试1<br/>测试1测试2<br/>',entity._position._value,[95,0],webGlobe.removePopUp)
添加天地图(经纬度)
Name | Type | Description |
---|---|---|
} |
object | options |
options.type |
String | 地图类型 'vec'矢量 'img'影像 'ter'地形 |
options.token |
String | 开发token (请到天地图官网申请自己的开发token,自带token仅做功能验证随时可能失效) example : {url:'http://t0.tianditu.com/DataServer?T=vec_c&X={x}&Y={y}&L={l}'} //天地图经纬度数据 {url:'http://glcdata.tianditu.com/DataServer?T=glc_c&X={x}&Y={y}&L={l}'} //30米全球地表覆盖数据服务 |
通过wmts服务添加天地图
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
} |
String | layerType {'img':影像 'ter':地形 'cta':注记} | ||||||
options |
Object |
|
添加地形
Name | Type | Description |
---|---|---|
url |
String | 地形服务地址 |
west |
Number | 西经 |
south |
Number | 南纬 |
east |
Number | 东经 |
north |
Number | 北纬 |
Returns:
terrain 地形对象
添加自定义瓦片服务
Name | Type | Description |
---|---|---|
url |
String | 地形 |
options |
Object |
Returns:
自定义瓦片服务对象
添加WMS服务图层
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tileUrl |
String | 服务地址 | ||||||||||||
layerName |
String | 图层名 | ||||||||||||
options |
Object |
附加选项
|
添加WMTS(WebMapTileService) 标准的瓦片
Name | Type | Description |
---|---|---|
tileUrl |
String | 瓦片服务地址 |
layerName |
String | 图层名称 |
tileMatrixSetID |
String | |
maximumLevel |
Number | 最大级数 |
startLevel |
Number | 初始级别 正常默认为0 有的为1 |
添加WMTS(WebMapTileService) 标准的瓦片(扩展)
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
wmtsBaseUrl |
String | wmts服务基地址 :localhost:6163/igs/rest/ogc/WMTSServer | ||||||||||||||||
options |
Object |
optional
包含以下属性的对象
|
Example:
var imagelayer;
function callBackfunction(layer){
imagelayer = layer;
}
var wmtsLayer = new webGlobe.appendWMTSTileExt('localhost:6163/igs/rest/ogc/WMTSServer',{
serverName:'dd',
proxy:'/Handler.ashx',
synchronous:true,
loaded:callBackfunction,
from:'jiwei'});
//异步的方式
// webGlobe.appendWMTSTileExt("http://59.252.165.22:8066/ime-cloud/rest/2016qgfdqrjszy/wmts", {
// from: 'jiwei',
// loaded:function(layer){
// jw = layer;
// }
// });
//同步方式
jw = webGlobe.appendWMTSTileExt("http://59.252.165.22:8066/ime-cloud/rest/2016qgfdqrjszy/wmts", {
from: 'jiwei'
});
盒式开挖
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tileset |
Object | 模型 | |||||||||||||||
cartographic |
Cartographic | 开挖中心点经纬度坐标 | |||||||||||||||
options |
Object |
附加参数
|
计算两点间的heading 航向角
Name | Type | Description |
---|---|---|
center |
Cartographic | 中心点 (第一个点) 坐标为弧度 |
target |
Cartographic | 目标点 (第二个点)坐标为弧度 |
Returns:
heading
切换场景模式
Name | Type | Description |
---|---|---|
sceneMode |
String | 场景模式'3D', '2D','COLUMBUS_VIEW'(平面三维) |
duration |
Number | 动画持续时间,<=0时,保持场景范围不变 |
修改场景的天空盒
Name | Type | Description |
---|---|---|
skybox |
SkyBox | 天空和对象 |
Example:
var skybox = new Cesium.SkyBox({
sources : {
positiveX : 'Mapgis/MapgisPlugin/Assets/Textures/SkyBox2/front.jpg',
negativeX : 'Mapgis/MapgisPlugin/Assets/Textures/SkyBox2/back.jpg',
positiveY : 'Mapgis/MapgisPlugin/Assets/Textures/SkyBox2/left.jpg',
negativeY : 'Mapgis/MapgisPlugin/Assets/Textures/SkyBox2/right.jpg',
positiveZ : 'Mapgis/MapgisPlugin/Assets/Textures/SkyBox2/top.jpg',
negativeZ : 'Mapgis/MapgisPlugin/Assets/Textures/SkyBox2/bottom.jpg'
}
});
清除模型漫游
清空所有的PopUP
Type | Description |
---|---|
关闭自转
经纬度坐标转为世界坐标
Name | Type | Description |
---|---|---|
ellipsoidPosition |
Cartesian2 | |
height |
Number | |
worldPosition |
Cartesian3 |
根据三维范围创建包围盒
Name | Type | Description |
---|---|---|
southwest |
Cartesian3 | 三维范围左下角/西南值,xy:经纬度最小值 z:高度最小值/米 |
northeast |
Cartesian3 | 三维范围右上角/东北值,xy:经纬度最大值 z:高度最大值/米 |
options |
Object | 可选参数项 {@RectangleGraphics} |
Returns:
entity 结果对象,可用于移除
Example:
var minRectangle3D = new Cesium.Cartesian3(lngS,latS,minHeight);
var maxRectangle3D = new Cesium.Cartesian3(lngE,latE,maxHeight);
var result = webGlobe.createBoundingBox(minRectangle3D,maxRectangle3D,{ outlineColor: Cesium.Color.YELLOW });
按照三维范围创建坐标轴网格
Name | Type | Description |
---|---|---|
southwest |
Cartesian3 | 三维范围左下角值/西南值,xy是经纬度 z是高度最小值 |
northeast |
Cartesian3 | 三维范围右上角/东北值,xy是经纬度 z是高度最大值 |
options |
Object |
Returns:
结果对象,可用于移除
Example:
var originalPoint = tileset._root._boundingVolume.southwestCornerCartesian;
var endPoint = tileset._root._boundingVolume.northeastCornerCartesian;
var maxHeight = tileset._root._boundingVolume.maximumHeight;
var minHeight = tileset._root._boundingVolume.minimumHeight;
var ellipsoid=viewer.scene.globe.ellipsoid;
var cartographicS=ellipsoid.cartesianToCartographic(originalPoint);
var cartographicE=ellipsoid.cartesianToCartographic(endPoint);
var latS=Cesium.Math.toDegrees(cartographicS.latitude);
var lngS=Cesium.Math.toDegrees(cartographicS.longitude);
var latE=Cesium.Math.toDegrees(cartographicE.latitude);
var lngE=Cesium.Math.toDegrees(cartographicE.longitude);
var min = new Cesium.Cartesian3(lngS,latS,minHeight);
var max = new Cesium.Cartesian3(lngE,latE,maxHeight);
var result = webGlobe.createCoordinateGrid(min,max,{
lineColor:Cesium.Color.CYAN,
labelColor:Cesium.Color.DARKORANGE
});
创建二维交互绘图工具
Name | Type | Description |
---|---|---|
elementId |
String | 工具容器 |
iconUrlOptions |
object | 工具的图片json对象 |
isVertical |
bool | 工具是否垂直排列,默认情况下为水平排列 |
Example:
var toolImgURL = {
markerIcon: './css/images/glyphicons_242_google_maps.png',
polylineIcon: './css/images/glyphicons_097_vector_path_line.png',
polygonIcon: './css/images/glyphicons_096_vector_path_polygon.png',
circleIcon: './css/images/glyphicons_095_vector_path_circle.png',
extentIcon: './css/images/glyphicons_094_vector_path_square.png',
clearIcon: './css/images/glyphicons_067_cleaning.png'
};
var eventCallbacks = {
created: {marker:function(){},polyline:function(){}},
edited: {marker:function(){},polyline:function(){}},
};
动态剖切分析功能
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
layers |
Array.<MapGISM3DSet> | |||||||||||||||||
planes |
Array.<ClippingPlane> | |||||||||||||||||
options |
Object |
optional
可选参数
|
Returns:
返回图层、剖切面对象
图层
Name | Type | Description |
---|---|---|
option.tileSet |
Object | 开挖面的形状 |
option.planes |
Object | 裁剪面材质 |
option.material |
Object | 边界线颜色 |
option.edgeColor |
Object | 边界线宽度 |
option.edgeWidth |
Object | 裁减法线方向,默认值为 false |
option.unionClippingRegions |
Object | 开挖面定位点经度 |
option.longitude |
Object | 开挖面定位点纬度 |
option.latitude |
Object | 开挖面定位点高度 |
option.height |
Object |
Name | Type | Description |
---|---|---|
option.children |
Array.<child> | 当前图层子节点,如果为空则返回undefined |
option.center |
Cartesian3 | 爆炸中心中心 |
option.direction |
Cartesian3 | 图层整体爆炸方向,默认值为 Cartesian3(1.0, 0.0, 0.0) |
option.distance |
Number | 沿当前方向移动距离,默认值为 50 |
创建热力图
Name | Type | Description |
---|---|---|
bounds |
object | :WGS84 bounding box {north, east, south, west} |
maxValue |
Number | 最大值 |
minValue |
Number | 最小值 |
data |
Array.<Array> | Array<[{'x':,'y':,'value':}]> |
Returns:
热力图实例
创建导航控件
Name | Type | Description |
---|---|---|
options |
object | 导航控件参数 example: var options = {}; //用于在使用重置导航重置地图视图时设置默认视图控制。接受的值是Cesium.Cartographic 和 Cesium.Rectangle options.defaultResetView = Cesium.Rectangle.fromDegrees(71, 3, 90, 14); //用于启用或禁用罗盘 options.enableCompass= true; //用于启用或禁用缩放控件 options.enableZoomControls= false; //用于启用或禁用距离图例 options.enableDistanceLegend= false; //用于启用或禁用指南针外环 options.enableCompassOuterRing= true; |
Returns:
三维笛卡尔坐标点
模型漫游
Name | Type | Description |
---|---|---|
modelURL |
string | 模型url |
positionArr |
Array.<Array> | 漫游线路节点坐标数组 Array<[x,y]> |
isShowPath |
bool | 是否显示线路和节点 |
clockFrequency |
Number | 漫游时钟频率 |
Returns:
entities 模型对象Array
删除3DTile数据
Name | Type | Description |
---|---|---|
tileset |
object | 添加返回的primitive |
删除地形图层
跳转到
Name | Type | Description |
---|---|---|
lon |
Number | 经度 |
lon |
Number | 纬度 |
height |
Number | 视角高度 |
duration |
Number | 跳转持续时间 |
通用跳转接口
Name | Type | Description |
---|---|---|
lon |
Number | 经度 |
lat |
Number | 纬度 |
height |
Number | 视角高度 |
options |
object | 扩展参数 兼容原生 |
跳转到
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
lon |
Number | 经度 | ||||||||||||||||||
lon |
Number | 纬度 | ||||||||||||||||||
options |
Object |
optional
跳转持续时间
|
根据点坐标确定裁剪面
Name | Type | Default | Description |
---|---|---|---|
pointsArray |
Array.<Cartesian3> | 用于确定裁剪面的折线或者多边形点坐标,多边形的话要封边 | |
switchToExcavate |
Boolean |
false
|
optional 判断是计算剖切还是开挖的裁剪面,为false时是剖切,为true时是开挖,默认为false |
Returns:
planes 返回裁剪面数组
getColor(red, green, blue, alpha) → Color
获取颜色 这里所有接口中的Color都通过此接口获取
Name | Type | Description |
---|---|---|
red |
Number | 红色分量(0-1.0) |
green |
Number | 绿色分量(0-1.0) |
blue |
Number | 蓝色分量(0-1.0) |
alpha |
Number | 透明度 (0-1.0) |
Returns:
颜色对象
获取高程图的结果
Name | Type | Description |
---|---|---|
worldPositions |
Array | 世界坐标点集 |
terrainLayer |
Object | 地形图层对象 |
options |
Onject | 可选参数 |
precision |
Number | 数据采样精度 |
density |
Number | 范围内等值点密度 |
numPrecision |
Number | 最高点最低点精度 |
点到线的距离
Name | Type | Description |
---|---|---|
point |
Object | 点位置 |
pnt1 |
Object | 直线的第一个点 |
pnt2 |
Object | 直线的第二个点 |
getGravityPoint(points, transform) → Cartographic
根据坐标与转换矩阵,求多边形重心点坐标,输出为经纬度坐标,角度制。
Name | Type | Description |
---|---|---|
points |
Array.<Cartesian3> | 多边形顶点坐标数组 |
transform |
Matrix4 | 转换矩阵 |
Returns:
cartographic 返回重心点坐标
计算两点间的heading 航向角
Name | Type | Description |
---|---|---|
center |
Cartesian3 | 中心点 (第一个点) |
target |
Cartesian3 | 目标点 (第二个点) |
Returns:
heading
根据经纬度计算高程
计算场景的二维范围
Returns:
场景范围(单位:经纬度)Array<[lon,lat]>
获取坡度分析对象
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
terrainLayer |
Object | 地形对象 | ||||||||||||
worldPositions |
Array | 世界点集 | ||||||||||||
slopes |
Array | 坡度值 | ||||||||||||
options |
Object |
可配置参数
|
getTransform(longitude, latitude, height) → Matrix4
通过角度制经纬度坐标获取该点的转换矩阵
Name | Type | Description |
---|---|---|
longitude |
Number | 角度制经度 |
latitude |
Number | 角度制纬度 |
height |
Number | 高程 |
Returns:
modelMatrix 转换矩阵
复位
Returns:
根据方向向量移动模型位置
Name | Type | Description |
---|---|---|
tileset |
Object | |
direction |
Cartesian3 | 方向向量,将模型按照该值进行移动 |
Returns:
matrix 移动结束后的转换矩阵
开启自转
输出屏幕截图:需使用reimg.js
toImg()
toBase64()
toCanvas()
toPng()
toJpeg()
downloadPng(filename)
可以根据图像对象保存为不同类型的图片。
Returns:
返回图像对象
暂停围绕旋转
求多边形面积,用于判断多边形是否为逆时针
Name | Type | Description |
---|---|---|
pointsArray |
Array.<Cartesian3> | 多边形顶点坐标数组 |
Returns:
area 如果area大于0,就是逆时针,小于0,就是顺时针
注册鼠标事件
Name | Type | Description |
---|---|---|
eventType |
String | 事件类型 1:LEFT_CLICK 2:LEFT_DOWN 3:LEFT_UP 4:LEFT_DOUBLE_CLICK 5:RIGHT_DOWN 6:RIGHT_UP 7:RIGHT_CLICK 8:MOUSE_MOVE 9:WHEEL(鼠标滚轮) |
callbackFun |
function | 回调函数 |
handler |
Object | 回调函数 |
Returns:
事件句柄
删除所有数据源:与以上几个接口配合使用
Name | Type | Description |
---|---|---|
isDestroy |
Bool | 是否销毁 |
移除所有实体
清空影像图层
Name | Type | Description |
---|---|---|
isdestroy,是否销毁图层 |
boolean | 说明:在图层需要频繁切换的情况下,isdestroy最好取false |
移除全部实体
移除全部场景特效
移除绘制的包围盒对象
Name | Type | Description |
---|---|---|
entity |
Object | 绘制的包围盒对象 |
Example:
var result = webGlobe.createBoundingBox(minRectangle3D,maxRectangle3D,{ outlineColor: Cesium.Color.YELLOW });
webGlobe.removeBoundingBox(result);
移除创建的坐标轴网格
Name | Type | Description |
---|---|---|
网格对象,创建坐标网格接口返回的对象 |
Object |
Example:
var result = webGlobe.createCoordinateGrid(min,max,{
lineColor:Cesium.Color.CYAN,
labelColor:Cesium.Color.DARKORANGE
});
webGlobe.removeCoordinateGrid(result);
删除数据源:与以上几个接口配合使用
Name | Type | Description |
---|---|---|
datasource |
Cesium.DataSource | 数据源 |
isDestroy |
Bool | 是否销毁 |
移除添加的文档
移除实体
Name | Type | Description |
---|---|---|
entity |
entity | 实体对象 |
删除图片,与appendImageByUrl对应
Name | Type | Description |
---|---|---|
ImageryLayer |
ImageryLayer | 图片地址 |
isDestroy |
bool | 是否销毁 |
通用删除影像图层
Name | Type | Description |
---|---|---|
google等图层,其为addImageryProvider返回的值 |
imagelayer | |
isdestroy,是否销毁图层 |
boolean | 说明:在图层需要频繁切换的情况下,isdestroy最好取false |
移除瓦片图层
Name | Type | Description |
---|---|---|
imageryLayer |
imageryLayer | 图层对象 |
移除MapGIS矢量地图文档
Name | Type | Description |
---|---|---|
vectorlayers |
array.<MapGISVectorLayer> | 进行移除的图层 |
Example:
var mapGisVectorDocLayers = webGlobe.appendMapGISVectorDocMap('http://localhost:6163/igs/rest/mrms/docs/二维矢量',otherOptions);
webGlobe.removeMapGISVectorDocMap(mapGisVectorDocLayers);
移除矢量图层
Name | Type | Description |
---|---|---|
vectorlayer |
MapGISVectorLayer | 进行移除的图层 |
Example:
var mapGisVectorLayer = webGlobe.appendVectorLayer('http://localhost:6163/igs/rest/mrms/docs/二维矢量',Options);
webGlobe.removeVectorLayer(mapGisVectorLayer);
移除模型
Name | Type | Description |
---|---|---|
model |
model | 模型对象 |
移除通过appendModelsByFile()和appendModels()添加的模型
Name | Type | Description |
---|---|---|
models |
DataSource | 模型组 |
- appendModelsByFile,appendModels
See:
删除PopUP
Name | Type | Description |
---|---|---|
popID |
string | popup的的div id |
移除绕点自旋转事件
移除场景特效
移除地形压平
重置网格剖分数据的色表,恢复至初始状态
Name | Type | Description |
---|---|---|
layer |
String | 待修改的网格剖分数据 |
绕点旋转 相机绕点飞行一周 或者相机绕自身旋转一周
Name | Type | Default | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type |
Number |
'rotationAroundPos'
|
optional 旋转类型 默认绕相机自身旋转 | ||||||||||||||||||||||||
options |
Object |
optional
附加参数系信息
|
缩放多边形
Name | Type | Description |
---|---|---|
worldPositions |
Array | 原始世界坐标集 |
distance |
Number | 距离边距离 |
scaleWorldPositions |
Array | 缩放后的世界坐标集 |
屏幕坐标转为笛卡尔坐标
Name | Type | Description |
---|---|---|
position |
Position | 屏幕坐标点 |
Returns:
三维笛卡尔坐标点
屏幕坐标转为经纬度坐标
Name | Type | Description |
---|---|---|
position |
Position | 屏幕坐标点 |
Returns:
三维经纬度坐标点(单位弧度)
更改矢量图层显示
Name | Type | Description |
---|---|---|
layer |
MapGISVectorLayer | 进行显示更改的图层 |
isshow |
Boolean | 是否显示 |
Example:
var mapGisVectorLayer = webGlobe.appendVectorLayer('http://localhost:6163/igs/rest/mrms/docs/二维矢量',Options);
webGlobe.setIsShowForMapGISVectorLayer(mapGisVectorLayer, false);
设置当前视图范围
Name | Type | Description |
---|---|---|
lon |
Number | 经度 |
lat |
Number | 纬度 |
height |
Number | 高度 |
curHeading |
Number | 绕垂直于地心的轴旋转的度数 |
curPitch |
Number | 绕纬度线旋转度数 |
curRoll |
Number | 绕经度线旋转度数 |
显示经纬度 高程 视角高度
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
elementId |
Element | String | 要显示的div的id | ||||||||||||||||
options |
Object |
附加属性
|
Returns:
element 状态栏的element
@ deprecated 该接口即将弃用 请用show替换
Example:
webGlobe.showPosition('', {
showHpr: true,
showSelectTileInfo:true,
showViewLevelInfo:true
});
显示瓦片网格信息
Name | Type | Description |
---|---|---|
isVisible |
Boolean | 是否可见 |
simplifyLine(positions) → Array.<Cartesian3>
化简抽稀(用于折线路绘制)
Name | Type | Description |
---|---|---|
positions |
Array.<Cartesian3> | 坐标点序列 |
Returns:
抽稀后的坐标点序列
开始模型漫游
Name | Type | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
layerList |
Array.<Object> | 图层列表 | ||||||||||||||||||||||||||||||||||||
idList |
Array.<Object> | id列表 | ||||||||||||||||||||||||||||||||||||
options |
Object |
扩展属性
|
开始围绕旋转
地形压平
Name | Type | Description |
---|---|---|
isTerrainFlatten |
Boolean | 是否执行地形压平 |
positions |
Array.<Cartesian3> | 指定压平区域 |
flattenHeight |
Number | 压平到指定高度 |
结束模型漫游
停止全部高亮
根据id停止高亮
transformToLocal(positions, transform) → Array.<Cartesian3>
将世界坐标系坐标转换为本地坐标
Name | Type | Description |
---|---|---|
positions |
Array.<Cartesian3> | 多边形顶点坐标数组 |
transform |
Matrix4 | 转换矩阵,可缺失,将利用点坐标数组的第一个点进行矩阵推算 |
Returns:
返回本地坐标数组
注销鼠标事件
Name | Type | Description |
---|---|---|
eventType |
String | 事件类型,1:LEFT_CLICK 2:LEFT_DOWN 3:LEFT_UP 4:LEFT_DOUBLE_CLICK 5:RIGHT_DOWN 6:RIGHT_UP 7:RIGHT_CLICK 8:MOUSE_MOVE 9:WHEEL |
Returns:
事件句柄
更新网格剖分数据的色表
Name | Type | Description |
---|---|---|
layer |
Object | 待修改的网格剖分数据 |
imageUrl |
String | 图片地址 |
更新二维地图文档瓦片
Name | Type | Description |
---|---|---|
layer |
ImageryProvider | 二维文档图层对象 |
Example:
var mapGisTile = webGlobe.append2DDocTile('http://localhost:6163/igs/rest/mrms/docs/二维矢量',otherOptions);
mapGisTile.imageryProvider.layers = 'show:1,2';
webGlobe.updateImageryLayer(mapGisTile);
更新矢量图层
Name | Type | Description |
---|---|---|
vectorlayer |
MapGISVectorLayer | 进行显示更改的图层 |
newOptions |
Object | 更新的属性 |
Example:
var VectorLayers = webGlobe.append('http://localhost:6163/igs/rest/g3d/LineMultiLayer',otherOptions);
var rect = new Cesium.Rectangle(111.0455, 21.7794, 113.7941, 24.8138);
var TestRect = {
geometryType: 'rect',
geometry: rect
};
var Testoptions = {
filter: TestRect
};
webGlobe.updateMapGISVectorLayer(VectorLayers[2], Testoptions);
var TestWhere={
where: 'OBJECTID<100'
}
var newOptions = {
filter: TestWhere
};
webGlobe.updateMapGISVectorLayer(VectorLayers[2], newOptions);
缩小
放大
缩放到图层
Name | Type | Description |
---|---|---|
layer |
Object |