Class Index | File Index

Classes


Class madrona.measureTool


Defined in: measure_tool.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Creates a new measurement tool.
Method Summary
Method Attributes Method Name and Description
 
 
convertMetricValue(measure_type_str, value)
Start accepting user input for shape-draw.
 
measureArea(gex, areaSpanId)
Start accepting user input for shape-draw.
 
measureDistance(gex, distSpanId)
Start accepting user input for line-draw.
 
setUnits(units)
Set the measure tool's system of measurement for reporting (still uses metric internally)
 
Calculate the current measurement(s) based on the state of the measureTool's placemark object.
Class Detail
madrona.measureTool()
Creates a new measurement tool.
Method Detail
clear()

convertMetricValue(measure_type_str, value)
Start accepting user input for shape-draw. Sets callbacks to keep measures updated and to switch to edit mode on completion.
Parameters:
{String} measure_type_str
'distance' or 'area' (assumes 'distance' if not 'area')
{Number} value
The metric value to convert to the measureTool's currently set units.
Returns:
[{Number}, {String}] The converted value and its units.

measureArea(gex, areaSpanId)
Start accepting user input for shape-draw. Sets callbacks to keep measures updated and to switch to edit mode on completion.
Parameters:
{GEarthExtensions} gex
The handle to the GEarthExtensions object
{String} areaSpanId
The id of an HTML tag whose innerHTML will be overwritten with measure results.

measureDistance(gex, distSpanId)
Start accepting user input for line-draw. Sets callbacks to keep measures updated and to switch to edit mode on completion.
Parameters:
{GEarthExtensions} gex
The handle to the GEarthExtensions object
{String} distSpanId
The id of an HTML tag whose innerHTML will be overwritten with measure results.

setUnits(units)
Set the measure tool's system of measurement for reporting (still uses metric internally)
Parameters:
{String} units
The name of the system of measure, i.e. 'english', 'metric', 'nautical'

updateDistance()
Calculate the current measurement(s) based on the state of the measureTool's placemark object. Writes values to target HTML object and stores internally.

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Oct 30 2012 11:34:32 GMT-0700 (PDT)