Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Class: OffsetParameters

require(["esri/tasks/OffsetParameters"], function(OffsetParameters) { /* code goes here */ });

Description

(Added at v2.0)
Sets the offset distance, type and other parameters for the GeometryService.offset operation.

Samples

Search for samples that use this class.

Constructors

NameSummary
new OffsetParameters()Creates a new OffsetParameters object.

Properties

NameTypeSummary
bevelRatioNumberThe bevelRatio is multiplied by the offset distance and the result determines how far a mitered offset intersection can be located before it is beveled.
geometriesGeometry[]The array of geometries to be offset.
offsetDistanceNumberSpecifies the planar distance for constructing an offset based on the input geometries.
offsetHowStringOptions that determine how the ends intersect.
offsetUnitStringThe offset distance unit.
Constructor Details

new OffsetParameters()

Creates a new OffsetParameters object. The constructor takes no parameters
Sample:
require([
  "esri/tasks/OffsetParameters", ... 
], function(OffsetParameters, ... ) {
  var offsetParams = new OffsetParameters();
  ...
});
Property Details

<Number> bevelRatio

The bevelRatio is multiplied by the offset distance and the result determines how far a mitered offset intersection can be located before it is beveled. When mitered is specified, the value set for bevelRatio is ignored and 10 is used internally. If beveled is specified 1.1 will be used if no value is set for bevelRatio. The bevelRatio is ignored when rounded is specified.
Sample:
 

offsetParams.offsetHow = "esriGeometryOffsetBevelled"; 

offsetParams.bevelRatio = 2;

<Geometry[]> geometries

The array of geometries to be offset.

<Number> offsetDistance

Specifies the planar distance for constructing an offset based on the input geometries. If the offsetDistance parameter is positive the constructed offset will be on the right side of the curve. Left side offsets are constructed with negative values.

<String> offsetHow

Options that determine how the ends intersect. Set to one of the following options.

  • esriGeometryOffsetBevelled: Squares off the corner after a given ratio distance.
  • esriGeometryOffsetMitered: Attempts to allow extended offsets to naturally intersect. If the intersection occurs too far from a corner, the corner will be beveled off at a fixed distance.
  • esriGeometryOffsetRounded: Rounds the corner between extended offsets.

<String> offsetUnit

The offset distance unit. For a list of valid units see esriSRUnitType constants or esriSRUnit2Type constants.
Show Modal