MapLayerFeatureSelection

MapLayerFeatureSelection

地图图层矢量要素选择。该类对象不需要用户创建。 在MapLayerCollection中设置enableFeatureSelection属性为true,创建该类对象实例; 设置enableFeatureSelection属性为false,销毁该类对象实例。使用featureSelection时,获取该对象实例。

Constructor

new MapLayerFeatureSelection(options)

Author:
  • zpc
Example
// 地图图层矢量要素选择示例
var mapLayers = mainControl.mapLayers;
mapLayers.enableFeatureSelection = true;    // 开启地图图层矢量要素选择
mapLayers.enableFeatureSelection = false;    // 关闭地图图层矢量要素选择
var featureSelection = mapLayers.featureSelection;    // 获取地图图层矢量要素选择实例
Parameters:
Name Type Description
options Object 拥有以下属性的对象:
Properties
Name Type Description
viewer Cesium.Viewer Cesium可视化器。
popups Popups 弹出框。

Methods

destroy()

销毁地图图层要素选择实例对象