/*
 COPYRIGHT 2009 ESRI

 TRADE SECRETS: ESRI PROPRIETARY AND CONFIDENTIAL
 Unpublished material - all rights reserved under the
 Copyright Laws of the United States and applicable international
 laws, treaties, and conventions.

 For additional information, contact:
 Environmental Systems Research Institute, Inc.
 Attn: Contracts and Legal Services Department
 380 New York Street
 Redlands, California, 92373
 USA

 email: contracts@esri.com
 */

window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","esri.dijit.Measurement"],["require","dijit._Widget"],["require","dijit._Templated"],["require","esri.map"],["require","esri.geometry"],["require","esri.symbol"],["require","dojo.parser"],["require","dijit.layout.ContentPane"],["require","dijit.Menu"],["require","dijit.form.Button"],["require","esri.tasks.geometry"],["require","esri.WKIDUnitConversion"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["esri.dijit.Measurement"]){_4._hasResource["esri.dijit.Measurement"]=true;_4.provide("esri.dijit.Measurement");_4.require("dijit._Widget");_4.require("dijit._Templated");_4.require("esri.map");_4.require("esri.geometry");_4.require("esri.symbol");_4.require("dojo.parser");_4.require("dijit.layout.ContentPane");_4.require("dijit.Menu");_4.require("dijit.form.Button");_4.require("esri.tasks.geometry");_4.require("esri.WKIDUnitConversion");(function(){var _7=[_4.moduleUrl("esri.dijit","css/Measurement.css")];var _8=document.getElementsByTagName("head").item(0),_9;for(var i=0,il=_7.length;i<il;i++){_9=document.createElement("link");_9.type="text/css";_9.rel="stylesheet";_9.href=_7[i].toString();_8.appendChild(_9);}}());_4.declare("esri.dijit.Measurement",[_5._Widget,_5._Templated],{widgetsInTemplate:true,templateString:"<div class=\"esriMeasurement\">\r\n  <div dojoType='dijit.form.ToggleButton' baseClass='esriButton' dojoAttachPoint='area' checked='false' iconClass='areaIcon' showLabel='false' dojoAttachEvent='onClick:areaToggleButton'></div>\r\n  <div dojoType='dijit.form.ToggleButton' baseClass='esriButton' dojoAttachPoint='distance' iconClass='distanceIcon' showLabel='false' dojoAttachEvent='onClick:distanceToggleButton'></div>\r\n  <div dojoType='dijit.form.ToggleButton' baseClass='esriButton' dojoAttachPoint='location' iconClass='locationIcon' showLabel='false' dojoAttachEvent='onClick:locationToggleButton'></div>\r\n  <div style=\"display:inline;margin-left:2px;margin-right:2px;padding-top:2px;\">|</div>\r\n  <button dojoType='dijit.form.DropDownButton' baseClass='esriToggleButton' dojoAttachPoint='unit' label='unit' value='unit' style='visibility:hidden;'></button>\r\n  <div dojoType='dijit.layout.ContentPane' dojoAttachPoint='resultLabel' class='resultLabel'></div>\r\n  <div dojoType='dijit.layout.ContentPane' dojoAttachPoint='resultValue' align='left' class='result'></div>\r\n</div>\r\n",unitDictionary:[],result:null,inputPoints:[],measureGraphics:[],numberPattern:"#,###,###,##0.0",constructor:function(_a,_b){_a=_a||{};if(!_a.map){console.log("dijit.MeasureTool: unable to find the 'map' property in parameters");return;}this._map=_a.map;this._map.cs=this._checkCS(this._map.spatialReference);this._geometryService=esri.config.defaults.geometryService;if(_a.pointSymbol){this._pointSymbol=_a.pointSymbol;}else{var _c=_4.moduleUrl("esri.dijit","./images/flag.png");this._pointSymbol=new esri.symbol.PictureMarkerSymbol(_c.uri,24,24);this._pointSymbol.setOffset(9,11);}if(_a.lineSymbol){this._lineSymbol=_a.lineSymbol;}else{this._lineSymbol=new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new _4.Color([0,128,255]),3);}if(_a.defaultLengthUnit){this._defaultLengthUnit=_a.defaultLengthUnit;}else{this._defaultLengthUnit=esri.Units.MILES;}if(_a.defaultAreaUnit){this._defaultAreaUnit=_a.defaultAreaUnit;}else{this._defaultAreaUnit=esri.Units.ACRES;}if(_a.defaultLocationUnit){this._defaultLocationUnit=_a.defaultLocationUnit;}else{this._defaultLocationUnit=esri.Units.DECIMAL_DEGREES;}this._snappingCallback=_4.hitch(this,this._snappingCallback);},startup:function(){var _d=esri.bundle.widgets.measurement;this.unitDictionary[_d.NLS_length_miles]=1;this.unitDictionary[_d.NLS_length_kilometers]=1.609344;this.unitDictionary[_d.NLS_length_feet]=5280;this.unitDictionary[_d.NLS_length_meters]=1609.34;this.unitDictionary[_d.NLS_length_yards]=1760;this.unitDictionary["Nautical Miles"]=0.869;this.unitDictionary[_d.NLS_area_acres]=1;this.unitDictionary[_d.NLS_area_sq_kilometers]=0.004047;this.unitDictionary[_d.NLS_area_sq_miles]=0.0015625;this.unitDictionary[_d.NLS_area_sq_feet]=43560;this.unitDictionary[_d.NLS_area_sq_meters]=4046.87;this.unitDictionary[_d.NLS_area_hectares]=0.4047;this.unitDictionary[_d.NLS_area_sq_yards]=4840;this.units={"esriMiles":_d.NLS_length_miles,"esriKilometers":_d.NLS_length_kilometers,"esriFeet":_d.NLS_length_feet,"esriMeters":_d.NLS_length_meters,"esriYards":_d.NLS_length_yards,"esriAcres":_d.NLS_area_acres,"esriSquareKilometers":_d.NLS_area_sq_kilometers,"esriSquareMiles":_d.NLS_area_sq_miles,"esriSquareFeet":_d.NLS_area_sq_feet,"esriSquareMeters":_d.NLS_area_sq_meters,"esriHectares":_d.NLS_area_hectares,"esriSquareYards":_d.NLS_area_sq_yards,"esriDecimalDegrees":_d.NLS_decimal_degrees,"esriDegreeMinuteSeconds":_d.NLS_deg_min_sec};_5.byNode(this.distance.domNode).setLabel(esri.bundle.widgets.measurement.NLS_distance);_5.byNode(this.area.domNode).setLabel(esri.bundle.widgets.measurement.NLS_area);_5.byNode(this.location.domNode).setLabel(esri.bundle.widgets.measurement.NLS_location);_5.byNode(this.resultLabel.domNode).setContent(esri.bundle.widgets.measurement.NLS_resultLabel);},measureArea:function(){this._map.__setClickDuration(0);this._createAreaUnitList();this.inputPoints=[];this.tempGraphic=new esri.Graphic();this.tempGraphic.setSymbol(this._lineSymbol);this.tempGraphic.setGeometry(new esri.geometry.Polyline());this._map.graphics.add(this.tempGraphic);if(this._map.cs==="PCS"){this._geometryAreaHandler=_4.connect(this._geometryService,"onAreasAndLengthsComplete",this,"_outputArea");}this.mouseClickMapHandler=_4.connect(this._map,"onClick",this,"_measureAreaMouseClickHandler");this.doubleClickMapHandler=_4.connect(this._map,"onDblClick",this,"_measureAreaDblClickHandler");},measureDistance:function(){this._map.__setClickDuration(0);if(this._map.cs==="PCS"){this._projectMapExtent(this._map.extent);this._mapExtentChangeHandler=_4.connect(this._map,"onExtentChange",this,"_projectMapExtent");}this.inputPoints=[];this._createLengthUnitList();this.mouseClickMapHandler=_4.connect(this._map,"onClick",this,"_measureDistanceMouseClickHandler");this.doubleClickMapHandler=_4.connect(this._map,"onDblClick",this,"_measureDistanceDblClickHandler");},measureLocation:function(){this._map.__setClickDuration(0);this.measureGraphics=[];this._createLocationUnitList();this._map.graphics.remove(this.locationGraphic);if(this._map.cs==="PCS"){this._projectMapExtent(this._map.extent);this._mapExtentChangeHandler=_4.connect(this._map,"onExtentChange",_4.hitch(this,this._projectMapExtent));}this._clickMapHandler=_4.connect(this._map,"onClick",this,"_measureLocationClickHandler");this.mouseMoveMapHandler=_4.connect(this._map,"onMouseMove",this,"_showCoordinates");this.mouseDragMapHandler=_4.connect(this._map,"onMouseDrag",_4.hitch(this,function(){_5.byNode(this.resultValue.domNode).setAttribute("disabled",true);}));},setTool:function(_e,_f){this.closeTool();var _10=_5.byNode(this[_e].domNode).checked;_4.style(this.unit.domNode,"visibility","visible");_5.byNode(this.area.domNode).setAttribute("checked",false);_5.byNode(this.distance.domNode).setAttribute("checked",false);_5.byNode(this.location.domNode).setAttribute("checked",false);if(_f===true||_f===false){_10=_f;}_5.byNode(this[_e].domNode).setAttribute("checked",_10);if(_10){this.activeTool=_e;if(this.map.isDoubleClickZoom){this._map.disableDoubleClickZoom();}if(_e==="area"){this.measureArea();}else{if(_e==="distance"){this.measureDistance();}else{if(_e==="location"){this.measureLocation();}}}if(this._map.snappingManager){this._map.snappingManager._startSelectionLayerQuery();this._map.snappingManager._setUpSnapping();}}},areaToggleButton:function(){this.clearResult();this.setTool("area");},distanceToggleButton:function(){this.clearResult();this.setTool("distance");},locationToggleButton:function(){this.clearResult();this.setTool("location");},closeTool:function(){var map=this._map;map.__resetClickDuration();if(!map.isDoubleClickZoom){map.enableDoubleClickZoom();}this.inputPoints=[];if(map.snappingManager&&map.snappingManager._snappingGraphic){map.graphics.remove(map.snappingManager._snappingGraphic);}_4.disconnect(this.mouseClickMapHandler);_4.disconnect(this.mouseMoveMapHandler);_4.disconnect(this.doubleClickMapHandler);_4.disconnect(this.mouseDragMapHandler);_4.disconnect(this._clickMapHandler);_4.disconnect(this._mapExtentChangeHandler);_4.disconnect(this._geometryAreaHandler);if(this._map.snappingManager){this._map.snappingManager._stopSelectionLayerQuery();this._map.snappingManager._killOffSnapping();}},clearResult:function(){var map=this._map;this.result=0;_5.byNode(this.resultValue.domNode).setAttribute("content","");for(var i=0;i<this.measureGraphics.length;i++){map.graphics.remove(this.measureGraphics[i]);}this.measureGraphics=[];map.graphics.remove(this.tempGraphic);},show:function(){esri.show(this.domNode);},hide:function(){esri.hide(this.domNode);},showTool:function(_11){var _12=this[_11].domNode;_12.style.display="inline";},hideTool:function(_13){var _14=this[_13].domNode;_14.style.display="none";},destroy:function(){this.closeTool();this.clearResult();this.inherited(arguments);this._map=this._geometryService=this.measureGraphic=this.measureGraphic=this.tempGraphic=null;},onMeasureEnd:function(){},_densifyGeometry:function(_15){if(this._map.cs==="Web Mercator"){_15=esri.geometry.webMercatorToGeographic(_15);}var _16;if(this._map.cs==="PCS"){_16=_15;}else{_16=esri.geometry.geodesicDensify(_15,500000);}if(this._map.cs==="Web Mercator"){_16=esri.geometry.geographicToWebMercator(_16);}return _16;},_measureAreaMouseClickHandler:function(evt){var _17;if(this._map.snappingManager){_17=this._map.snappingManager._snappingPoint;}var _18=_17||evt.mapPoint;this.inputPoints.push(_18);this._currentStartPt=_18;if(this.inputPoints.length===1){this.tempGraphic.setGeometry(new esri.geometry.Polyline());for(var i=0;i<this.measureGraphics.length;i++){this._map.graphics.remove(this.measureGraphics[i]);}this.measureGraphics=[];this.result=0;this._outputResult(this.result,esri.bundle.widgets.measurement.NLS_area_acres);this.mouseMoveMapHandler=_4.connect(this._map,"onMouseMove",this,"_measureAreaMouseMoveHandler");}this.measureGraphic=new esri.Graphic();this.measureGraphic.setSymbol(this._lineSymbol);this.measureGraphics.push(this.measureGraphic);if(this.inputPoints.length>1){var _19=new esri.geometry.Polyline(this._map.spatialReference);_19.addPath([this.inputPoints[this.inputPoints.length-2],_18]);var _1a=new esri.geometry.Polyline(this._map.spatialReference);_1a.addPath([this.inputPoints[0],_18]);var _1b=this._densifyGeometry(_19);var _1c=this._densifyGeometry(_1a);this.tempGraphic.setGeometry(_1c);this.measureGraphic.setGeometry(_1b);this._map.graphics.add(this.measureGraphic);}},_measureAreaMouseMoveHandler:function(evt){var _1d;if(this.inputPoints.length>0){var _1e=new esri.geometry.Polyline(this._map.spatialReference);var _1f;if(this._map.snappingManager){_1f=this._map.snappingManager._snappingPoint;}_1d=_1f||evt.mapPoint;_1e.addPath([this._currentStartPt,_1d]);var _20=this._densifyGeometry(_1e);this.tempGraphic.setGeometry(_20);}if(this.inputPoints.length>1){var _21=new esri.geometry.Polyline(this._map.spatialReference);_21.addPath([_1d,this.inputPoints[0]]);var _22=this._densifyGeometry(_21);this.tempGraphic.setGeometry(this.tempGraphic.geometry.addPath(_22.paths[0]));}},_measureAreaDblClickHandler:function(evt){_4.disconnect(this.mouseMoveMapHandler);var _23=new esri.geometry.Polygon(this._map.spatialReference);var _24=[];for(var i=0;i<this.inputPoints.length;i++){_24.push([this.inputPoints[i].x,this.inputPoints[i].y]);}_24.push([this.inputPoints[0].x,this.inputPoints[0].y]);_23.addRing(_24);this.inputPoints=[];this.measurementGeometry=this._densifyGeometry(_23);this._getArea(_23);},_getArea:function(_25){var _26=[];var _27=new esri.tasks.AreasAndLengthsParameters();_27.areaUnit=esri.tasks.GeometryService.UNIT_ACRES;if(esri.geometry.polygonSelfIntersecting(_25)){this._geometryService.simplify([_25],_4.hitch(this,function(_28){_4.forEach(_28,_4.hitch(this,function(_29,idx){if(this._map.cs==="PCS"){_27.polygons=_28;this._geometryService.areasAndLengths(_27);return;}else{if(this._map.cs==="Web Mercator"){_29=esri.geometry.webMercatorToGeographic(_29);}}_26.push(_29);}));var _2a=esri.geometry.geodesicAreas(_26,esri.Units.ACRES);this._showArea(_2a[0]);}));}else{if(this._map.cs==="Web Mercator"){_25=esri.geometry.webMercatorToGeographic(_25);}_26.push(_25);if(this._map.cs==="PCS"){_27.polygons=_26;this._geometryService.areasAndLengths(_27);return;}var _2b=esri.geometry.geodesicAreas(_26,esri.Units.ACRES);this._showArea(Math.abs(_2b[0]));}},_outputArea:function(_2c){this._showArea(Math.abs(_2c.areas[0]));},_showArea:function(_2d){if(_2d){this.result=_2d;var _2e=_5.byNode(this.unit.domNode).label;this._outputResult(this.result,_2e);}this.onMeasureEnd(this.activeTool,this.measurementGeometry);},_measureDistanceDblClickHandler:function(evt){_4.disconnect(this.mouseMoveMapHandler);var _2f=new esri.geometry.Polyline(this._map.spatialReference);_2f.addPath(this.inputPoints);_2f=this._densifyGeometry(_2f);this.inputPoints=[];this.onMeasureEnd(this.activeTool,_2f);},_measureDistanceMouseClickHandler:function(evt){var _30;if(this._map.snappingManager){_30=this._map.snappingManager._snappingPoint;}var _31=_30||evt.mapPoint;this.inputPoints.push(_31);this._currentStartPt=_31;if(this.inputPoints.length===1){for(var i=0;i<this.measureGraphics.length;i++){this._map.graphics.remove(this.measureGraphics[i]);}this._map.graphics.remove(this.tempGraphic);this.measureGraphics=[];this.result=0;this._outputResult(this.result,esri.bundle.widgets.measurement.NLS_length_miles);this.tempGraphic=new esri.Graphic();this.tempGraphic.setSymbol(this._lineSymbol);this._map.graphics.add(this.tempGraphic);this.mouseMoveMapHandler=_4.connect(this._map,"onMouseMove",this,"_measureDistanceMouseMoveHandler");}this.tempGraphic.setGeometry(new esri.geometry.Polyline());this.flagGraphic=new esri.Graphic();this.flagGraphic.setSymbol(this._pointSymbol);this.flagGraphic.setGeometry(_31);this.measureGraphics.push(this.flagGraphic);this._map.graphics.add(this.flagGraphic);if(this.inputPoints.length>1){this.measureGraphic=new esri.Graphic();this.measureGraphic.setSymbol(this._lineSymbol);this.measureGraphics.push(this.measureGraphic);var _32=new esri.geometry.Polyline(this._map.spatialReference);_32.addPath([this.inputPoints[this.inputPoints.length-2],_31]);var _33=this._densifyGeometry(_32);this.measureGraphic.setGeometry(_33);this._map.graphics.add(this.measureGraphic);this.result+=this._geodesicDistance(this.inputPoints[this.inputPoints.length-2],_31);this._showDistance(this.result);}},_measureDistanceMouseMoveHandler:function(evt){if(this.inputPoints.length>0){var _34=new esri.geometry.Polyline(this._map.spatialReference);var _35;if(this._map.snappingManager){_35=this._map.snappingManager._snappingPoint;}var _36=_35||evt.mapPoint;_34.addPath([this._currentStartPt,_36]);var _37=this._densifyGeometry(_34);this.tempGraphic.setGeometry(_37);var _38=this._geodesicDistance(this._currentStartPt,_36);this._showDistance(_38+this.result);}},_geodesicDistance:function(pt1,pt2){var _39=new esri.geometry.Polyline(this._map.spatialReference);if(this._map.cs==="PCS"){pt1=this._getGCSLocation(pt1);pt2=this._getGCSLocation(pt2);}_39.addPath([pt1,pt2]);if(this._map.cs==="Web Mercator"){_39=esri.geometry.webMercatorToGeographic(_39);}return esri.geometry.geodesicLengths([_39],esri.Units.MILES)[0];},_showDistance:function(_3a){if(_3a){this._outputResult(_3a,_5.byNode(this.unit.domNode).label);}},_measureLocationClickHandler:function(evt){_5.byNode(this.location.domNode).setAttribute("checked",false);var _3b;if(this._map.snappingManager){_3b=this._map.snappingManager._snappingPoint;}var _3c=_3b||evt.mapPoint;this.locationToggleButton();this.locationGraphic=new esri.Graphic();this.locationGraphic.setGeometry(_3c);this.locationGraphic.setSymbol(this._pointSymbol);this._map.graphics.add(this.locationGraphic);this.measureGraphics.push(this.locationGraphic);var _3d={mapPoint:_3c};this._showCoordinates(_3d);this.onMeasureEnd(this.activeTool,_3c);},_getGCSLocation:function(pt){var _3e=pt;if(this._map.cs==="Web Mercator"){_3e=esri.geometry.webMercatorToGeographic(_3e);}else{if(this._map.cs==="PCS"){if(this._map._newExtent){var _3f=Math.abs((this._map._newExtent.xmax-this._map._newExtent.xmin)/(this._map.extent.xmax-this._map.extent.xmin));var _40=Math.abs((this._map._newExtent.ymax-this._map._newExtent.ymin)/(this._map.extent.ymax-this._map.extent.ymin));var _41=(_3e.x-this._map.extent.xmin)*_3f+this._map._newExtent.xmin;var _42=(_3e.y-this._map.extent.ymin)*_40+this._map._newExtent.ymin;_3e=new esri.geometry.Point(_41,_42);}}}return _3e;},_projectMapExtent:function(_43){var _44=new esri.Graphic(_43);var _45=new esri.SpatialReference({wkid:4326});this._geometryService.project([_44.geometry],_45,_4.hitch(this,function(_46){if(!this.mouseMoveMapHandler&&this.activeTool==="location"){this.mouseMoveMapHandler=_4.connect(this._map,"onMouseMove",_4.hitch(this,this._showCoordinates));this.mouseDragMapHandler=_4.connect(this._map,"onMouseDrag",_4.hitch(this,function(){_5.byNode(this.resultValue.domNode).setAttribute("disabled",true);}));}this._map._newExtent=_46[0];}));},_showCoordinates:function(evt){var _47;if(this._map.snappingManager){_47=this._map.snappingManager._snappingPoint;}var _48=_47||evt.mapPoint;var _49=this._getGCSLocation(_48);this.locationX=_49.x;this.locationY=_49.y;this._outputLocationResult(_49.x,_49.y,_5.byNode(this.unit.domNode).label);},_checkCS:function(_4a){if(_4a.wkid){if(_4a.wkid===3857||_4a.wkid===102100||_4a.wkid===102113){return "Web Mercator";}if(esri._isDefined(esri.WKIDUnitConversion[_4a.wkid])){return "PCS";}return "GCS";}if(_4a.wkt){if(_4a.wkt.indexOf("WGS_1984_Web_Mercator")!==-1){return "Web Mercator";}if(_4a.wkt.indexOf("PROJCS")===0){return "PCS";}return "GCS";}},_switchUnit:function(_4b){_5.byNode(this.unit.domNode).setAttribute("label",_4b);if(this.result===null){return;}this._outputResult(this.result,_4b);},_outputResult:function(_4c,_4d){var _4e=_4c*this.unitDictionary[_4d];if(_4e===0){_5.byNode(this.resultValue.domNode).setAttribute("content","");}else{if(_4e>1000000){_5.byNode(this.resultValue.domNode).setAttribute("content",_4.number.format(_4e.toPrecision(9),{pattern:this.numberPattern})+" "+_4d);}else{_5.byNode(this.resultValue.domNode).setAttribute("content",_4.number.format(_4e.toFixed(2),{pattern:this.numberPattern})+" "+_4d);}}},_switchLocationUnit:function(_4f){_5.byNode(this.unit.domNode).setAttribute("label",_4f);if(this.result===null){return;}this._outputLocationResult(this.locationX,this.locationY,_4f);},_outputLocationResult:function(x,y,_50){var lon,lat;var _51=esri.bundle.widgets.measurement;if(_50===_51.NLS_decimal_degrees){lon=x.toFixed(6);lat=y.toFixed(6);}else{if(_50===_51.NLS_deg_min_sec){var _52=false;var _53=false;if(x<0){_52=true;x=Math.abs(x);}if(y<0){_53=true;y=Math.abs(y);}lon=Math.floor(x)+"°"+Math.floor((x-Math.floor(x))*60)+"'"+Math.floor(((x-Math.floor(x))*60-Math.floor((x-Math.floor(x))*60))*60)+"\"";lat=Math.floor(y)+"°"+Math.floor((y-Math.floor(y))*60)+"'"+Math.floor(((y-Math.floor(y))*60-Math.floor((y-Math.floor(y))*60))*60)+"\"";if(_52){lon="-"+lon;}if(_53){lat="-"+lat;}}}_5.byNode(this.resultValue.domNode).setAttribute("content",esri.bundle.widgets.measurement.NLS_longitude+": "+lon+"<br/>"+esri.bundle.widgets.measurement.NLS_latitude+": "+lat);},_createLengthUnitList:function(){var _54=new _5.Menu({style:"display: none;"});var _55=esri.bundle.widgets.measurement;var _56=[_55.NLS_length_miles,_55.NLS_length_kilometers,_55.NLS_length_feet,_55.NLS_length_meters,_55.NLS_length_yards];_4.forEach(_56,_4.hitch(this,function(_57,idx){var _58=new _5.MenuItem({label:_57,onClick:_4.hitch(this,function(){this._switchUnit(_57);})});_58.setAttribute("class","unitDropDown");_54.addChild(_58);}));_5.byNode(this.unit.domNode).setAttribute("dropDown",_54);var _59=this.units[this._defaultLengthUnit];_5.byNode(this.unit.domNode).setAttribute("label",_59);},_createAreaUnitList:function(){var _5a=new _5.Menu({style:"display: none;"});var _5b=esri.bundle.widgets.measurement;var _5c=[_5b.NLS_area_acres,_5b.NLS_area_sq_miles,_5b.NLS_area_sq_kilometers,_5b.NLS_area_hectares,_5b.NLS_area_sq_yards,_5b.NLS_area_sq_feet,_5b.NLS_area_sq_meters];_4.forEach(_5c,_4.hitch(this,function(_5d,idx){var _5e=new _5.MenuItem({label:_5d,onClick:_4.hitch(this,function(){this._switchUnit(_5d);})});_5e.setAttribute("class","unitDropDown");_5a.addChild(_5e);}));_5.byNode(this.unit.domNode).setAttribute("dropDown",_5a);var _5f=this.units[this._defaultAreaUnit];_5.byNode(this.unit.domNode).setAttribute("label",_5f);},_createLocationUnitList:function(){var _60=new _5.Menu({style:"display: none;"});var _61=esri.bundle.widgets.measurement;var _62=[_61.NLS_decimal_degrees,_61.NLS_deg_min_sec];_4.forEach(_62,_4.hitch(this,function(_63,idx){var _64=new _5.MenuItem({label:_63,onClick:_4.hitch(this,function(){this._switchLocationUnit(_63);})});_64.setAttribute("class","unitDropDown");_60.addChild(_64);}));_5.byNode(this.unit.domNode).setAttribute("dropDown",_60);var _65=this.units[this._defaultLocationUnit];_5.byNode(this.unit.domNode).setAttribute("label",_65);}});}}};});