dojo.require("esri.process.Processor")
Description
(Added at v3.9)
The base processor class provides the generic api for processors and provides an extension point from which developers can create and extend additional processors.
Samples
Search for
samples that use this class.
Subclasses
Constructors
Properties
Methods
addLayer(layer) | None | Add layer to processor. |
removeLayer(layer) | None | Remove layer from processor. |
setMap(map) | None | Synchronize the layers the processor handles with the map's GraphicsLayer and GraphicsLayer subclasses (FeatureLayer etc). |
start() | None | Start the processor. |
stop() | None | Stop the processor. |
unsetMap() | None | Unset the map and detach processor from all layers. |
Events
[ On Style Events | Connect Style Event ]
All On Style event listeners receive a single event object. Additionally, the event object also contains a 'target' property whose value is the object which fired the event.
Events
start | | Fires when the processor is started. |
stop | | Fires when the processor is stopped. |
Old Events
onStart() | Fires when the processor is started. |
onStop() | Fires when the processor is stopped. |
Constructor Details
Creates a processor.
Parameters:
<Object > options |
Optional |
Configuration options for the processor. |
options
properties:
<Boolean > autostart |
Optional |
Start processing features immediately. Default is true . |
<Boolean > drawFeatures |
Optional |
Whether the processor allow the feature layer to draw its features. Default is true . |
<Boolean > fetchWithWorker |
Optional |
Whether the processor do the layer's I/O via a worker. Default is false . |
<FeatureLayer[] > layers |
Optional |
A FeatureLayer or array of FeatureLayers to attach the processor to. Ignore if map is provided. |
<Map > map |
Optional |
Uses all FeatureLayers associated with the map in the processor. Remains in sync with the map's layers. Takes precedence over layer option. |
<Boolean > passFeatures |
Optional |
Whether the processor pass the features through without modification or delay to the FeatureLayer. Default is true . |
<Boolean > requireWorkerSupport |
Optional |
Whether the processor require Workers to function properly. Default is true . |
Property Details
Allow the feature layer to draw the features. This interacts with the passFeatures
option. If both are true
, then the layer will behave normally. If both are false
, then the layer won't receive the features until the processor is finished and then won't draw them. The other combinations will either cause the features to be passed immediately, but not drawn; or passed only after processing but then drawn as normal.
Known values: true | false
Default value: true
Should features be fetched through the Worker. In OnDemandMode
, it is almost always faster to fetch the features via the main thread and then allow the processor to pass them to the process worker.
Known values: true | false
Default value: false
Layer(s) connected to the processor.
Pass features back to layer without delay before processing.
Known values: true | false
Default value: true
Require support for Worker in order to use this processor. The default is true
. If this is the case and the client's browser does not support Workers then this process won't attach or start and the feature layer will be unaffected by this process. You should only modify this value to false
with very careful consideration. Use false with extreme caution. A value of false
could cause significant slow downs and even crashes on older browsers.
Known values: true | false
Default value: true
Method Details
Remove layer from processor.
Synchronize the layers the processor handles with the map's GraphicsLayer and GraphicsLayer subclasses (FeatureLayer etc).
Parameters:
<Map > map |
Required |
The map instance to synchronize layers with. |
Start the processor. Normally occurs automatically. Fires the start
event.
Stop the processor. Fires the stop
event.
Unset the map and detach processor from all layers.
Event Details
[ On Style Events | Connect Style Event ]
Fires when the processor is started.
Fires when the processor is stopped.
Fires when the processor is started.
Fires when the processor is stopped.