查阅Cesium API

A standalone point geometry with useful accessor, comparison, and modification methods.

调用方法:
var point = new Point(-77, 38);
参数描述:
名称 类型 描述
x Number the x-coordinate. this could be longitude or screen pixels, or any other sort of unit.
y Number the y-coordinate. this could be latitude or screen pixels, or any other sort of unit.
Author:
  • 金磊

属性

海拔高度

方法

Construct a point from an array if necessary, otherwise if the input is already a Point, or an unknown type, return it unchanged

static SmartEarth.Point.convert(a)Point

调用方法:
// this
var point = Point.convert([0, 1]);
// is equivalent to
var point = new Point(0, 1);
参数描述:
名称 类型 描述
a Array.<Number> | Point | * any kind of input value
返回:
constructed point, or passed-through value.
Add this point's x & y coordinates to another point, yielding a new point.
参数描述:
名称 类型 描述
p Point the other point
返回:
output point
Get the angle from the 0, 0 coordinate to this point, in radians coordinates.

angle()Number

返回:
angle
Get the angle from this point to another point, in radians

angleTo(b)Number

参数描述:
名称 类型 描述
b Point the other point
返回:
angle
Get the angle between this point and another point, in radians

angleWith(b)Number

参数描述:
名称 类型 描述
b Point the other point
返回:
angle
Clone this point, returning a new point that can be modified without affecting the old one.
返回:
the clone
向三维场景中添加一个兴趣点。

createLocation(name, position, GroupID)

参数描述:
名称 类型 描述
name String 可选 名称
position Array 可选 一个经纬度数组 例如:[x, y, z]。
GroupID String | Int 可选 线的颜色。
向三维场景中添加一个兴趣点。

createLocations(name, position, GroupID)Promise.<Object>

参数描述:
名称 类型 描述
name String 可选 名称
position Array 可选 一个经纬度数组 例如:[x, y, z]。
GroupID String | Int 可选 线的颜色。
返回:
返回一个Cesium的对象。
点击获取坐标点的经纬度。

createLonlat()

向三维场景中添加一个点。

createPoint(position, fillColor)Promise.<Object>

参数描述:
名称 类型 描述
position Array 可选 一个经纬度数组 例如:[x, y, z]。
fillColor String 可选 线的颜色。
返回:
返回一个Cesium的对象。
向三维场景中添加一个点动态创建(优化)。

createPointOptimization(method)Promise.<Object>

参数描述:
名称 类型 描述
method object 可选 回调函数
返回:
返回一个Cesium的对象。
向三维场景中添加一个点。

createPoints(position, fillColor)Promise.<Object>

参数描述:
名称 类型 描述
position Array 可选 一个经纬度数组 例如:[x, y, z]。
fillColor String 可选 线的颜色。
返回:
返回一个Cesium的对象。
添加一个富文本点。

createRichTextPoint(Content, position, option)Point

调用方法:
var RichTextPoint = sgworld.Creator.createRichTextPoint('泰瑞天际', [120, 30.004], {
        fontColor: '#ffff00',
        fontSize: 18
    }, '0');
参数描述:
名称 类型 描述
Content String 可选 内容。
position Array | Object 可选 一个经纬度数组或对象 例如:[112, 32, 50]或{x:112,y:32,z:50}。
option Object | Cesium.BillboardGraphics.ConstructorOptions 可选 参数
名称 类型 默认值 描述
url String 可选 背景图。
GroupID String '0' 可选 GroupID。
fontColor String '#fff' 可选 字体颜色。
fontSize Number 15 可选 字体大小。
near Number 0 可选 最小可视距离。
far Number Number.MAX_VALUE 可选 最大可视距离。
far Number Number.MAX_VALUE 可选 最大可视距离。
data Object 可选 自定义参数
返回:
返回一个Point的对象。
删除Point

deleteObject()

Calculate the distance from this point to another point

dist(p)Number

参数描述:
名称 类型 描述
p Point the other point
返回:
distance
Calculate the distance from this point to another point, without the square root step. Useful if you're comparing relative distances.

distSqr(p)Number

参数描述:
名称 类型 描述
p Point the other point
返回:
distance
Divide this point's x & y coordinates by a factor, yielding a new point.
参数描述:
名称 类型 描述
k Point factor
返回:
output point
Divide this point's x & y coordinates by point, yielding a new point.

divByPoint(p)Point

参数描述:
名称 类型 描述
p Point the other point
返回:
output point
Judge whether this point is equal to another point, returning true or false.

equals(other)boolean

参数描述:
名称 类型 描述
other Point the other point
返回:
whether the points are equal
向三维场景中添加一个点动态创建。

executePoint(method)Promise.<Object>

参数描述:
名称 类型 描述
method object 可选 回调函数
返回:
返回一个Cesium的对象。
向三维场景中添加一个点动态创建。

executePointp(method)Promise.<Object>

参数描述:
名称 类型 描述
method object 可选 回调函数
返回:
返回一个Cesium的对象。
point导出工程数据

forbidDrawWorld()

