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

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

Description

(Added at v1.0)
A data object containing a linear distance.

Samples

Search for samples that use this class.

Constructors

NameSummary
new LinearUnit()Creates a new LinearUnit object.

Properties

NameTypeSummary
distanceNumberSpecifies the value of the linear distance.
unitsStringSpecifies the unit type of the linear distance, such as "esriMeters", "esriMiles", "esriKilometers" etc.
Constructor Details

new LinearUnit()

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

<Number> distance

Specifies the value of the linear distance.
Sample:

distUnit.distance = 5;

<String> units

Specifies the unit type of the linear distance, such as "esriMeters", "esriMiles", "esriKilometers" etc.
Sample:

distUnit.units = "esriMiles";

Show Modal