Class: RouteLocatorParameters

RouteLocatorParameters

路由对象定位空间对象的参数类。 参数有两种方式,分别为 Geometry 和 Dataset 两种,前者需要指定 sourceRoute 对象作为参数,后者需要 dataset,routeIDField,routeID 三个参数。如果用户两种参数均设置,优先选择 Dataset 方式。

new RouteLocatorParameters(options)

Usage
// 浏览器
<script type="text/javascript" src="https://iclient.supermap.io/dist/openlayers/iclient-ol.js"></script>
<script>
  new ol.supermap.RouteLocatorParameters(options);
  
  // 弃用的写法
  new SuperMap.RouteLocatorParameters(options);

</script>

// ES6 Import
import { RouteLocatorParameters } from '@supermap/iclient-ol';

new RouteLocatorParameters(options);

common/iServer/RouteLocatorParameters.js, line 7
Name Type Description
options Object

参数。

Name Type Default Description
sourceRoute Route | L.Polyline | ol.geom.LineString | GeoJSONObject

路由对象。

measure number

定位点的 M 值。只当路由对象定位点时有意义。

type string 可选

类型:点 or 线。

offset number 0 可选

定位点偏移量。只当路由对象定位点时有意义。

isIgnoreGap boolean false 可选

是否忽略子对象之间的距离。即不忽略子对象之间的距离。

startMeasure number 可选

定位线的起始 M 值。只当路由对象定位线时有意义。

endMeasure number 可选

定位线的终止 M 值。只当路由对象定位线时有意义。

Members

datasetstring

要用来做缓冲区分析的数据源中数据集的名称。该名称用形如"数据集名称@数据源别名"形式来表示。

endMeasurenumber

定位线的终止 M 值。只当路由对象定位线时有意义。

isIgnoreGapboolean

是否忽略子对象之间的距离。

measurenumber

定位点的 M 值。只当路由对象定位点时有意义。

offsetnumber

定位点偏移量。只当路由对象定位点时有意义。

routeIDnumber

路由对象标识。

routeIDFieldstring

路由对象所在的字段名称。

路由对象。

startMeasurenumber

定位线的起始 M 值。只当路由对象定位线时有意义。

typestring

类型:点 or 线。 可选值为: LINE :根据起始 M 值及终止 M 值定位线对象。 POINT : 根据 M 值定位点对象。

Methods

destroy()

common/iServer/RouteLocatorParameters.js, line 111

释放资源,将引用资源的属性置空。