获取point样式

getstyles()

获取Point的显示隐藏

getVisibility()

Return the magitude of this point: this is the Euclidean distance from the 0, 0 coordinate to this point's x and y coordinates.

mag()Number

返回:
magnitude
Multiply this point by a 4x1 transformation matrix

matMult(m)Point

参数描述:
名称 类型 描述
m Array.<Number> transformation matrix
返回:
output point
Multiply this point's x & y coordinates by a factor, yielding a new point.
参数描述:
名称 类型 描述
k Point factor
返回:
output point
Multiply this point's x & y coordinates by point, yielding a new point.

multByPoint(p)Point

参数描述:
名称 类型 描述
p Point the other point
返回:
output point
Compute a perpendicular point, where the new y coordinate is the old x coordinate and the new x coordinate is the old y coordinate multiplied by -1
返回:
perpendicular point
Rotate this point around the 0, 0 origin by an angle a, given in radians
参数描述:
名称 类型 描述
a Number angle to rotate around, in radians
返回:
output point
Rotate this point around p point by an angle a, given in radians

rotateAround(a, p)Point

参数描述:
名称 类型 描述
a Number angle to rotate around, in radians
p Point Point to rotate around
返回:
output point
Return a version of this point with the x & y coordinates rounded to integers.
返回:
rounded point
设置点的轮廓颜色

setOutlineColor(point, htmlColor)Object

参数描述:
名称 类型 描述
point Object 可选 point对象
htmlColor htmlColor
返回:
返回一个point对象。
设置点的填充透明度

setPointAlpha(point, a)Object

参数描述:
名称 类型 描述
point Object 可选 point对象
a Float 可选 透明度 0-1
返回:
返回一个point对象。
设置点的填充颜色

setPointColor(point, htmlColor颜色。)Object

参数描述:
名称 类型 描述
point Object 可选 point对象
htmlColor颜色。 htmlColor
返回:
返回一个point对象。
设置点的缓冲区添加

setRadius(point, 线宽。)Object

参数描述:
名称 类型 描述
point Object 可选 point对象
线宽。 radius
返回:
返回一个point对象。
设置Point的显示隐藏

setVisibility(b)

参数描述:
名称 类型 描述
b boolean 可选 true|false
动态标会 绑定鼠标

startModify()

Subtract this point's x & y coordinates to from point, yielding a new point.
参数描述:
名称 类型 描述
p Point the other point
返回:
output point
Calculate this point but as a unit vector from 0, 0, meaning that the distance from the resulting point to the 0, 0 coordinate will be equal to 1 and the angle from the resulting point to the 0, 0 coordinate will be the same as before.
返回:
unit vector point

创建点。

Author:
  • 金磊、张丹钊、张恒、薛鹏

属性

海拔高度

方法

Construct a point from an array if necessary, otherwise if the input is already a Point, or an unknown type, return it unchanged

static SmartEarth.Point.convert(a)Point

调用方法:
// this
var point = Point.convert([0, 1]);
// is equivalent to
var point = new Point(0, 1);
参数描述:
名称 类型 描述
a Array.<Number> | Point | * any kind of input value
返回:
constructed point, or passed-through value.
Add this point's x & y coordinates to another point, yielding a new point.
参数描述:
名称 类型 描述
p Point the other point
返回:
output point
Get the angle from the 0, 0 coordinate to this point, in radians coordinates.

angle()Number

返回:
angle
Get the angle from this point to another point, in radians

angleTo(b)Number

参数描述:
名称 类型 描述
b Point the other point
返回:
angle
Get the angle between this point and another point, in radians

angleWith(b)Number

参数描述:
名称 类型 描述
b Point the other point
返回:
angle
Clone this point, returning a new point that can be modified without affecting the old one.
返回:
the clone
向三维场景中添加一个兴趣点。

createLocation(name, position, GroupID)

参数描述:
名称 类型 描述
name String 可选 名称
position Array 可选 一个经纬度数组 例如:[x, y, z]。
GroupID String | Int 可选 线的颜色。
向三维场景中添加一个兴趣点。

createLocations(name, position, GroupID)Promise.<Object>

参数描述:
名称 类型 描述
name String 可选 名称
position Array 可选 一个经纬度数组 例如:[x, y, z]。
GroupID String | Int 可选 线的颜色。
返回:
返回一个Cesium的对象。
点击获取坐标点的经纬度。

createLonlat()

向三维场景中添加一个点。

createPoint(position, fillColor)Promise.<Object>

参数描述:
名称 类型 描述
position Array 可选 一个经纬度数组 例如:[x, y, z]。
fillColor String 可选 线的颜色。
返回:
返回一个Cesium的对象。
向三维场景中添加一个点动态创建(优化)。

createPointOptimization(method)Promise.<Object>

参数描述:
名称 类型 描述
method object 可选 回调函数
返回:
返回一个Cesium的对象。
向三维场景中添加一个点。

createPoints(position, fillColor)Promise.<Object>

