Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Object: esri/plugins/spatialIndex

dojo.require("esri.plugins.spatialIndex");

Description

(Added at v3.9)
A static utility module that adds or removes a SpatialIndex instance on a Map or FeatureLayer. Can be included in those classes as a constructor option or through the addPlugin method on those classes.

Samples

Search for samples that use this class.

Methods

NameReturn typeSummary
add(target, options?)NoneAdds an index property to the target instance.
remove()NoneRemoves the index plugin.
Method Details

add(target, options?)

Adds an index property to the target instance.
Parameters:
<Map | FeatureLayer> target Required The map or feature layer to which the index is connected.
<Object> options Optional See the object specifications table below for the structure of the index options object.
Object Specifications:
<options>
<Boolean> drawFeatures Optional Whether the processor allow the feature layer to draw its features. Default is true.
<String> indexType Optional The indexing system to use. One of "rtree", "kdtree", "quadtree". "kdtree" is only used for points. Default is "rtree".
<Boolean> passFeatures Optional Whether the processor pass the features through without modification or delay to the FeatureLayer. Default is true.
<SpatialIndex> spatialIndex Required A SpatialIndex processing instance to use rather than creating a new one.

remove()

Removes the index plugin.
Show Modal