Classes
Type Definitions
-
要素Object{Object}
-
Properties:
Name Type Description idstring | number | undefined ID。
geometryGeometryObject | undefined 几何图形。
properties对象。<string, *> | undefined 属性。
-
GeometryCollectionObject{Array<GeometryObject>}
-
-
GeometryObject{SimpleGeometryObject} {GeometryCollectionObject}
-
-
ReadOptions{Object}
-
Properties:
Name Type Description dataProjectionProjectionLike | undefined 正在读取的数据的投影。 如果未提供,将从数据中推导投影(如可能)或使用格式的
dataProjection(如已设置)。 如果无法从数据中推导投影且格式未设置dataProjection,要素将不会被重新投影。extentExtent | undefined 正在读取的瓦片的范围(以地图单位表示)。 仅在使用瓦片像素作为几何图形单位读取数据时需要。配置时, 需要提供以
TILE_PIXELS为units的dataProjection以及瓦片的像素范围作为extent。featureProjectionProjectionLike | undefined 格式读取器创建的要素几何图形的投影。 如果未提供,要素将以
dataProjection返回。 -
SimpleGeometryObject{Object}
-
Properties:
Name Type Description typeType 类型。
flatCoordinatesArray.<number> 扁平坐标。
endsArray.<number> | Array.<Array.<number>> | undefined 结束索引数组。
layoutGeometryLayout | undefined 布局。
-
Type{'arraybuffer'} {'json'} {'text'} {'xml'}
-
-
WriteOptions{Object}
-
Properties:
Name Type Description dataProjectionProjectionLike | undefined 正在写入的数据的投影。 如果未提供,将使用格式的
dataProjection(如已设置)。 如果格式未设置dataProjection,要素将以featureProjection返回。featureProjectionProjectionLike | undefined 格式写入器将序列化的要素几何图形的投影。 如果未提供,如果设置了
dataProjection,则假定几何图形在该投影中;换句话说,它们不会被转换。rightHandedboolean | undefined 写入几何图形时,遵循线性环方向的右手规则。 这意味着多边形将具有逆时针的外环和顺时针的内环。 默认情况下,坐标按构造时提供的方式序列化。 如果为
true,将应用右手规则。 如果为false,将应用左手规则(外环顺时针,内环逆时针)。 注意并非所有格式都支持此属性。GeoJSON 格式在写入几何图形时确实使用此属性。decimalsnumber | undefined 坐标的最大小数位数。 坐标在内部以浮点数存储,但浮点运算可能产生大量小数位的坐标,通常在输出中不需要。 在此设置数字以舍入坐标。也可用于确保读入的坐标能以相同的小数位数写回。 默认不进行舍入。