参数描述:
名称 类型 描述
position Array 可选 一个经纬度数组 例如:[x, y, z]。
fillColor String 可选 线的颜色。
返回:
返回一个Cesium的对象。
添加一个富文本点。

createRichTextPoint(Content, position, option)Point

调用方法:
var RichTextPoint = sgworld.Creator.createRichTextPoint('泰瑞天际', [120, 30.004], {
        fontColor: '#ffff00',
        fontSize: 18
    }, '0');
参数描述:
名称 类型 描述
Content String 可选 内容。
position Array | Object 可选 一个经纬度数组或对象 例如:[112, 32, 50]或{x:112,y:32,z:50}。
option Object | Cesium.BillboardGraphics.ConstructorOptions 可选 参数
名称 类型 默认值 描述
url String 可选 背景图。
GroupID String '0' 可选 GroupID。
fontColor String '#fff' 可选 字体颜色。
fontSize Number 15 可选 字体大小。
near Number 0 可选 最小可视距离。
far Number Number.MAX_VALUE 可选 最大可视距离。
far Number Number.MAX_VALUE 可选 最大可视距离。
data Object 可选 自定义参数
返回:
返回一个Point的对象。
删除Point

deleteObject()

Calculate the distance from this point to another point

dist(p)Number

参数描述:
名称 类型 描述
p Point the other point
返回:
distance
Calculate the distance from this point to another point, without the square root step. Useful if you're comparing relative distances.

distSqr(p)Number

参数描述:
名称 类型 描述
p Point the other point
返回:
distance
Divide this point's x & y coordinates by a factor, yielding a new point.
参数描述:
名称 类型 描述
k Point factor
返回:
output point
Divide this point's x & y coordinates by point, yielding a new point.

divByPoint(p)Point

参数描述:
名称 类型 描述
p Point the other point
返回:
output point
Judge whether this point is equal to another point, returning true or false.

equals(other)boolean

参数描述:
名称 类型 描述
other Point the other point
返回:
whether the points are equal
向三维场景中添加一个点动态创建。

executePoint(method)Promise.<Object>

参数描述:
名称 类型 描述
method object 可选 回调函数
返回:
返回一个Cesium的对象。
向三维场景中添加一个点动态创建。

executePointp(method)Promise.<Object>

参数描述:
名称 类型 描述
method object 可选 回调函数
返回:
返回一个Cesium的对象。
point导出工程数据

forbidDrawWorld()

获取point样式

getstyles()

获取Point的显示隐藏

getVisibility()

Return the magitude of this point: this is the Euclidean distance from the 0, 0 coordinate to this point's x and y coordinates.

mag()Number

返回:
magnitude
Multiply this point by a 4x1 transformation matrix

matMult(m)Point

参数描述:
名称 类型 描述
m Array.<Number> transformation matrix
返回:
output point
Multiply this point's x & y coordinates by a factor, yielding a new point.
参数描述:
名称 类型 描述
k Point factor
返回:
output point
Multiply this point's x & y coordinates by point, yielding a new point.

multByPoint(p)Point

参数描述:
名称 类型 描述
p Point the other point
返回:
output point
Compute a perpendicular point, where the new y coordinate is the old x coordinate and the new x coordinate is the old y coordinate multiplied by -1
返回:
perpendicular point
Rotate this point around the 0, 0 origin by an angle a, given in radians
参数描述:
名称 类型 描述
a Number angle to rotate around, in radians
返回:
output point
Rotate this point around p point by an angle a, given in radians

rotateAround(a, p)Point

参数描述:
名称 类型 描述
a Number angle to rotate around, in radians
p Point Point to rotate around
返回:
output point
Return a version of this point with the x & y coordinates rounded to integers.
返回:
rounded point
设置点的轮廓颜色

setOutlineColor(point, htmlColor)Object

参数描述:
名称 类型 描述
point Object 可选 point对象
htmlColor htmlColor
返回:
返回一个point对象。
设置点的填充透明度

setPointAlpha(point, a)Object

参数描述:
名称 类型 描述
point Object 可选 point对象
a Float 可选 透明度 0-1
返回:
返回一个point对象。
设置点的填充颜色

setPointColor(point, htmlColor颜色。)Object

参数描述:
名称 类型 描述
point Object 可选 point对象
htmlColor颜色。 htmlColor
返回:
返回一个point对象。
设置点的缓冲区添加

setRadius(point, 线宽。)Object

参数描述:
名称 类型 描述
point Object 可选 point对象
线宽。 radius
返回:
返回一个point对象。
设置Point的显示隐藏

setVisibility(b)

参数描述:
名称 类型 描述
b boolean 可选 true|false
动态标会 绑定鼠标

startModify()

Subtract this point's x & y coordinates to from point, yielding a new point.
参数描述:
名称 类型 描述
p Point the other point
返回:
output point
Calculate this point but as a unit vector from 0, 0, meaning that the distance from the resulting point to the 0, 0 coordinate will be equal to 1 and the angle from the resulting point to the 0, 0 coordinate will be the same as before.
返回:
unit vector point