require(["esri/toolbars/ImageServiceMeasureTool"], function(ImageServiceMeasureTool) { /* code goes here */ });
Description
(Added at v3.14)
A toolbar that provides support for measuring image services.
The image services must support mensuration. Mensuration is a method of applying geometric rules to find the lengths of lines, areas of surfaces, or volumes using information obtained from lines and angles. It can also include measuring the height and absolute location of a feature.
Any Image service with georeferenced raster dataset can provide distance, area, point and centroid locations. Height measurements can be obtained when a sensor model exists. Sun angle information is required to make measurements using the shadows.
An instance of this toolbar is provided to an instance of the ImageServiceMeasure widget in the measureToolbar property. The widget provides a simple user interface to the application while leveraging all the properties, methods and events of the ImageServiceMeasureToolbar.
Samples
Search for
samples that use this class.
Constructors
Properties
Methods
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.
Constructor Details
Creates a new instance of ImageServiceMeasureTool.
Parameters:
<Object > params |
Required |
Constructor options. See Object Specification table below for more details on the properties of this object. |
params
properties:
<String > angularUnit |
Optional |
The angular unit in which directions of line segments will be calculated. Possible Values: esriDURadians | esriDUDecimalDegrees (default) |
<String > areaUnit |
Optional |
The area unit in which areas of polygons will be calculated.
Possible Values: esriSquareInches | esriSquareFeet | esriSquareYards | esriAcres | esriSquareMiles | esriSquareMillimeters | esriSquareCentimeters | esriSquareDecimeters | esriSquareMeters (default) | esriAres | esriHectares | esriSquareKilometers |
<SimpleFillSymbol > fillSymbol |
Optional |
Symbol to be used when drawing a polygon or extent. |
<ArcGISImageServiceLayer > layer |
Required |
Image service layer the toolbar is associated with. |
<SimpleLineSymbol > lineSymbol |
Optional |
Symbol to be used when drawing a line. |
<String > linearUnit |
Optional |
The linear unit in which height, length, or perimeters will be calculated.
Possible Values: esriInches | esriFeet | esriYards | esriMiles | esriNauticalMiles | esriMillimeters | esriCentimeters | esriDecimeters | esriMeters (default) | esriKilometers |
<Map > map |
Required |
Map instance the toolbar is associated with. |
<SimpleMarkerSymbol > markerSymbol |
Optional |
Symbol to be used when drawing a point. |
Sample:
require([
"esri/toolbars/ImageServiceMeasureTool", ...
], function(ImageServiceMeasureTool, ... ) {
var imageMeasureTool = new ImageServiceMeasureTool({
map: map,
layer: new ArcGISImageServiceLayer()
});
...
});
Property Details
The angular unit in which directions of line segments will be calculated.
Known values: esriDURadians | esriDUDecimalDegrees
Default value: esriDUDecimalDegrees
The area unit in which areas of polygons will be calculated.
Known values: esriSquareInches | esriSquareFeet | esriSquareYards | esriAcres | esriSquareMiles | esriSquareMillimeters | esriSquareCentimeters | esriSquareDecimeters | esriSquareMeters | esriAcres | esriHectares | esriSquareKilometers
Default value: esriSquareMeters
Symbol to be used when drawing a polygon or extent.
Symbol to be used when drawing a line.
The linear unit in which height, length, or perimeters will be calculated.
Known values: esriMeters | esriKilometers | esriInches | esriFeet | esriYards | esriMiles | esriNauticalMiles | esriMillimeters | esriCentimeters | esriDecimeters
Default value: esriMeters
Symbol to be used when drawing a point.
Method Details
Activates the toolbar for performing the measure operation.
Returns a list of measure operations supported by the image service.
Returns a list of supported linear, angular and area units.
Disables the tooltip message for performing a draw.
Parameters:
<String > unit |
Required |
The angular unit to set.
Possible Values: esriDURadians | esriDUDecimalDegrees |
Parameters:
<String > unit |
Required |
Possible Values: esriSquareInches | esriSqudareFeet | esriSquareYards | esriAcres | esriSquareMiles | esriSquareMillimeters | esriSquareCentimeters | esriSquareDecimeters | esriSquareMeters | esriAres | esriHectares | esriSquareKilometers |
Parameters:
<String > unit |
Required |
The linear unit to set.
Possible Values: esriMeters | esriKilometers | esriInches | esriFeet | esriYards | esriMiles | esriNauticalMiles | esriMillimeters | esriCentimeters | esriDecimeters |
Enables the tooltip message for performing a draw.
Event Details
[ On Style Events | Connect Style Event ]
Fires when the drawing is complete.
Event Object Properties:
<Geometry > geometry |
The geometry of the graphic created while performing the draw. |
Fires when the user starts drawing.
Fires when the measure operation has been performed.
Event Object Properties:
<Object > measureResult |
An object that contains the following properties:
{
error: , //An error object if the measurement operation fails
geometry: //A geometry of the graphic that was measured
}
|
Fires when the unit has been changed.
Event Object Properties:
<Object > measureResult |
An object that contains the following properties:
{
error: , //An error object if the unit change fails
geometry: //A geometry of the graphic that was measured
}
|
Fires when the drawing is complete.
Event Object Properties:
<Geometry > geometry |
The geometry of the graphic created while performing the draw. |
Fires when the user starts drawing.
Fires when the measure operation has been performed.
Event Object Properties:
<Object > measureResult |
An object that contains the following properties:
{
error: , //An error object if the measurement operation fails
geometry: //A geometry of the graphic that was measured
}
|
Fires when the unit has been changed.
Event Object Properties:
<Object > measureResult |
An object that contains the following properties:
{
error: , //An error object if the unit change fails
geometry: //A geometry of the graphic that was measured
}
|