require(["esri/tasks/TrimExtendParameters"], function(TrimExtendParameters) { /* code goes here */ });
Description
(Added at v2.0)
Sets the polylines and other parameters for the
trimExtend operation.
Samples
Search for
samples that use this class.
Constructors
Constants
DEFAULT_CURVE_EXTENSION | Default value. The extension considers both ends of the path. The old ends remain and new points are added to the extended ends. The new points have attributes that are extrapolated from existing adjacent segments. |
KEEP_END_ATTRIBUTES | When an extension is performed at an end, do not extrapolate the end segments attributes for the new point. Instead, the attributes will be the same as the current end. |
NO_END_ATTRIBUTES | When an extension is performed at an end, do not extrapolate the end segment's attributes for the new point. Instead the attributes will be empty. |
NO_EXTEND_AT_FROM | Do not extend the 'from' end of any path. |
NO_EXTEND_AT_TO | Do not extend the 'to' end of any path. |
RELOCATE_ENDS | When an extension is performed at an end, relocate the end point to the new position. |
Properties
Constructor Details
Creates a new TrimExtendParameters object. The constructor takes no parameters.
Sample:
require([
"esri/tasks/TrimExtendParameters", ...
], function(TrimExtendParameters, ... ) {
var trimExtendParams = new TrimExtendParameters();
...
});
Property Details
A flag used along with the trimExtend operation. See the
constants table for possible values.
The array of polylines to trim or extend. The structure of each geometry in the array is the same as the structure of the JSON polyline objects returned by the ArcGIS REST API.
Sample:
require([
"esri/layers/FeatureLayer", "esri/tasks/TrimExtendParameters", "esri/graphicsUtils", ...
], function(FeatureLayer, TrimExtendParameters, graphicsUtils, ... ) {
var lateralFL = new FeatureLayer( ... );
var trimExtendParams = new TrimExtendParameters();
trimExtendParams.polylines = graphicsUtils.getGeometries(lateralFL.getSelectedFeatures());
...
});
A polyline used as a guide for trimming or extending input polylines. The structure of the polyline is the same as the structure of the JSON polyline object returned by the ArcGIS REST API.