From 0a4fc020d4af8b58d14a01fcad2cd6e55a41affb Mon Sep 17 00:00:00 2001 From: Estes Date: Thu, 18 Jun 2020 11:48:03 -0700 Subject: [PATCH 1/4] branch for testing and viewing new fws managed lands services --- build/scripts/combined.js | 4 ++-- src/scripts/layers.js | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/build/scripts/combined.js b/build/scripts/combined.js index 3502d31..1688ea8 100644 --- a/build/scripts/combined.js +++ b/build/scripts/combined.js @@ -1,2 +1,2 @@ -function addCommas(e){e+="";for(var a=e.split("."),t=a[0],i=a.length>1?"."+a[1]:"",n=/(\d+)(\d{3})/;n.test(t);)t=t.replace(n,"$1,$2");return t+i}function camelize(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,a){return 0===a?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")}function stateSelected(){var e=$("#stateSelect")[0];if(e.selectedIndex>0){var a=e.options[e.selectedIndex].value,t=e.options[e.selectedIndex].label;$("#downloadState").html("Download Geodatabase and Shapefile data for "+t+"")}else $("#downloadState").html("")}function hucLinkListener(e){console.log(e),$.get("https://fwsprimary.wim.usgs.gov/downloadLoggingService/downloadLog.asmx/Log?huc="+e+",NWIV2",function(e){})}var allLayers,renderer;require(["esri/InfoTemplate","esri/renderers/UniqueValueRenderer","esri/symbols/PictureMarkerSymbol","dojo/domReady!"],function(e,a,t){var i=new t("./images/grn-pushpin.png",45,45);renderer=new a(i);var n=new e("${NAME}","Type: ${TYPE}
Ramsar: click here
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");allLayers=[{groupHeading:"ESRI dynamic map services",showGroupHeading:!1,includeInLayerList:!0,layers:{Wetlands:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands/MapServer",options:{id:"wetlands",opacity:.75,visible:!0},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,includeLegend:!0,legendLabel:!1,moreinfo:"https://www.fws.gov/wetlands/Data/Wetlands-Product-Summary.html",otherLayersToggled:["wetlandsStatus","wetlandsRaster"]}},"Wetlands Status":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands_Status/MapServer",options:{id:"wetlandsStatus",layers:[0],visible:!0,maxScale:285e3,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!1,includeLegend:!0,esriLegendLabel:!1}},"Wetlands ":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands_Raster/ImageServer",options:{id:"wetlandsRaster",visible:!0,maxScale:285e3,opacity:.6},wimOptions:{type:"layer",layerType:"agisImage",includeInLayerList:!1,includeLegend:!0,otherLayersToggled:["wetlands","wetlandsStatus"]}},Riparian:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Riparian/MapServer",visibleLayers:[0],options:{id:"riparian",opacity:.75,visible:!0},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/wetlands/Other/Riparian-Product-Summary.html",includeLegend:!0,legendLabel:!1}},"Riparian Mapping Areas":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Riparian/MapServer",visibleLayers:[1],options:{id:"riparianStatus",visible:!1,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/wetlands/Other/Riparian-Product-Summary.html",includeLegend:!0,legendLabel:!1}},HUC8:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/HUCs/MapServer",options:{id:"huc8",opacity:1,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!1,includeLegend:!0,esriLegendLabel:!1}}}},{groupHeading:"Data Source Group",showGroupHeading:!1,includeInLayerList:!0,moreinfo:"https://www.fws.gov/wetlands/Documents/Scalable-Wetland-Mapping-Fact-Sheet.pdf",otherLayersToggled:["sourceType","imageScale","imageYear"],layers:{"Source Type":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[1],options:{id:"sourceType",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["imageScale","imageYear"],legendLabel:!1}},"Image Scale":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[2],options:{id:"imageScale",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["sourceType","imageYear"],legendLabel:!1}},"Image Year":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[3],options:{id:"imageYear",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["sourceType","imageScale"],legendLabel:!1}}}},{groupHeading:"refuges and historic",showGroupHeading:!1,includeInLayerList:!0,layers:{"Areas of Interest":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Areas_of_Interest/MapServer/0",options:{id:"aoi",opacity:1,visible:!1,outFields:["*"],infoTemplate:n},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!0,hasOpacitySlider:!1,moreinfo:"https://www.fws.gov/wetlands/Data/metadata/FWS_Wetland_Areas_of_Interest.xml",includeLegend:!0}},"FWS Managed Lands":{url:"https://gis.fws.gov/ArcGIS/rest/services/FWS_Refuge_Boundaries/MapServer",visibleLayers:[0,1,3],options:{id:"fwsRefuges",opacity:.75,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html",includeLegend:!0,esriLegendLabel:!1}},"Historic Wetland Data":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Historic_Wetlands/MapServer",visibleLayers:[0,1],options:{id:"historic",visible:!1,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,hasOpacitySlider:!0,moreinfo:"https://www.fws.gov/wetlands/Data/Historic-Wetlands-Data.html",includeLegend:!0,legendLabel:!1}}}}]});var map,allLayers,maxLegendHeight,maxLegendDivHeight,printCount=0,legendLayers=[],measurement,identifyTask,identifyParams,aoiClicked=!1,initWetlandClicked=!1;require(["esri/map","esri/arcgis/utils","esri/config","esri/dijit/Geocoder","esri/dijit/HomeButton","esri/dijit/Legend","esri/dijit/LocateButton","esri/dijit/Measurement","esri/dijit/PopupTemplate","esri/graphic","esri/geometry/Extent","esri/geometry/Multipoint","esri/geometry/Point","esri/layers/ArcGISTiledMapServiceLayer","esri/renderers/UniqueValueRenderer","esri/SpatialReference","esri/symbols/PictureMarkerSymbol","esri/tasks/GeometryService","esri/tasks/IdentifyParameters","esri/tasks/IdentifyTask","esri/tasks/LegendLayer","esri/tasks/PrintTask","esri/tasks/PrintParameters","esri/tasks/PrintTemplate","esri/geometry/webMercatorUtils","esri/urlUtils","dojo/dom","dojo/dom-class","dojo/dnd/Moveable","dojo/query","dojo/on","dojo/domReady!"],function(e,a,t,i,n,o,r,s,l,p,d,c,m,g,u,y,f,h,b,v,w,L,S,I,T,E,k,_,D,x,O){function P(){$("#printModal").modal("show")}function M(){$("#getDataModal").modal("show")}function C(e){var a="";switch(e){case"CIR":a="color infrared";break;case"TC":a="true color";break;case"BW":a="black and white"}return a}function A(){K.activeGeocoder.searchExtent=null}function R(){A();var e=K.find();e.then(function(e){W(e)})}function N(e){F();var a=e.graphic?e.graphic:e.result.feature;a.setSymbol(X)}function W(e){if(e=e.results,e.length>0){F();for(var a=0;a  '+s+"

");$("#printJobsDiv").find("p.toRemove").remove(),$("#printModalBody").append(a),$("#printTitle").val(""),$("#printExecuteButton").button("reset")}function a(e){alert("Sorry, an unclear print error occurred. Please try refreshing the application to fix the problem")}var t=new S;t.map=map;var i=new I;i.exportOptions={width:500,height:400,dpi:300},i.format="PDF",i.layout="Letter ANSI A Landscape test",i.preserveScale=!1;var n=new w;n.layerId="wetlands";var o=new w;o.layerId="wetlandsRaster";var r=$("#printTitle").val();""==r?i.layoutOptions={titleText:"Wetlands",authorText:"National Wetlands Inventory (NWI)",copyrightText:"This page was produced by the NWI mapper",legendLayers:[n,o]}:i.layoutOptions={titleText:r,authorText:"National Wetlands Inventory (NWI)",copyrightText:"This page was produced by the NWI mapper",legendLayers:[n,o]};var s=i.layoutOptions.titleText;t.template=i;var l=new L("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task");l.execute(t,e,a),$.get("https://fwsprimary.wim.usgs.gov/pdfLoggingService/pdfLog.asmx/Log?printInfo="+map.getScale()+","+map.extent.xmin+","+map.extent.ymax+","+map.extent.xmax+","+map.extent.ymin+",NWIV2",function(e){})}function H(e,a){var t;document.getElementById&&(t=document.getElementById(e))&&t.style&&(t.style.cursor=a)}t.defaults.io.corsEnabledServers.push("fwsprimary.wim.usgs.gov"),esri.config.defaults.io.proxyUrl="https://fwsprimary.wim.usgs.gov/serviceProxy/proxy.ashx",t.defaults.geometryService=new h("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/Geometry/GeometryServer"),map=new e("mapDiv",{basemap:"hybrid",extent:new d(-14638882.654811008,2641706.3772205533,-6821514.898031538,6403631.161302788,new y({wkid:3857})),fitExtent:!0});var j=new n({map:map,extent:new d(-14638882.654811008,2641706.3772205533,-6821514.898031538,6403631.161302788,new y({wkid:3857}))},"homeButton");j.startup();var Y=new r({map:map,scale:4514},"locateButton");Y.startup(),measurement=new s({map:map,advancedLocationUnits:!0},k.byId("measurementDiv")),measurement.startup(),$(window).resize(function(){$("#legendCollapse").hasClass("in")?(maxLegendHeight=.9*$("#mapDiv").height(),$("#legendElement").css("height",maxLegendHeight),$("#legendElement").css("max-height",maxLegendHeight),maxLegendDivHeight=$("#legendElement").height()-parseInt($("#legendHeading").css("height").replace("px","")),$("#legendDiv").css("max-height",maxLegendDivHeight)):$("#legendElement").css("height","initial")}),$("#printNavButton").click(function(){P()}),$("#printExecuteButton").click(function(e){e.preventDefault(),$(this).button("loading"),U()}),$("#getDataButton").click(function(){M()}),$("#aboutLink").click(function(){$("#aboutModal").modal("show"),$("#aboutTab").trigger("click")}),$("#disclaimerLink").click(function(){$("#aboutModal").modal("show"),$("#disclaimerTab").trigger("click")}),$("#dataLimitationsLink").click(function(){$("#aboutModal").modal("show"),$("#dataLimitationsTab").trigger("click")}),$("#userCautionLink").click(function(){$("#aboutModal").modal("show"),$("#userCautionTab").trigger("click")}),$(".docs").hide(),O(map,"load",function(){var e=map.getScale().toFixed(0);$("#scale")[0].innerHTML=addCommas(e);var a=T.webMercatorToGeographic(map.extent.getCenter());$("#latitude").html(a.y.toFixed(3)),$("#longitude").html(a.x.toFixed(3))}),O(map,"zoom-end",function(){var e=map.getScale().toFixed(0);$("#scale")[0].innerHTML=addCommas(e)}),O(map,"mouse-move",function(e){if($("#mapCenterLabel").css("display","none"),null!=e.mapPoint){var a=T.webMercatorToGeographic(e.mapPoint);$("#latitude").html(a.y.toFixed(3)),$("#longitude").html(a.x.toFixed(3))}}),O(map,"pan-end",function(){$("#mapCenterLabel").css("display","inline");var e=T.webMercatorToGeographic(map.extent.getCenter());$("#latitude").html(e.y.toFixed(3)),$("#longitude").html(e.x.toFixed(3))});var z=new g("https://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer"),B=new g("https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer");O(k.byId("btnStreets"),"click",function(){map.setBasemap("streets"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnSatellite"),"click",function(){map.setBasemap("satellite"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnHybrid"),"click",function(){map.setBasemap("hybrid"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnTerrain"),"click",function(){map.setBasemap("terrain"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnGray"),"click",function(){map.setBasemap("gray"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnNatGeo"),"click",function(){map.setBasemap("national-geographic"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnOSM"),"click",function(){map.setBasemap("osm"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnTopo"),"click",function(){map.setBasemap("topo"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnNatlMap"),"click",function(){map.addLayer(B,1),map.removeLayer(z)}),O(k.byId("btnUsgsTopo"),"click",function(){map.addLayer(z,1),map.removeLayer(B)}),$("#wetlandDiv").lobiPanel({unpin:!1,reload:!1,minimize:!1,close:!1,expand:!1,editTitle:!1,maxWidth:600,maxHeight:400}),$("#wetlandDiv .dropdown").prepend("
"),$("#wetlandClose").click(function(){$("#wetlandDiv").css("visibility","hidden"),map.graphics.clear()}),identifyParams=new b,identifyParams.tolerance=0,identifyParams.returnGeometry=!0,identifyParams.layerOption=b.LAYER_OPTION_ALL,identifyParams.width=map.width,identifyParams.height=map.height,identifyTask=new v(allLayers[0].layers.Wetlands.url);var q=x(".title",map.infoWindow.domNode)[0],V=new D(map.infoWindow.domNode,{handle:q});O(V,"FirstMove",function(){var e=x(".outerPointer",map.infoWindow.domNode)[0];_.add(e,"hidden");var e=x(".pointer",map.infoWindow.domNode)[0];_.add(e,"hidden")}.bind(this)),O(map,"click",function(e){if(1==aoiClicked)return void(aoiClicked=!1);if(null==measurement.activeTool)if(map.graphics.clear(),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click"),$("#wetlandDiv").css("visibility","hidden"),identifyParams.geometry=e.mapPoint,identifyParams.mapExtent=map.extent,map.getLevel()>=12&&0==$("#huc-download-alert")[0].scrollHeight){u=new v(allLayers[0].layers.Wetlands.url);var a=u.execute(identifyParams),t=new b;t.returnGeometry=!0,t.tolerance=0,t.width=map.width,t.height=map.height,t.geometry=e.mapPoint,t.layerOption=b.LAYER_OPTION_ALL,t.mapExtent=map.extent,t.layerIds=[0,1],H("mainDiv","wait"),map.setCursor("wait");var i=$("#wetlandDiv").data("lobiPanel"),n=$(document).height(),o=$(document).width(),r=.9,s=n*r,l=o*r,p=600,d=325;500>n&&($("#wetlandDiv").height(s),d=$("#floodToolsDiv").height()-50),500>o&&($("#wetlandDiv").width(l),p=$("#floodToolsDiv").width()-50);var c=.5*o-.5*$("#wetlandDiv").width(),m=.5*n-.5*$("#wetlandDiv").height();0==initWetlandClicked&&i.setPosition(c,m),1==i.isPinned()&&i.unpin(),initWetlandClicked=!0,$(".docs").hide(),$(".docItems").empty(),$("#reportInfo .panel-heading").addClass("loading-hide"),$("#reportInfo .panel-body").addClass("loading-hide"),$("#wetlandDiv").addClass("loading-background"),$(".tab-pane").addClass("hidden-loading"),a.addCallback(function(a){function i(e){var a;return a=0==e||""==e?"Link":e}if(a.length>1){var n,o,r,s,l=new b;l.returnGeometry=!1,l.tolerance=0,l.width=map.width,l.height=map.height,l.geometry=e.mapPoint,l.layerOption=b.LAYER_OPTION_ALL,l.mapExtent=map.extent,l.layerIds=[0,4];var p=new v(allLayers[1].layers["Source Type"].url),d=p.execute(l);d.addCallback(function(e){if(e.length>=1){for(var a=0;a"+i.PDF_NAME+"")):($("#"+e[t].value.toLowerCase()+"Docs").show(),$("#"+e[t].value.toLowerCase()+"Docs .docItems").append(""+i.Title+""))}}$("#reportInfo .panel-heading").removeClass("loading-hide"),$("#reportInfo .panel-body").removeClass("loading-hide"),$("#wetlandDiv").removeClass("loading-background"),$(".tab-pane").removeClass("hidden-loading")}),$("#wetlandTab").trigger("click"),$("#wetlandDiv").css("visibility","visible");for(var c=0;c10?$("#imageScalePopup").html("The wetlands and deepwater habitats in this area were photo interpreted using 1:"+addCommas(s.IMAGE_SCALE)+" scale, "):0!=s.IMAGE_SCALE&&$("#imageScalePopup").html("The wetlands and deepwater habitats in this area were photo interpreted using "+s.IMAGE_SCALE+" meter (or less) digital, "):$("#imageScalePopup").html(""),"Scalable"==s.SOURCE_TYPE?$("#sourceTypePopup").html("The data in this area are considered an interim scalable map product. Click here for a full description of Scalable Wetland Mapping. "):"Null"==s.SOURCE_TYPE?$("#sourceTypePopup").html("Photo interpretation information is not available for this project."):$("#sourceTypePopup").html(""+C(s.SOURCE_TYPE)+" imagery from "+i(s.IMAGE_YR)+". "),"None"!=s.SUPPMAPINFO?($("#suppMapInfo").empty(),$("#suppMapInfo").append('Click here for project specific mapping conventions and information.')):$("#suppMapInfo").empty();var y=["ATTRIBUTE","SYSTEM","SYSTEM_NAME","SYSTEM_DEFINITION","SUBSYSTEM","SUBSYSTEM_NAME","SUBSYSTEM_DEFINITION","CLASS","CLASS_NAME","CLASS_DEFINITION","SUBCLASS","SUBCLASS_NAME","SUBCLASS_DEFINITION","SPLIT_CLASS","SPLIT_CLASS_NAME","SPLIT_CLASS_DEFINITION","SPLIT_SUBCLASS","SPLIT_SUBCLASS_NAME","SPLIT_SUBCLASS_DEFINITION","WATER_REGIME","WATER_REGIME_NAME","WATER_REGIME_SUBGROUP","WATER_REGIME_DEFINITION","MODIFIER_1","MODIFIER_1_NAME","MODIFIER_1_GROUP","MODIFIER_1_SUBGROUP","MODIFIER_1_DEFINITION","MODIFIER_2","MODIFIER_2_NAME","MODIFIER_2_GROUP","MODIFIER_2_SUBGROUP","MODIFIER_2_DEFINITION","MODIFIER_3","MODIFIER_3_NAME","MODIFIER_3_GROUP","MODIFIER_3_SUBGROUP","MODIFIER_3_DEFINITION"];$.each(y,function(e){var a=y[e],t=r[a];"Null"!=t?"SPLIT_CLASS"!=a&&"SPLIT_CLASS_NAME"!=a&&"SPLIT_CLASS_DEFINITION"!=a||r.CLASS!=r.SPLIT_CLASS?($("#des"+a).html(r[a]),$("#des"+a).show(),$("#des"+a).parent().show()):$("#SPLIT_CLASS_GROUP").hide():$("#des"+a).parent().hasClass("decoder-group")&&$("#des"+a).parent().hide()});var f=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,f),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=T.webMercatorToGeographic(n.geometry),t=a.getExtent();map.setExtent(t,!0)}),$("#zoomProjectLink").click(function(e){var a=T.webMercatorToGeographic(o.geometry),t=a.getExtent();map.setExtent(t,!0);var i=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));o.geometry.spatialReference=map.spatialReference;var n=o;n.setSymbol(i),map.graphics.add(n)})}else if(a.length<=1){u=new v(allLayers[0].layers.Riparian.url);var h=u.execute(identifyParams);h.addCallback(function(a){if(a.length>1){for(var i,n,o,r,s=0;sclick here";var c=new esri.InfoTemplate("Riparian","Classification: "+o.ATTRIBUTE+" (decode)

Wetland Type: "+o.WETLAND_TYPE+"
Acres: "+Number(o.ACRES).toFixed(2)+"
Image Date(s): "+r.IMAGE_DATE+"
Project Metadata:"+d+"

Zoom to wetland

");$("#acreage").text(Number(o.ACRES).toFixed(2)),$("#wetlandCode").text(o.ATTRIBUTE),$("#wetlandType").text(o.WETLAND_TYPE),$("#decoderLink").click(function(e){$("#descriptionTab").trigger("click")}),$("#imageScalePopup").text(addCommas(r.IMAGE_SCALE)),$("#sourceTypePopup").text(C(r.SOURCE_TYPE)),0==r.IMAGE_DATE?$("#imageDate").append("Link"):$("#imageDate").text(r.IMAGE_DATE),$("#suppMapInfoLink").attr("href",r.SUPPMAPINFO),i.setInfoTemplate(c),map.infoWindow.setFeatures([i]),map.infoWindow.show(e.mapPoint);var m=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,m),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=T.webMercatorToGeographic(i.geometry),t=a.getExtent();map.setExtent(t,!0)}),$("#zoomProjectLink").click(function(e){var a=T.webMercatorToGeographic(n.geometry),t=a.getExtent();map.setExtent(t,!0);var i=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));n.geometry.spatialReference=map.spatialReference;var o=n;o.setSymbol(i),map.graphics.add(o)})}else if(a.length<=1){var g=new v(allLayers[2].layers["Historic Wetland Data"].url),u=g.execute(t);u.addCallback(function(a){if(a.length>=1){for(var t,i,n,o=0;oclick here",(""==n.IMAGE_DATE||"0"==n.IMAGE_DATE||0==n.IMAGE_DATE)&&(n.IMAGE_DATE=l);var p=new esri.InfoTemplate("Historic Wetland","

Wetland Type: "+i.WETLAND_TYPE+"
Acres: "+Number(i.ACRES).toFixed(2)+"
Project Metadata:"+l+"

Zoom to wetland

");t.setInfoTemplate(p),map.infoWindow.setFeatures([t]),map.infoWindow.show(e.mapPoint,map.getInfoWindowAnchor(e.screenPoint));var d=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,d),$("infoWindowLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=T.webMercatorToGeographic(t.geometry),i=a.getExtent();map.setExtent(i,!0)})}else H("mainDiv","default"),map.setCursor("default"),map.infoWindow.hide()})}})}})}else if($("#huc-download-alert")[0].scrollHeight>0){var g=new b;g.returnGeometry=!0,g.tolerance=0,g.width=map.width,g.height=map.height,g.geometry=e.mapPoint,g.layerOption=b.LAYER_OPTION_TOP,g.mapExtent=map.extent,g.spatialReference=map.spatialReference;var u=new v(allLayers[0].layers.HUC8.url),y=u.execute(g);y.addCallback(function(e){if(e.length>=1){var a;a=e[0].feature;var t=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));a.geometry.spatialReference=map.spatialReference;var i=a;i.setSymbol(t),map.graphics.add(i);var n=T.webMercatorToGeographic(a.geometry),o=n.getExtent();map.setExtent(o,!0);var r=e[0].feature.attributes.HUC8,s=e[0].feature.attributes.Name;dojo.byId("innerAlert").innerHTML="

Download Data

Click the link below to download data for "+s+" watershed

HUC "+r+"

"}})}}),$(document).on("click","#showHUCs",function(){event.preventDefault(),$("#getDataModal").modal("hide"),$("#huc-download-alert").slideDown(250),map.getLayer("huc8").setVisibility(!0),dojo.byId("innerAlert").innerHTML="

Download Data

Please review the Data Download (www.fws.gov/wetlands/Data/Data-Download.html) page for information on how to download data, what is included in the download and data use limitations and disclaimer.


Click the map to select a watershed from which to extract wetland data.

"});var K=new i({value:"",maxLocations:25,autoComplete:!0,arcgisGeocoder:!0,autoNavigate:!1,map:map},"geosearch");K.startup(),K.on("select",N),K.on("findResults",W),K.on("clear",F),O(K.inputNode,"keydown",function(e){13==e.keyCode&&A()});var X=G("../images/purple-pin.png",0,12,13,24);map.on("load",function(){map.infoWindow.set("highlight",!1),map.infoWindow.set("titleInBody",!1)}),O(k.byId("btnGeosearch"),"click",R),$(document).ready(function(){function e(){$("#geosearchModal").modal("show")}function a(){$("#aboutModal").modal("show")}$("#geosearchNav").click(function(){e()}),$("#aboutNav").click(function(){a()}),$("#html").niceScroll(),$("#sidebar").niceScroll(),$("#sidebar").scroll(function(){$("#sidebar").getNiceScroll().resize()}),maxLegendHeight=.9*$("#mapDiv").height(),$("#legendElement").css("max-height",maxLegendHeight),maxLegendDivHeight=maxLegendHeight-parseInt($("#legendHeading").css("height").replace("px","")),$("#legendDiv").css("max-height",maxLegendDivHeight),$("#legendCollapse").on("shown.bs.collapse",function(){if(0==legendDiv.innerHTML.length){var e=new o({map:map,layerInfos:legendLayers},"legendDiv");e.startup(),$("#legendDiv").niceScroll()}}),$("#legendCollapse").on("hide.bs.collapse",function(){$("#legendElement").css("height","initial")}),$("#measurementCollapse").on("shown.bs.collapse",function(){$("#measureLabel").show()}),$("#measurementCollapse").on("hide.bs.collapse",function(){window.innerWidth<=767&&$("#measureLabel").hide()})}),require(["esri/InfoTemplate","esri/tasks/locator","esri/tasks/query","esri/tasks/QueryTask","esri/graphicsUtils","esri/geometry/Point","esri/geometry/Extent","esri/layers/ArcGISDynamicMapServiceLayer","esri/layers/ArcGISImageServiceLayer","esri/layers/FeatureLayer","esri/layers/WMSLayer","esri/layers/WMSLayerInfo","esri/tasks/GeometryService","dijit/form/CheckBox","dijit/form/RadioButton","dojo/query","dojo/dom","dojo/dom-class","dojo/dom-construct","dojo/dom-style","dojo/on"],function(e,a,t,i,n,o,r,s,l,p,d,c,m,g,u,y,f,h,b,v,w){function L(a,t,i,n,o,r,s){if(map.addLayer(i),0==s.legendLabel){var l=document.createElement("style");l.type="text/css",l.innerHTML="[id*="+i.id+"] .esriLegendLayerLabel { display: none; }",document.getElementsByTagName("head")[0].appendChild(l)}if("aoi"==i.id&&w(i,"load",function(a){w(i,"click",function(a){aoiClicked=!0;var t=a.graphic.attributes.HYPERLINK_2;if("None"==t){var n=new e("${NAME}","Type: ${TYPE}
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");i.setInfoTemplate(n)}else{var n=new e("${NAME}","Type: ${TYPE}
Ramsar: click here
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");i.setInfoTemplate(n)}})}),S.push([o,camelize(n),i]),o){if(!$("#"+camelize(o)).length){var p;if("Data Source"==o)var p=$('
');else var p=$('
");p.click(function(e){p.find("i.glyphspan").toggleClass("fa-check-square-o fa-square-o"),$.each(S,function(e,a){var t=map.getLayer(a[2].id);if(a[0]==o)if($("#"+a[1]).find("i.glyphspan").hasClass("fa-dot-circle-o")&&p.find("i.glyphspan").hasClass("fa-check-square-o")){console.log("adding layer: ",a[1]),map.addLayer(a[2]);var t=map.getLayer(a[2].id);t.setVisibility(!0)}else if(p.find("i.glyphspan").hasClass("fa-square-o")){console.log("removing layer: ",a[1]);var t=map.getLayer(a[2].id);t.setVisibility(!1)}})});var d=$('
');$("#toggle").append(d)}if(i.visible)var c=$('
");else var c=$('
"); -$("#"+camelize(o)).append(c),c.click(function(e){if($(this).find("i.glyphspan").hasClass("fa-circle-o")){$(this).find("i.glyphspan").toggleClass("fa-dot-circle-o fa-circle-o");var a=$(this)[0].id;$.each(S,function(e,t){if(t[0]==o)if(t[1]==a&&$("#"+camelize(o+" Root")).find("i.glyphspan").hasClass("fa-check-square-o")){console.log("adding layer: ",t[1]),map.addLayer(t[2]);var i=map.getLayer(t[2].id);i.setVisibility(!0)}else if(t[1]==a&&$("#"+camelize(o+" Root")).find("i.glyphspan").hasClass("fa-square-o"))console.log("group heading not checked");else{console.log("removing layer: ",t[1]);var i=map.getLayer(t[2].id);i.setVisibility(!1),$("#"+t[1]).find("i.glyphspan").hasClass("fa-dot-circle-o")&&$("#"+t[1]).find("i.glyphspan").toggleClass("fa-dot-circle-o fa-circle-o")}})}})}else if(s.includeInLayerList){if(i.visible&&void 0!==s.hasOpacitySlider&&1==s.hasOpacitySlider&&void 0!==s.moreinfo&&s.moreinfo)var c=$('
');else if(!i.visible&&void 0!==s.hasOpacitySlider&&1==s.hasOpacitySlider&&void 0!==s.moreinfo&&s.moreinfo)var c=$('
');else if(i.visible&&void 0!==s.hasOpacitySlider&&1==s.hasOpacitySlider)var c=$('
');else if(i.visible||void 0===s.hasOpacitySlider||1!=s.hasOpacitySlider)if(i.visible&&void 0!==s.moreinfo&&s.moreinfo)var c=$('
');else if(!i.visible&&void 0!==s.moreinfo&&s.moreinfo)var c=$('
');else if(i.visible)var c=$('
");else var c=$('
");else var c=$('
');c.click(function(e){$(this).find("i.glyphspan").toggleClass("fa-check-square-o fa-square-o"),$(this).find("button").button("toggle"),i.visible?i.setVisibility(!1):i.setVisibility(!0),s.otherLayersToggled&&$.each(s.otherLayersToggled,function(e,a){var t=map.getLayer(a);t.setVisibility(i.visible)})})}if(void 0!==t){var m=camelize(a);if(!$("#"+m).length){if(t)var g=$('
");else var g=$('
');$("#toggle").append(g)}if(o){if($("#"+m).append(p),$("#"+m).append(d),void 0!==s.moreinfo&&s.moreinfo){var u="#info"+camelize(o),y=$(u);y.click(function(e){window.open(s.moreinfo,"_blank"),e.preventDefault(),e.stopPropagation()})}if($("#opacity"+camelize(o)).length>0){var u="#opacity"+camelize(o),f=$(u);f.click(function(e){e.preventDefault(),e.stopPropagation(),$(".opacitySlider").remove();var a=map.getLayer(r.id).opacity,t=$('
');$("body").append(t),$("#slider")[0].value=100*a,$(".opacitySlider").css("left",event.clientX-180),$(".opacitySlider").css("top",event.clientY-50),$(".opacitySlider").mouseleave(function(){$(".opacitySlider").remove()}),$(".opacityClose").click(function(){$(".opacitySlider").remove()}),$("#slider").change(function(e){var a=$("#slider")[0].value/100;console.log("o: "+a),$("#opacityValue").html("Opacity: "+a),map.getLayer(r.id).setOpacity(a),s.otherLayersToggled&&$.each(s.otherLayersToggled,function(e,t){var i=map.getLayer(t);i.setOpacity(a)})})})}}else{if($("#"+m).append(c),void 0!==s.moreinfo&&s.moreinfo){var u="#info"+camelize(n),y=$(u);y.click(function(e){window.open(s.moreinfo,"_blank"),e.preventDefault(),e.stopPropagation()})}$("#opacity"+camelize(n)).length>0&&$("#opacity"+camelize(n)).click(function(e){e.preventDefault(),e.stopPropagation(),$(".opacitySlider").remove();var a=map.getLayer(r.id).opacity,t=$('
');$("body").append(t),$("#slider")[0].value=100*a,$(".opacitySlider").css("left",event.clientX-180),$(".opacitySlider").css("top",event.clientY-50),$(".opacitySlider").mouseleave(function(){$(".opacitySlider").remove()}),$(".opacityClose").click(function(){$(".opacitySlider").remove()}),$("#slider").change(function(e){var a=$("#slider")[0].value/100;console.log("o: "+a),$("#opacityValue").html("Opacity: "+a),map.getLayer(r.id).setOpacity(a),s.otherLayersToggled&&$.each(s.otherLayersToggled,function(e,t){var i=map.getLayer(t);i.setOpacity(a)})})})}}else if($("#toggle").append(c),void 0!==s.moreinfo&&s.moreinfo){var u="#info"+camelize(n),y=$(u);y.click(function(e){alert(e.currentTarget.id),e.preventDefault(),e.stopPropagation()})}}var S=(new m("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/Geometry/GeometryServer"),[]);$.each(allLayers,function(e,a){console.log("processing: ",a.groupHeading),$.each(a.layers,function(e,t){var i="";if(t.wimOptions.exclusiveGroupName&&(i=t.wimOptions.exclusiveGroupName),"agisFeature"===t.wimOptions.layerType){var n=new p(t.url,t.options);void 0!==t.wimOptions.renderer&&n.setRenderer(t.wimOptions.renderer),t.wimOptions&&1==t.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),L(a.groupHeading,a.showGroupHeading,n,e,i,t.options,t.wimOptions)}else if("agisWMS"===t.wimOptions.layerType){var n=new d(t.url,{resourceInfo:t.options.resourceInfo,visibleLayers:t.options.visibleLayers},t.options);t.wimOptions&&1==t.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),L(a.groupHeading,a.showGroupHeading,n,e,i,t.options,t.wimOptions)}else if("agisDynamic"===t.wimOptions.layerType){var n=new s(t.url,t.options);if(t.visibleLayers&&n.setVisibleLayers(t.visibleLayers),t.wimOptions&&t.wimOptions.layerDefinitions){var o=[];$.each(t.wimOptions.layerDefinitions,function(e,a){o[e]=a}),n.setLayerDefinitions(o)}t.wimOptions&&1==t.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),L(a.groupHeading,a.showGroupHeading,n,e,i,t.options,t.wimOptions)}else if("agisImage"===t.wimOptions.layerType){var n=new l(t.url,t.options);t.wimOptions&&1==t.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),t.visibleLayers&&n.setVisibleLayers(t.visibleLayers),L(a.groupHeading,a.showGroupHeading,n,e,i,t.options,t.wimOptions)}})})})}),$(".close-alert").click(function(){$(this).parent().slideUp(250)}),$(document).ready(function(){}); \ No newline at end of file +function addCommas(e){e+="";for(var a=e.split("."),i=a[0],t=a.length>1?"."+a[1]:"",n=/(\d+)(\d{3})/;n.test(i);)i=i.replace(n,"$1,$2");return i+t}function camelize(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,a){return 0===a?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")}function stateSelected(){var e=$("#stateSelect")[0];if(e.selectedIndex>0){var a=e.options[e.selectedIndex].value,i=e.options[e.selectedIndex].label;$("#downloadState").html("Download Geodatabase and Shapefile data for "+i+"")}else $("#downloadState").html("")}function hucLinkListener(e){console.log(e),$.get("https://fwsprimary.wim.usgs.gov/downloadLoggingService/downloadLog.asmx/Log?huc="+e+",NWIV2",function(e){})}var allLayers,renderer;require(["esri/InfoTemplate","esri/renderers/UniqueValueRenderer","esri/symbols/PictureMarkerSymbol","dojo/domReady!"],function(e,a,i){var t=new i("./images/grn-pushpin.png",45,45);renderer=new a(t);var n=new e("${NAME}","Type: ${TYPE}
Ramsar: click here
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");allLayers=[{groupHeading:"ESRI dynamic map services",showGroupHeading:!1,includeInLayerList:!0,layers:{Wetlands:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands/MapServer",options:{id:"wetlands",opacity:.75,visible:!0},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,includeLegend:!0,legendLabel:!1,moreinfo:"https://www.fws.gov/wetlands/Data/Wetlands-Product-Summary.html",otherLayersToggled:["wetlandsStatus","wetlandsRaster"]}},"Wetlands Status":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands_Status/MapServer",options:{id:"wetlandsStatus",layers:[0],visible:!0,maxScale:285e3,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!1,includeLegend:!0,esriLegendLabel:!1}},"Wetlands ":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands_Raster/ImageServer",options:{id:"wetlandsRaster",visible:!0,maxScale:285e3,opacity:.6},wimOptions:{type:"layer",layerType:"agisImage",includeInLayerList:!1,includeLegend:!0,otherLayersToggled:["wetlands","wetlandsStatus"]}},Riparian:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Riparian/MapServer",visibleLayers:[0],options:{id:"riparian",opacity:.75,visible:!0},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/wetlands/Other/Riparian-Product-Summary.html",includeLegend:!0,legendLabel:!1}},"Riparian Mapping Areas":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Riparian/MapServer",visibleLayers:[1],options:{id:"riparianStatus",visible:!1,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/wetlands/Other/Riparian-Product-Summary.html",includeLegend:!0,legendLabel:!1}},HUC8:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/HUCs/MapServer",options:{id:"huc8",opacity:1,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!1,includeLegend:!0,esriLegendLabel:!1}}}},{groupHeading:"Data Source Group",showGroupHeading:!1,includeInLayerList:!0,moreinfo:"https://www.fws.gov/wetlands/Documents/Scalable-Wetland-Mapping-Fact-Sheet.pdf",otherLayersToggled:["sourceType","imageScale","imageYear"],layers:{"Source Type":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[1],options:{id:"sourceType",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["imageScale","imageYear"],legendLabel:!1}},"Image Scale":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[2],options:{id:"imageScale",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["sourceType","imageYear"],legendLabel:!1}},"Image Year":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[3],options:{id:"imageYear",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["sourceType","imageScale"],legendLabel:!1}}}},{groupHeading:"refuges and historic",showGroupHeading:!1,includeInLayerList:!0,layers:{"Areas of Interest":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Areas_of_Interest/MapServer/0",options:{id:"aoi",opacity:1,visible:!1,outFields:["*"],infoTemplate:n},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!0,hasOpacitySlider:!1,moreinfo:"https://www.fws.gov/wetlands/Data/metadata/FWS_Wetland_Areas_of_Interest.xml",includeLegend:!0}},"FWS Managed Lands Centroids":{url:"https://services.arcgis.com/QVENGdaPbd4LUkLV/ArcGIS/rest/services/FWSCentroids/FeatureServer/0",options:{id:"fwsCentroids",opacity:.75,visible:!1},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html",includeLegend:!0,esriLegendLabel:!1}},"FWS Managed Lands Tracts":{url:"https://services.arcgis.com/QVENGdaPbd4LUkLV/ArcGIS/rest/services/FWSInterest/FeatureServer/1",options:{id:"fwsTracts",opacity:.75,visible:!1},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html",includeLegend:!0,esriLegendLabel:!1}},"FWS Managed Lands":{url:"https://gis.fws.gov/ArcGIS/rest/services/FWS_Refuge_Boundaries/MapServer",visibleLayers:[0,1,3],options:{id:"fwsRefuges",opacity:.75,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html",includeLegend:!0,esriLegendLabel:!1}},"Historic Wetland Data":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Historic_Wetlands/MapServer",visibleLayers:[0,1],options:{id:"historic",visible:!1,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,hasOpacitySlider:!0,moreinfo:"https://www.fws.gov/wetlands/Data/Historic-Wetlands-Data.html",includeLegend:!0,legendLabel:!1}}}}]});var map,allLayers,maxLegendHeight,maxLegendDivHeight,printCount=0,legendLayers=[],measurement,identifyTask,identifyParams,aoiClicked=!1,initWetlandClicked=!1;require(["esri/map","esri/arcgis/utils","esri/config","esri/dijit/Geocoder","esri/dijit/HomeButton","esri/dijit/Legend","esri/dijit/LocateButton","esri/dijit/Measurement","esri/dijit/PopupTemplate","esri/graphic","esri/geometry/Extent","esri/geometry/Multipoint","esri/geometry/Point","esri/layers/ArcGISTiledMapServiceLayer","esri/renderers/UniqueValueRenderer","esri/SpatialReference","esri/symbols/PictureMarkerSymbol","esri/tasks/GeometryService","esri/tasks/IdentifyParameters","esri/tasks/IdentifyTask","esri/tasks/LegendLayer","esri/tasks/PrintTask","esri/tasks/PrintParameters","esri/tasks/PrintTemplate","esri/geometry/webMercatorUtils","esri/urlUtils","dojo/dom","dojo/dom-class","dojo/dnd/Moveable","dojo/query","dojo/on","dojo/domReady!"],function(e,a,i,t,n,r,o,s,l,d,p,c,m,g,u,y,f,h,b,v,w,L,S,I,T,E,k,_,D,x,O){function P(){$("#printModal").modal("show")}function C(){$("#getDataModal").modal("show")}function M(e){var a="";switch(e){case"CIR":a="color infrared";break;case"TC":a="true color";break;case"BW":a="black and white"}return a}function A(){K.activeGeocoder.searchExtent=null}function R(){A();var e=K.find();e.then(function(e){W(e)})}function N(e){F();var a=e.graphic?e.graphic:e.result.feature;a.setSymbol(X)}function W(e){if(e=e.results,e.length>0){F();for(var a=0;a  '+s+"

");$("#printJobsDiv").find("p.toRemove").remove(),$("#printModalBody").append(a),$("#printTitle").val(""),$("#printExecuteButton").button("reset")}function a(e){alert("Sorry, an unclear print error occurred. Please try refreshing the application to fix the problem")}var i=new S;i.map=map;var t=new I;t.exportOptions={width:500,height:400,dpi:300},t.format="PDF",t.layout="Letter ANSI A Landscape test",t.preserveScale=!1;var n=new w;n.layerId="wetlands";var r=new w;r.layerId="wetlandsRaster";var o=$("#printTitle").val();""==o?t.layoutOptions={titleText:"Wetlands",authorText:"National Wetlands Inventory (NWI)",copyrightText:"This page was produced by the NWI mapper",legendLayers:[n,r]}:t.layoutOptions={titleText:o,authorText:"National Wetlands Inventory (NWI)",copyrightText:"This page was produced by the NWI mapper",legendLayers:[n,r]};var s=t.layoutOptions.titleText;i.template=t;var l=new L("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task");l.execute(i,e,a),$.get("https://fwsprimary.wim.usgs.gov/pdfLoggingService/pdfLog.asmx/Log?printInfo="+map.getScale()+","+map.extent.xmin+","+map.extent.ymax+","+map.extent.xmax+","+map.extent.ymin+",NWIV2",function(e){})}function H(e,a){var i;document.getElementById&&(i=document.getElementById(e))&&i.style&&(i.style.cursor=a)}i.defaults.io.corsEnabledServers.push("fwsprimary.wim.usgs.gov"),esri.config.defaults.io.proxyUrl="https://fwsprimary.wim.usgs.gov/serviceProxy/proxy.ashx",i.defaults.geometryService=new h("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/Geometry/GeometryServer"),map=new e("mapDiv",{basemap:"hybrid",extent:new p(-14638882.654811008,2641706.3772205533,-6821514.898031538,6403631.161302788,new y({wkid:3857})),fitExtent:!0});var j=new n({map:map,extent:new p(-14638882.654811008,2641706.3772205533,-6821514.898031538,6403631.161302788,new y({wkid:3857}))},"homeButton");j.startup();var Y=new o({map:map,scale:4514},"locateButton");Y.startup(),measurement=new s({map:map,advancedLocationUnits:!0},k.byId("measurementDiv")),measurement.startup(),$(window).resize(function(){$("#legendCollapse").hasClass("in")?(maxLegendHeight=.9*$("#mapDiv").height(),$("#legendElement").css("height",maxLegendHeight),$("#legendElement").css("max-height",maxLegendHeight),maxLegendDivHeight=$("#legendElement").height()-parseInt($("#legendHeading").css("height").replace("px","")),$("#legendDiv").css("max-height",maxLegendDivHeight)):$("#legendElement").css("height","initial")}),$("#printNavButton").click(function(){P()}),$("#printExecuteButton").click(function(e){e.preventDefault(),$(this).button("loading"),U()}),$("#getDataButton").click(function(){C()}),$("#aboutLink").click(function(){$("#aboutModal").modal("show"),$("#aboutTab").trigger("click")}),$("#disclaimerLink").click(function(){$("#aboutModal").modal("show"),$("#disclaimerTab").trigger("click")}),$("#dataLimitationsLink").click(function(){$("#aboutModal").modal("show"),$("#dataLimitationsTab").trigger("click")}),$("#userCautionLink").click(function(){$("#aboutModal").modal("show"),$("#userCautionTab").trigger("click")}),$(".docs").hide(),O(map,"load",function(){var e=map.getScale().toFixed(0);$("#scale")[0].innerHTML=addCommas(e);var a=T.webMercatorToGeographic(map.extent.getCenter());$("#latitude").html(a.y.toFixed(3)),$("#longitude").html(a.x.toFixed(3))}),O(map,"zoom-end",function(){var e=map.getScale().toFixed(0);$("#scale")[0].innerHTML=addCommas(e)}),O(map,"mouse-move",function(e){if($("#mapCenterLabel").css("display","none"),null!=e.mapPoint){var a=T.webMercatorToGeographic(e.mapPoint);$("#latitude").html(a.y.toFixed(3)),$("#longitude").html(a.x.toFixed(3))}}),O(map,"pan-end",function(){$("#mapCenterLabel").css("display","inline");var e=T.webMercatorToGeographic(map.extent.getCenter());$("#latitude").html(e.y.toFixed(3)),$("#longitude").html(e.x.toFixed(3))});var z=new g("https://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer"),B=new g("https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer");O(k.byId("btnStreets"),"click",function(){map.setBasemap("streets"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnSatellite"),"click",function(){map.setBasemap("satellite"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnHybrid"),"click",function(){map.setBasemap("hybrid"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnTerrain"),"click",function(){map.setBasemap("terrain"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnGray"),"click",function(){map.setBasemap("gray"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnNatGeo"),"click",function(){map.setBasemap("national-geographic"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnOSM"),"click",function(){map.setBasemap("osm"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnTopo"),"click",function(){map.setBasemap("topo"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnNatlMap"),"click",function(){map.addLayer(B,1),map.removeLayer(z)}),O(k.byId("btnUsgsTopo"),"click",function(){map.addLayer(z,1),map.removeLayer(B)}),$("#wetlandDiv").lobiPanel({unpin:!1,reload:!1,minimize:!1,close:!1,expand:!1,editTitle:!1,maxWidth:600,maxHeight:400}),$("#wetlandDiv .dropdown").prepend("
"),$("#wetlandClose").click(function(){$("#wetlandDiv").css("visibility","hidden"),map.graphics.clear()}),identifyParams=new b,identifyParams.tolerance=0,identifyParams.returnGeometry=!0,identifyParams.layerOption=b.LAYER_OPTION_ALL,identifyParams.width=map.width,identifyParams.height=map.height,identifyTask=new v(allLayers[0].layers.Wetlands.url);var q=x(".title",map.infoWindow.domNode)[0],V=new D(map.infoWindow.domNode,{handle:q});O(V,"FirstMove",function(){var e=x(".outerPointer",map.infoWindow.domNode)[0];_.add(e,"hidden");var e=x(".pointer",map.infoWindow.domNode)[0];_.add(e,"hidden")}.bind(this)),O(map,"click",function(e){if(1==aoiClicked)return void(aoiClicked=!1);if(null==measurement.activeTool)if(map.graphics.clear(),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click"),$("#wetlandDiv").css("visibility","hidden"),identifyParams.geometry=e.mapPoint,identifyParams.mapExtent=map.extent,map.getLevel()>=12&&0==$("#huc-download-alert")[0].scrollHeight){u=new v(allLayers[0].layers.Wetlands.url);var a=u.execute(identifyParams),i=new b;i.returnGeometry=!0,i.tolerance=0,i.width=map.width,i.height=map.height,i.geometry=e.mapPoint,i.layerOption=b.LAYER_OPTION_ALL,i.mapExtent=map.extent,i.layerIds=[0,1],H("mainDiv","wait"),map.setCursor("wait");var t=$("#wetlandDiv").data("lobiPanel"),n=$(document).height(),r=$(document).width(),o=.9,s=n*o,l=r*o,d=600,p=325;500>n&&($("#wetlandDiv").height(s),p=$("#floodToolsDiv").height()-50),500>r&&($("#wetlandDiv").width(l),d=$("#floodToolsDiv").width()-50);var c=.5*r-.5*$("#wetlandDiv").width(),m=.5*n-.5*$("#wetlandDiv").height();0==initWetlandClicked&&t.setPosition(c,m),1==t.isPinned()&&t.unpin(),initWetlandClicked=!0,$(".docs").hide(),$(".docItems").empty(),$("#reportInfo .panel-heading").addClass("loading-hide"),$("#reportInfo .panel-body").addClass("loading-hide"),$("#wetlandDiv").addClass("loading-background"),$(".tab-pane").addClass("hidden-loading"),a.addCallback(function(a){function t(e){var a;return a=0==e||""==e?"Link":e}if(a.length>1){var n,r,o,s,l=new b;l.returnGeometry=!1,l.tolerance=0,l.width=map.width,l.height=map.height,l.geometry=e.mapPoint,l.layerOption=b.LAYER_OPTION_ALL,l.mapExtent=map.extent,l.layerIds=[0,4];var d=new v(allLayers[1].layers["Source Type"].url),p=d.execute(l);p.addCallback(function(e){if(e.length>=1){for(var a=0;a"+t.PDF_NAME+"")):($("#"+e[i].value.toLowerCase()+"Docs").show(),$("#"+e[i].value.toLowerCase()+"Docs .docItems").append(""+t.Title+""))}}$("#reportInfo .panel-heading").removeClass("loading-hide"),$("#reportInfo .panel-body").removeClass("loading-hide"),$("#wetlandDiv").removeClass("loading-background"),$(".tab-pane").removeClass("hidden-loading")}),$("#wetlandTab").trigger("click"),$("#wetlandDiv").css("visibility","visible");for(var c=0;c10?$("#imageScalePopup").html("The wetlands and deepwater habitats in this area were photo interpreted using 1:"+addCommas(s.IMAGE_SCALE)+" scale, "):0!=s.IMAGE_SCALE&&$("#imageScalePopup").html("The wetlands and deepwater habitats in this area were photo interpreted using "+s.IMAGE_SCALE+" meter (or less) digital, "):$("#imageScalePopup").html(""),"Scalable"==s.SOURCE_TYPE?$("#sourceTypePopup").html("The data in this area are considered an interim scalable map product. Click here for a full description of Scalable Wetland Mapping. "):"Null"==s.SOURCE_TYPE?$("#sourceTypePopup").html("Photo interpretation information is not available for this project."):$("#sourceTypePopup").html(""+M(s.SOURCE_TYPE)+" imagery from "+t(s.IMAGE_YR)+". "),"None"!=s.SUPPMAPINFO?($("#suppMapInfo").empty(),$("#suppMapInfo").append('Click here for project specific mapping conventions and information.')):$("#suppMapInfo").empty();var y=["ATTRIBUTE","SYSTEM","SYSTEM_NAME","SYSTEM_DEFINITION","SUBSYSTEM","SUBSYSTEM_NAME","SUBSYSTEM_DEFINITION","CLASS","CLASS_NAME","CLASS_DEFINITION","SUBCLASS","SUBCLASS_NAME","SUBCLASS_DEFINITION","SPLIT_CLASS","SPLIT_CLASS_NAME","SPLIT_CLASS_DEFINITION","SPLIT_SUBCLASS","SPLIT_SUBCLASS_NAME","SPLIT_SUBCLASS_DEFINITION","WATER_REGIME","WATER_REGIME_NAME","WATER_REGIME_SUBGROUP","WATER_REGIME_DEFINITION","MODIFIER_1","MODIFIER_1_NAME","MODIFIER_1_GROUP","MODIFIER_1_SUBGROUP","MODIFIER_1_DEFINITION","MODIFIER_2","MODIFIER_2_NAME","MODIFIER_2_GROUP","MODIFIER_2_SUBGROUP","MODIFIER_2_DEFINITION","MODIFIER_3","MODIFIER_3_NAME","MODIFIER_3_GROUP","MODIFIER_3_SUBGROUP","MODIFIER_3_DEFINITION"];$.each(y,function(e){var a=y[e],i=o[a];"Null"!=i?"SPLIT_CLASS"!=a&&"SPLIT_CLASS_NAME"!=a&&"SPLIT_CLASS_DEFINITION"!=a||o.CLASS!=o.SPLIT_CLASS?($("#des"+a).html(o[a]),$("#des"+a).show(),$("#des"+a).parent().show()):$("#SPLIT_CLASS_GROUP").hide():$("#des"+a).parent().hasClass("decoder-group")&&$("#des"+a).parent().hide()});var f=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,f),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=T.webMercatorToGeographic(n.geometry),i=a.getExtent();map.setExtent(i,!0)}),$("#zoomProjectLink").click(function(e){var a=T.webMercatorToGeographic(r.geometry),i=a.getExtent();map.setExtent(i,!0);var t=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));r.geometry.spatialReference=map.spatialReference;var n=r;n.setSymbol(t),map.graphics.add(n)})}else if(a.length<=1){u=new v(allLayers[0].layers.Riparian.url);var h=u.execute(identifyParams);h.addCallback(function(a){if(a.length>1){for(var t,n,r,o,s=0;sclick here";var c=new esri.InfoTemplate("Riparian","Classification: "+r.ATTRIBUTE+" (decode)

Wetland Type: "+r.WETLAND_TYPE+"
Acres: "+Number(r.ACRES).toFixed(2)+"
Image Date(s): "+o.IMAGE_DATE+"
Project Metadata:"+p+"

Zoom to wetland

");$("#acreage").text(Number(r.ACRES).toFixed(2)),$("#wetlandCode").text(r.ATTRIBUTE),$("#wetlandType").text(r.WETLAND_TYPE),$("#decoderLink").click(function(e){$("#descriptionTab").trigger("click")}),$("#imageScalePopup").text(addCommas(o.IMAGE_SCALE)),$("#sourceTypePopup").text(M(o.SOURCE_TYPE)),0==o.IMAGE_DATE?$("#imageDate").append("Link"):$("#imageDate").text(o.IMAGE_DATE),$("#suppMapInfoLink").attr("href",o.SUPPMAPINFO),t.setInfoTemplate(c),map.infoWindow.setFeatures([t]),map.infoWindow.show(e.mapPoint);var m=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,m),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=T.webMercatorToGeographic(t.geometry),i=a.getExtent();map.setExtent(i,!0)}),$("#zoomProjectLink").click(function(e){var a=T.webMercatorToGeographic(n.geometry),i=a.getExtent();map.setExtent(i,!0);var t=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));n.geometry.spatialReference=map.spatialReference;var r=n;r.setSymbol(t),map.graphics.add(r)})}else if(a.length<=1){var g=new v(allLayers[2].layers["Historic Wetland Data"].url),u=g.execute(i);u.addCallback(function(a){if(a.length>=1){for(var i,t,n,r=0;rclick here",(""==n.IMAGE_DATE||"0"==n.IMAGE_DATE||0==n.IMAGE_DATE)&&(n.IMAGE_DATE=l);var d=new esri.InfoTemplate("Historic Wetland","

Wetland Type: "+t.WETLAND_TYPE+"
Acres: "+Number(t.ACRES).toFixed(2)+"
Project Metadata:"+l+"

Zoom to wetland

");i.setInfoTemplate(d),map.infoWindow.setFeatures([i]),map.infoWindow.show(e.mapPoint,map.getInfoWindowAnchor(e.screenPoint));var p=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,p),$("infoWindowLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=T.webMercatorToGeographic(i.geometry),t=a.getExtent();map.setExtent(t,!0)})}else H("mainDiv","default"),map.setCursor("default"),map.infoWindow.hide()})}})}})}else if($("#huc-download-alert")[0].scrollHeight>0){var g=new b;g.returnGeometry=!0,g.tolerance=0,g.width=map.width,g.height=map.height,g.geometry=e.mapPoint,g.layerOption=b.LAYER_OPTION_TOP,g.mapExtent=map.extent,g.spatialReference=map.spatialReference;var u=new v(allLayers[0].layers.HUC8.url),y=u.execute(g);y.addCallback(function(e){if(e.length>=1){var a;a=e[0].feature;var i=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));a.geometry.spatialReference=map.spatialReference;var t=a;t.setSymbol(i),map.graphics.add(t);var n=T.webMercatorToGeographic(a.geometry),r=n.getExtent();map.setExtent(r,!0);var o=e[0].feature.attributes.HUC8,s=e[0].feature.attributes.Name;dojo.byId("innerAlert").innerHTML="

Download Data

Click the link below to download data for "+s+" watershed

HUC "+o+"

"}})}}),$(document).on("click","#showHUCs",function(){event.preventDefault(),$("#getDataModal").modal("hide"),$("#huc-download-alert").slideDown(250),map.getLayer("huc8").setVisibility(!0),dojo.byId("innerAlert").innerHTML="

Download Data

Please review the Data Download (www.fws.gov/wetlands/Data/Data-Download.html) page for information on how to download data, what is included in the download and data use limitations and disclaimer.


Click the map to select a watershed from which to extract wetland data.

"});var K=new t({value:"",maxLocations:25,autoComplete:!0,arcgisGeocoder:!0,autoNavigate:!1,map:map},"geosearch");K.startup(),K.on("select",N),K.on("findResults",W),K.on("clear",F),O(K.inputNode,"keydown",function(e){13==e.keyCode&&A()});var X=G("../images/purple-pin.png",0,12,13,24);map.on("load",function(){map.infoWindow.set("highlight",!1),map.infoWindow.set("titleInBody",!1)}),O(k.byId("btnGeosearch"),"click",R),$(document).ready(function(){function e(){$("#geosearchModal").modal("show")}function a(){$("#aboutModal").modal("show")}$("#geosearchNav").click(function(){e()}),$("#aboutNav").click(function(){a()}),$("#html").niceScroll(),$("#sidebar").niceScroll(),$("#sidebar").scroll(function(){$("#sidebar").getNiceScroll().resize()}),maxLegendHeight=.9*$("#mapDiv").height(),$("#legendElement").css("max-height",maxLegendHeight),maxLegendDivHeight=maxLegendHeight-parseInt($("#legendHeading").css("height").replace("px","")),$("#legendDiv").css("max-height",maxLegendDivHeight),$("#legendCollapse").on("shown.bs.collapse",function(){if(0==legendDiv.innerHTML.length){var e=new r({map:map,layerInfos:legendLayers},"legendDiv");e.startup(),$("#legendDiv").niceScroll()}}),$("#legendCollapse").on("hide.bs.collapse",function(){$("#legendElement").css("height","initial")}),$("#measurementCollapse").on("shown.bs.collapse",function(){$("#measureLabel").show()}),$("#measurementCollapse").on("hide.bs.collapse",function(){window.innerWidth<=767&&$("#measureLabel").hide()})}),require(["esri/InfoTemplate","esri/tasks/locator","esri/tasks/query","esri/tasks/QueryTask","esri/graphicsUtils","esri/geometry/Point","esri/geometry/Extent","esri/layers/ArcGISDynamicMapServiceLayer","esri/layers/ArcGISImageServiceLayer","esri/layers/FeatureLayer","esri/layers/WMSLayer","esri/layers/WMSLayerInfo","esri/tasks/GeometryService","dijit/form/CheckBox","dijit/form/RadioButton","dojo/query","dojo/dom","dojo/dom-class","dojo/dom-construct","dojo/dom-style","dojo/on"],function(e,a,i,t,n,r,o,s,l,d,p,c,m,g,u,y,f,h,b,v,w){function L(a,i,t,n,r,o,s){if(map.addLayer(t),0==s.legendLabel){var l=document.createElement("style");l.type="text/css",l.innerHTML="[id*="+t.id+"] .esriLegendLayerLabel { display: none; }",document.getElementsByTagName("head")[0].appendChild(l)}if("aoi"==t.id&&w(t,"load",function(a){w(t,"click",function(a){aoiClicked=!0;var i=a.graphic.attributes.HYPERLINK_2;if("None"==i){var n=new e("${NAME}","Type: ${TYPE}
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");t.setInfoTemplate(n)}else{var n=new e("${NAME}","Type: ${TYPE}
Ramsar: click here
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");t.setInfoTemplate(n)}})}),S.push([r,camelize(n),t]),r){if(!$("#"+camelize(r)).length){var d;if("Data Source"==r)var d=$('
');else var d=$('
");d.click(function(e){d.find("i.glyphspan").toggleClass("fa-check-square-o fa-square-o"),$.each(S,function(e,a){var i=map.getLayer(a[2].id);if(a[0]==r)if($("#"+a[1]).find("i.glyphspan").hasClass("fa-dot-circle-o")&&d.find("i.glyphspan").hasClass("fa-check-square-o")){console.log("adding layer: ",a[1]), +map.addLayer(a[2]);var i=map.getLayer(a[2].id);i.setVisibility(!0)}else if(d.find("i.glyphspan").hasClass("fa-square-o")){console.log("removing layer: ",a[1]);var i=map.getLayer(a[2].id);i.setVisibility(!1)}})});var p=$('
');$("#toggle").append(p)}if(t.visible)var c=$('
");else var c=$('
");$("#"+camelize(r)).append(c),c.click(function(e){if($(this).find("i.glyphspan").hasClass("fa-circle-o")){$(this).find("i.glyphspan").toggleClass("fa-dot-circle-o fa-circle-o");var a=$(this)[0].id;$.each(S,function(e,i){if(i[0]==r)if(i[1]==a&&$("#"+camelize(r+" Root")).find("i.glyphspan").hasClass("fa-check-square-o")){console.log("adding layer: ",i[1]),map.addLayer(i[2]);var t=map.getLayer(i[2].id);t.setVisibility(!0)}else if(i[1]==a&&$("#"+camelize(r+" Root")).find("i.glyphspan").hasClass("fa-square-o"))console.log("group heading not checked");else{console.log("removing layer: ",i[1]);var t=map.getLayer(i[2].id);t.setVisibility(!1),$("#"+i[1]).find("i.glyphspan").hasClass("fa-dot-circle-o")&&$("#"+i[1]).find("i.glyphspan").toggleClass("fa-dot-circle-o fa-circle-o")}})}})}else if(s.includeInLayerList){if(t.visible&&void 0!==s.hasOpacitySlider&&1==s.hasOpacitySlider&&void 0!==s.moreinfo&&s.moreinfo)var c=$('
');else if(!t.visible&&void 0!==s.hasOpacitySlider&&1==s.hasOpacitySlider&&void 0!==s.moreinfo&&s.moreinfo)var c=$('
');else if(t.visible&&void 0!==s.hasOpacitySlider&&1==s.hasOpacitySlider)var c=$('
');else if(t.visible||void 0===s.hasOpacitySlider||1!=s.hasOpacitySlider)if(t.visible&&void 0!==s.moreinfo&&s.moreinfo)var c=$('
');else if(!t.visible&&void 0!==s.moreinfo&&s.moreinfo)var c=$('
');else if(t.visible)var c=$('
");else var c=$('
");else var c=$('
');c.click(function(e){$(this).find("i.glyphspan").toggleClass("fa-check-square-o fa-square-o"),$(this).find("button").button("toggle"),t.visible?t.setVisibility(!1):t.setVisibility(!0),s.otherLayersToggled&&$.each(s.otherLayersToggled,function(e,a){var i=map.getLayer(a);i.setVisibility(t.visible)})})}if(void 0!==i){var m=camelize(a);if(!$("#"+m).length){if(i)var g=$('
");else var g=$('
');$("#toggle").append(g)}if(r){if($("#"+m).append(d),$("#"+m).append(p),void 0!==s.moreinfo&&s.moreinfo){var u="#info"+camelize(r),y=$(u);y.click(function(e){window.open(s.moreinfo,"_blank"),e.preventDefault(),e.stopPropagation()})}if($("#opacity"+camelize(r)).length>0){var u="#opacity"+camelize(r),f=$(u);f.click(function(e){e.preventDefault(),e.stopPropagation(),$(".opacitySlider").remove();var a=map.getLayer(o.id).opacity,i=$('
');$("body").append(i),$("#slider")[0].value=100*a,$(".opacitySlider").css("left",event.clientX-180),$(".opacitySlider").css("top",event.clientY-50),$(".opacitySlider").mouseleave(function(){$(".opacitySlider").remove()}),$(".opacityClose").click(function(){$(".opacitySlider").remove()}),$("#slider").change(function(e){var a=$("#slider")[0].value/100;console.log("o: "+a),$("#opacityValue").html("Opacity: "+a),map.getLayer(o.id).setOpacity(a),s.otherLayersToggled&&$.each(s.otherLayersToggled,function(e,i){var t=map.getLayer(i);t.setOpacity(a)})})})}}else{if($("#"+m).append(c),void 0!==s.moreinfo&&s.moreinfo){var u="#info"+camelize(n),y=$(u);y.click(function(e){window.open(s.moreinfo,"_blank"),e.preventDefault(),e.stopPropagation()})}$("#opacity"+camelize(n)).length>0&&$("#opacity"+camelize(n)).click(function(e){e.preventDefault(),e.stopPropagation(),$(".opacitySlider").remove();var a=map.getLayer(o.id).opacity,i=$('
');$("body").append(i),$("#slider")[0].value=100*a,$(".opacitySlider").css("left",event.clientX-180),$(".opacitySlider").css("top",event.clientY-50),$(".opacitySlider").mouseleave(function(){$(".opacitySlider").remove()}),$(".opacityClose").click(function(){$(".opacitySlider").remove()}),$("#slider").change(function(e){var a=$("#slider")[0].value/100;console.log("o: "+a),$("#opacityValue").html("Opacity: "+a),map.getLayer(o.id).setOpacity(a),s.otherLayersToggled&&$.each(s.otherLayersToggled,function(e,i){var t=map.getLayer(i);t.setOpacity(a)})})})}}else if($("#toggle").append(c),void 0!==s.moreinfo&&s.moreinfo){var u="#info"+camelize(n),y=$(u);y.click(function(e){alert(e.currentTarget.id),e.preventDefault(),e.stopPropagation()})}}var S=(new m("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/Geometry/GeometryServer"),[]);$.each(allLayers,function(e,a){console.log("processing: ",a.groupHeading),$.each(a.layers,function(e,i){var t="";if(i.wimOptions.exclusiveGroupName&&(t=i.wimOptions.exclusiveGroupName),"agisFeature"===i.wimOptions.layerType){var n=new d(i.url,i.options);void 0!==i.wimOptions.renderer&&n.setRenderer(i.wimOptions.renderer),i.wimOptions&&1==i.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),L(a.groupHeading,a.showGroupHeading,n,e,t,i.options,i.wimOptions)}else if("agisWMS"===i.wimOptions.layerType){var n=new p(i.url,{resourceInfo:i.options.resourceInfo,visibleLayers:i.options.visibleLayers},i.options);i.wimOptions&&1==i.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),L(a.groupHeading,a.showGroupHeading,n,e,t,i.options,i.wimOptions)}else if("agisDynamic"===i.wimOptions.layerType){var n=new s(i.url,i.options);if(i.visibleLayers&&n.setVisibleLayers(i.visibleLayers),i.wimOptions&&i.wimOptions.layerDefinitions){var r=[];$.each(i.wimOptions.layerDefinitions,function(e,a){r[e]=a}),n.setLayerDefinitions(r)}i.wimOptions&&1==i.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),L(a.groupHeading,a.showGroupHeading,n,e,t,i.options,i.wimOptions)}else if("agisImage"===i.wimOptions.layerType){var n=new l(i.url,i.options);i.wimOptions&&1==i.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),i.visibleLayers&&n.setVisibleLayers(i.visibleLayers),L(a.groupHeading,a.showGroupHeading,n,e,t,i.options,i.wimOptions)}})})})}),$(".close-alert").click(function(){$(this).parent().slideUp(250)}),$(document).ready(function(){}); \ No newline at end of file diff --git a/src/scripts/layers.js b/src/scripts/layers.js index 110c5aa..2775c66 100644 --- a/src/scripts/layers.js +++ b/src/scripts/layers.js @@ -228,6 +228,42 @@ require([ //'renderer': renderer } }, + 'FWS Managed Lands Centroids' : { //CENTROIDS + 'url': 'https://services.arcgis.com/QVENGdaPbd4LUkLV/ArcGIS/rest/services/FWSCentroids/FeatureServer/0', + 'options': { + 'id': 'fwsCentroids', + 'opacity': 0.75, + 'visible': false + }, + 'wimOptions': { + 'type': 'layer', + 'layerType': 'agisFeature', + 'includeInLayerList': true, + 'zoomScale': 144448, + 'hasOpacitySlider': true, + 'moreinfo': 'http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html', + 'includeLegend' : true, + 'esriLegendLabel': false + } + }, + 'FWS Managed Lands Tracts' : { //REALTY TRACTS + 'url': 'https://services.arcgis.com/QVENGdaPbd4LUkLV/ArcGIS/rest/services/FWSInterest/FeatureServer/1', + 'options': { + 'id': 'fwsTracts', + 'opacity': 0.75, + 'visible': false + }, + 'wimOptions': { + 'type': 'layer', + 'layerType': 'agisFeature', + 'includeInLayerList': true, + 'zoomScale': 144448, + 'hasOpacitySlider': true, + 'moreinfo': 'http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html', + 'includeLegend' : true, + 'esriLegendLabel': false + } + }, 'FWS Managed Lands' : { 'url': 'https://gis.fws.gov/ArcGIS/rest/services/FWS_Refuge_Boundaries/MapServer', 'visibleLayers': [0,1,3], From 622c4ffebe38581f87ef47dc7d4800af85a165a1 Mon Sep 17 00:00:00 2001 From: Estes Date: Thu, 25 Jun 2020 16:04:28 -0700 Subject: [PATCH 2/4] tweaks to new fws managed lands layers with labels --- build/index.html | 6 ++-- build/scripts/combined.js | 4 +-- src/index.html | 6 ++-- src/scripts/core.js | 24 +++++++++++++++- src/scripts/layers.js | 59 ++++++++++++++++++++++++++------------- 5 files changed, 71 insertions(+), 28 deletions(-) diff --git a/build/index.html b/build/index.html index d7be242..09edfaa 100644 --- a/build/index.html +++ b/build/index.html @@ -7,8 +7,8 @@ - - + + @@ -16,7 +16,7 @@ - + diff --git a/build/scripts/combined.js b/build/scripts/combined.js index 1688ea8..3a9232a 100644 --- a/build/scripts/combined.js +++ b/build/scripts/combined.js @@ -1,2 +1,2 @@ -function addCommas(e){e+="";for(var a=e.split("."),i=a[0],t=a.length>1?"."+a[1]:"",n=/(\d+)(\d{3})/;n.test(i);)i=i.replace(n,"$1,$2");return i+t}function camelize(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,a){return 0===a?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")}function stateSelected(){var e=$("#stateSelect")[0];if(e.selectedIndex>0){var a=e.options[e.selectedIndex].value,i=e.options[e.selectedIndex].label;$("#downloadState").html("Download Geodatabase and Shapefile data for "+i+"")}else $("#downloadState").html("")}function hucLinkListener(e){console.log(e),$.get("https://fwsprimary.wim.usgs.gov/downloadLoggingService/downloadLog.asmx/Log?huc="+e+",NWIV2",function(e){})}var allLayers,renderer;require(["esri/InfoTemplate","esri/renderers/UniqueValueRenderer","esri/symbols/PictureMarkerSymbol","dojo/domReady!"],function(e,a,i){var t=new i("./images/grn-pushpin.png",45,45);renderer=new a(t);var n=new e("${NAME}","Type: ${TYPE}
Ramsar: click here
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");allLayers=[{groupHeading:"ESRI dynamic map services",showGroupHeading:!1,includeInLayerList:!0,layers:{Wetlands:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands/MapServer",options:{id:"wetlands",opacity:.75,visible:!0},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,includeLegend:!0,legendLabel:!1,moreinfo:"https://www.fws.gov/wetlands/Data/Wetlands-Product-Summary.html",otherLayersToggled:["wetlandsStatus","wetlandsRaster"]}},"Wetlands Status":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands_Status/MapServer",options:{id:"wetlandsStatus",layers:[0],visible:!0,maxScale:285e3,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!1,includeLegend:!0,esriLegendLabel:!1}},"Wetlands ":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands_Raster/ImageServer",options:{id:"wetlandsRaster",visible:!0,maxScale:285e3,opacity:.6},wimOptions:{type:"layer",layerType:"agisImage",includeInLayerList:!1,includeLegend:!0,otherLayersToggled:["wetlands","wetlandsStatus"]}},Riparian:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Riparian/MapServer",visibleLayers:[0],options:{id:"riparian",opacity:.75,visible:!0},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/wetlands/Other/Riparian-Product-Summary.html",includeLegend:!0,legendLabel:!1}},"Riparian Mapping Areas":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Riparian/MapServer",visibleLayers:[1],options:{id:"riparianStatus",visible:!1,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/wetlands/Other/Riparian-Product-Summary.html",includeLegend:!0,legendLabel:!1}},HUC8:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/HUCs/MapServer",options:{id:"huc8",opacity:1,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!1,includeLegend:!0,esriLegendLabel:!1}}}},{groupHeading:"Data Source Group",showGroupHeading:!1,includeInLayerList:!0,moreinfo:"https://www.fws.gov/wetlands/Documents/Scalable-Wetland-Mapping-Fact-Sheet.pdf",otherLayersToggled:["sourceType","imageScale","imageYear"],layers:{"Source Type":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[1],options:{id:"sourceType",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["imageScale","imageYear"],legendLabel:!1}},"Image Scale":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[2],options:{id:"imageScale",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["sourceType","imageYear"],legendLabel:!1}},"Image Year":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[3],options:{id:"imageYear",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["sourceType","imageScale"],legendLabel:!1}}}},{groupHeading:"refuges and historic",showGroupHeading:!1,includeInLayerList:!0,layers:{"Areas of Interest":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Areas_of_Interest/MapServer/0",options:{id:"aoi",opacity:1,visible:!1,outFields:["*"],infoTemplate:n},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!0,hasOpacitySlider:!1,moreinfo:"https://www.fws.gov/wetlands/Data/metadata/FWS_Wetland_Areas_of_Interest.xml",includeLegend:!0}},"FWS Managed Lands Centroids":{url:"https://services.arcgis.com/QVENGdaPbd4LUkLV/ArcGIS/rest/services/FWSCentroids/FeatureServer/0",options:{id:"fwsCentroids",opacity:.75,visible:!1},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html",includeLegend:!0,esriLegendLabel:!1}},"FWS Managed Lands Tracts":{url:"https://services.arcgis.com/QVENGdaPbd4LUkLV/ArcGIS/rest/services/FWSInterest/FeatureServer/1",options:{id:"fwsTracts",opacity:.75,visible:!1},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html",includeLegend:!0,esriLegendLabel:!1}},"FWS Managed Lands":{url:"https://gis.fws.gov/ArcGIS/rest/services/FWS_Refuge_Boundaries/MapServer",visibleLayers:[0,1,3],options:{id:"fwsRefuges",opacity:.75,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html",includeLegend:!0,esriLegendLabel:!1}},"Historic Wetland Data":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Historic_Wetlands/MapServer",visibleLayers:[0,1],options:{id:"historic",visible:!1,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,hasOpacitySlider:!0,moreinfo:"https://www.fws.gov/wetlands/Data/Historic-Wetlands-Data.html",includeLegend:!0,legendLabel:!1}}}}]});var map,allLayers,maxLegendHeight,maxLegendDivHeight,printCount=0,legendLayers=[],measurement,identifyTask,identifyParams,aoiClicked=!1,initWetlandClicked=!1;require(["esri/map","esri/arcgis/utils","esri/config","esri/dijit/Geocoder","esri/dijit/HomeButton","esri/dijit/Legend","esri/dijit/LocateButton","esri/dijit/Measurement","esri/dijit/PopupTemplate","esri/graphic","esri/geometry/Extent","esri/geometry/Multipoint","esri/geometry/Point","esri/layers/ArcGISTiledMapServiceLayer","esri/renderers/UniqueValueRenderer","esri/SpatialReference","esri/symbols/PictureMarkerSymbol","esri/tasks/GeometryService","esri/tasks/IdentifyParameters","esri/tasks/IdentifyTask","esri/tasks/LegendLayer","esri/tasks/PrintTask","esri/tasks/PrintParameters","esri/tasks/PrintTemplate","esri/geometry/webMercatorUtils","esri/urlUtils","dojo/dom","dojo/dom-class","dojo/dnd/Moveable","dojo/query","dojo/on","dojo/domReady!"],function(e,a,i,t,n,r,o,s,l,d,p,c,m,g,u,y,f,h,b,v,w,L,S,I,T,E,k,_,D,x,O){function P(){$("#printModal").modal("show")}function C(){$("#getDataModal").modal("show")}function M(e){var a="";switch(e){case"CIR":a="color infrared";break;case"TC":a="true color";break;case"BW":a="black and white"}return a}function A(){K.activeGeocoder.searchExtent=null}function R(){A();var e=K.find();e.then(function(e){W(e)})}function N(e){F();var a=e.graphic?e.graphic:e.result.feature;a.setSymbol(X)}function W(e){if(e=e.results,e.length>0){F();for(var a=0;a  '+s+"

");$("#printJobsDiv").find("p.toRemove").remove(),$("#printModalBody").append(a),$("#printTitle").val(""),$("#printExecuteButton").button("reset")}function a(e){alert("Sorry, an unclear print error occurred. Please try refreshing the application to fix the problem")}var i=new S;i.map=map;var t=new I;t.exportOptions={width:500,height:400,dpi:300},t.format="PDF",t.layout="Letter ANSI A Landscape test",t.preserveScale=!1;var n=new w;n.layerId="wetlands";var r=new w;r.layerId="wetlandsRaster";var o=$("#printTitle").val();""==o?t.layoutOptions={titleText:"Wetlands",authorText:"National Wetlands Inventory (NWI)",copyrightText:"This page was produced by the NWI mapper",legendLayers:[n,r]}:t.layoutOptions={titleText:o,authorText:"National Wetlands Inventory (NWI)",copyrightText:"This page was produced by the NWI mapper",legendLayers:[n,r]};var s=t.layoutOptions.titleText;i.template=t;var l=new L("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task");l.execute(i,e,a),$.get("https://fwsprimary.wim.usgs.gov/pdfLoggingService/pdfLog.asmx/Log?printInfo="+map.getScale()+","+map.extent.xmin+","+map.extent.ymax+","+map.extent.xmax+","+map.extent.ymin+",NWIV2",function(e){})}function H(e,a){var i;document.getElementById&&(i=document.getElementById(e))&&i.style&&(i.style.cursor=a)}i.defaults.io.corsEnabledServers.push("fwsprimary.wim.usgs.gov"),esri.config.defaults.io.proxyUrl="https://fwsprimary.wim.usgs.gov/serviceProxy/proxy.ashx",i.defaults.geometryService=new h("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/Geometry/GeometryServer"),map=new e("mapDiv",{basemap:"hybrid",extent:new p(-14638882.654811008,2641706.3772205533,-6821514.898031538,6403631.161302788,new y({wkid:3857})),fitExtent:!0});var j=new n({map:map,extent:new p(-14638882.654811008,2641706.3772205533,-6821514.898031538,6403631.161302788,new y({wkid:3857}))},"homeButton");j.startup();var Y=new o({map:map,scale:4514},"locateButton");Y.startup(),measurement=new s({map:map,advancedLocationUnits:!0},k.byId("measurementDiv")),measurement.startup(),$(window).resize(function(){$("#legendCollapse").hasClass("in")?(maxLegendHeight=.9*$("#mapDiv").height(),$("#legendElement").css("height",maxLegendHeight),$("#legendElement").css("max-height",maxLegendHeight),maxLegendDivHeight=$("#legendElement").height()-parseInt($("#legendHeading").css("height").replace("px","")),$("#legendDiv").css("max-height",maxLegendDivHeight)):$("#legendElement").css("height","initial")}),$("#printNavButton").click(function(){P()}),$("#printExecuteButton").click(function(e){e.preventDefault(),$(this).button("loading"),U()}),$("#getDataButton").click(function(){C()}),$("#aboutLink").click(function(){$("#aboutModal").modal("show"),$("#aboutTab").trigger("click")}),$("#disclaimerLink").click(function(){$("#aboutModal").modal("show"),$("#disclaimerTab").trigger("click")}),$("#dataLimitationsLink").click(function(){$("#aboutModal").modal("show"),$("#dataLimitationsTab").trigger("click")}),$("#userCautionLink").click(function(){$("#aboutModal").modal("show"),$("#userCautionTab").trigger("click")}),$(".docs").hide(),O(map,"load",function(){var e=map.getScale().toFixed(0);$("#scale")[0].innerHTML=addCommas(e);var a=T.webMercatorToGeographic(map.extent.getCenter());$("#latitude").html(a.y.toFixed(3)),$("#longitude").html(a.x.toFixed(3))}),O(map,"zoom-end",function(){var e=map.getScale().toFixed(0);$("#scale")[0].innerHTML=addCommas(e)}),O(map,"mouse-move",function(e){if($("#mapCenterLabel").css("display","none"),null!=e.mapPoint){var a=T.webMercatorToGeographic(e.mapPoint);$("#latitude").html(a.y.toFixed(3)),$("#longitude").html(a.x.toFixed(3))}}),O(map,"pan-end",function(){$("#mapCenterLabel").css("display","inline");var e=T.webMercatorToGeographic(map.extent.getCenter());$("#latitude").html(e.y.toFixed(3)),$("#longitude").html(e.x.toFixed(3))});var z=new g("https://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer"),B=new g("https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer");O(k.byId("btnStreets"),"click",function(){map.setBasemap("streets"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnSatellite"),"click",function(){map.setBasemap("satellite"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnHybrid"),"click",function(){map.setBasemap("hybrid"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnTerrain"),"click",function(){map.setBasemap("terrain"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnGray"),"click",function(){map.setBasemap("gray"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnNatGeo"),"click",function(){map.setBasemap("national-geographic"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnOSM"),"click",function(){map.setBasemap("osm"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnTopo"),"click",function(){map.setBasemap("topo"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnNatlMap"),"click",function(){map.addLayer(B,1),map.removeLayer(z)}),O(k.byId("btnUsgsTopo"),"click",function(){map.addLayer(z,1),map.removeLayer(B)}),$("#wetlandDiv").lobiPanel({unpin:!1,reload:!1,minimize:!1,close:!1,expand:!1,editTitle:!1,maxWidth:600,maxHeight:400}),$("#wetlandDiv .dropdown").prepend("
"),$("#wetlandClose").click(function(){$("#wetlandDiv").css("visibility","hidden"),map.graphics.clear()}),identifyParams=new b,identifyParams.tolerance=0,identifyParams.returnGeometry=!0,identifyParams.layerOption=b.LAYER_OPTION_ALL,identifyParams.width=map.width,identifyParams.height=map.height,identifyTask=new v(allLayers[0].layers.Wetlands.url);var q=x(".title",map.infoWindow.domNode)[0],V=new D(map.infoWindow.domNode,{handle:q});O(V,"FirstMove",function(){var e=x(".outerPointer",map.infoWindow.domNode)[0];_.add(e,"hidden");var e=x(".pointer",map.infoWindow.domNode)[0];_.add(e,"hidden")}.bind(this)),O(map,"click",function(e){if(1==aoiClicked)return void(aoiClicked=!1);if(null==measurement.activeTool)if(map.graphics.clear(),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click"),$("#wetlandDiv").css("visibility","hidden"),identifyParams.geometry=e.mapPoint,identifyParams.mapExtent=map.extent,map.getLevel()>=12&&0==$("#huc-download-alert")[0].scrollHeight){u=new v(allLayers[0].layers.Wetlands.url);var a=u.execute(identifyParams),i=new b;i.returnGeometry=!0,i.tolerance=0,i.width=map.width,i.height=map.height,i.geometry=e.mapPoint,i.layerOption=b.LAYER_OPTION_ALL,i.mapExtent=map.extent,i.layerIds=[0,1],H("mainDiv","wait"),map.setCursor("wait");var t=$("#wetlandDiv").data("lobiPanel"),n=$(document).height(),r=$(document).width(),o=.9,s=n*o,l=r*o,d=600,p=325;500>n&&($("#wetlandDiv").height(s),p=$("#floodToolsDiv").height()-50),500>r&&($("#wetlandDiv").width(l),d=$("#floodToolsDiv").width()-50);var c=.5*r-.5*$("#wetlandDiv").width(),m=.5*n-.5*$("#wetlandDiv").height();0==initWetlandClicked&&t.setPosition(c,m),1==t.isPinned()&&t.unpin(),initWetlandClicked=!0,$(".docs").hide(),$(".docItems").empty(),$("#reportInfo .panel-heading").addClass("loading-hide"),$("#reportInfo .panel-body").addClass("loading-hide"),$("#wetlandDiv").addClass("loading-background"),$(".tab-pane").addClass("hidden-loading"),a.addCallback(function(a){function t(e){var a;return a=0==e||""==e?"Link":e}if(a.length>1){var n,r,o,s,l=new b;l.returnGeometry=!1,l.tolerance=0,l.width=map.width,l.height=map.height,l.geometry=e.mapPoint,l.layerOption=b.LAYER_OPTION_ALL,l.mapExtent=map.extent,l.layerIds=[0,4];var d=new v(allLayers[1].layers["Source Type"].url),p=d.execute(l);p.addCallback(function(e){if(e.length>=1){for(var a=0;a"+t.PDF_NAME+"")):($("#"+e[i].value.toLowerCase()+"Docs").show(),$("#"+e[i].value.toLowerCase()+"Docs .docItems").append(""+t.Title+""))}}$("#reportInfo .panel-heading").removeClass("loading-hide"),$("#reportInfo .panel-body").removeClass("loading-hide"),$("#wetlandDiv").removeClass("loading-background"),$(".tab-pane").removeClass("hidden-loading")}),$("#wetlandTab").trigger("click"),$("#wetlandDiv").css("visibility","visible");for(var c=0;c10?$("#imageScalePopup").html("The wetlands and deepwater habitats in this area were photo interpreted using 1:"+addCommas(s.IMAGE_SCALE)+" scale, "):0!=s.IMAGE_SCALE&&$("#imageScalePopup").html("The wetlands and deepwater habitats in this area were photo interpreted using "+s.IMAGE_SCALE+" meter (or less) digital, "):$("#imageScalePopup").html(""),"Scalable"==s.SOURCE_TYPE?$("#sourceTypePopup").html("The data in this area are considered an interim scalable map product. Click here for a full description of Scalable Wetland Mapping. "):"Null"==s.SOURCE_TYPE?$("#sourceTypePopup").html("Photo interpretation information is not available for this project."):$("#sourceTypePopup").html(""+M(s.SOURCE_TYPE)+" imagery from "+t(s.IMAGE_YR)+". "),"None"!=s.SUPPMAPINFO?($("#suppMapInfo").empty(),$("#suppMapInfo").append('Click here for project specific mapping conventions and information.')):$("#suppMapInfo").empty();var y=["ATTRIBUTE","SYSTEM","SYSTEM_NAME","SYSTEM_DEFINITION","SUBSYSTEM","SUBSYSTEM_NAME","SUBSYSTEM_DEFINITION","CLASS","CLASS_NAME","CLASS_DEFINITION","SUBCLASS","SUBCLASS_NAME","SUBCLASS_DEFINITION","SPLIT_CLASS","SPLIT_CLASS_NAME","SPLIT_CLASS_DEFINITION","SPLIT_SUBCLASS","SPLIT_SUBCLASS_NAME","SPLIT_SUBCLASS_DEFINITION","WATER_REGIME","WATER_REGIME_NAME","WATER_REGIME_SUBGROUP","WATER_REGIME_DEFINITION","MODIFIER_1","MODIFIER_1_NAME","MODIFIER_1_GROUP","MODIFIER_1_SUBGROUP","MODIFIER_1_DEFINITION","MODIFIER_2","MODIFIER_2_NAME","MODIFIER_2_GROUP","MODIFIER_2_SUBGROUP","MODIFIER_2_DEFINITION","MODIFIER_3","MODIFIER_3_NAME","MODIFIER_3_GROUP","MODIFIER_3_SUBGROUP","MODIFIER_3_DEFINITION"];$.each(y,function(e){var a=y[e],i=o[a];"Null"!=i?"SPLIT_CLASS"!=a&&"SPLIT_CLASS_NAME"!=a&&"SPLIT_CLASS_DEFINITION"!=a||o.CLASS!=o.SPLIT_CLASS?($("#des"+a).html(o[a]),$("#des"+a).show(),$("#des"+a).parent().show()):$("#SPLIT_CLASS_GROUP").hide():$("#des"+a).parent().hasClass("decoder-group")&&$("#des"+a).parent().hide()});var f=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,f),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=T.webMercatorToGeographic(n.geometry),i=a.getExtent();map.setExtent(i,!0)}),$("#zoomProjectLink").click(function(e){var a=T.webMercatorToGeographic(r.geometry),i=a.getExtent();map.setExtent(i,!0);var t=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));r.geometry.spatialReference=map.spatialReference;var n=r;n.setSymbol(t),map.graphics.add(n)})}else if(a.length<=1){u=new v(allLayers[0].layers.Riparian.url);var h=u.execute(identifyParams);h.addCallback(function(a){if(a.length>1){for(var t,n,r,o,s=0;sclick here";var c=new esri.InfoTemplate("Riparian","Classification: "+r.ATTRIBUTE+" (decode)

Wetland Type: "+r.WETLAND_TYPE+"
Acres: "+Number(r.ACRES).toFixed(2)+"
Image Date(s): "+o.IMAGE_DATE+"
Project Metadata:"+p+"

Zoom to wetland

");$("#acreage").text(Number(r.ACRES).toFixed(2)),$("#wetlandCode").text(r.ATTRIBUTE),$("#wetlandType").text(r.WETLAND_TYPE),$("#decoderLink").click(function(e){$("#descriptionTab").trigger("click")}),$("#imageScalePopup").text(addCommas(o.IMAGE_SCALE)),$("#sourceTypePopup").text(M(o.SOURCE_TYPE)),0==o.IMAGE_DATE?$("#imageDate").append("Link"):$("#imageDate").text(o.IMAGE_DATE),$("#suppMapInfoLink").attr("href",o.SUPPMAPINFO),t.setInfoTemplate(c),map.infoWindow.setFeatures([t]),map.infoWindow.show(e.mapPoint);var m=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,m),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=T.webMercatorToGeographic(t.geometry),i=a.getExtent();map.setExtent(i,!0)}),$("#zoomProjectLink").click(function(e){var a=T.webMercatorToGeographic(n.geometry),i=a.getExtent();map.setExtent(i,!0);var t=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));n.geometry.spatialReference=map.spatialReference;var r=n;r.setSymbol(t),map.graphics.add(r)})}else if(a.length<=1){var g=new v(allLayers[2].layers["Historic Wetland Data"].url),u=g.execute(i);u.addCallback(function(a){if(a.length>=1){for(var i,t,n,r=0;rclick here",(""==n.IMAGE_DATE||"0"==n.IMAGE_DATE||0==n.IMAGE_DATE)&&(n.IMAGE_DATE=l);var d=new esri.InfoTemplate("Historic Wetland","

Wetland Type: "+t.WETLAND_TYPE+"
Acres: "+Number(t.ACRES).toFixed(2)+"
Project Metadata:"+l+"

Zoom to wetland

");i.setInfoTemplate(d),map.infoWindow.setFeatures([i]),map.infoWindow.show(e.mapPoint,map.getInfoWindowAnchor(e.screenPoint));var p=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,p),$("infoWindowLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=T.webMercatorToGeographic(i.geometry),t=a.getExtent();map.setExtent(t,!0)})}else H("mainDiv","default"),map.setCursor("default"),map.infoWindow.hide()})}})}})}else if($("#huc-download-alert")[0].scrollHeight>0){var g=new b;g.returnGeometry=!0,g.tolerance=0,g.width=map.width,g.height=map.height,g.geometry=e.mapPoint,g.layerOption=b.LAYER_OPTION_TOP,g.mapExtent=map.extent,g.spatialReference=map.spatialReference;var u=new v(allLayers[0].layers.HUC8.url),y=u.execute(g);y.addCallback(function(e){if(e.length>=1){var a;a=e[0].feature;var i=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));a.geometry.spatialReference=map.spatialReference;var t=a;t.setSymbol(i),map.graphics.add(t);var n=T.webMercatorToGeographic(a.geometry),r=n.getExtent();map.setExtent(r,!0);var o=e[0].feature.attributes.HUC8,s=e[0].feature.attributes.Name;dojo.byId("innerAlert").innerHTML="

Download Data

Click the link below to download data for "+s+" watershed

HUC "+o+"

"}})}}),$(document).on("click","#showHUCs",function(){event.preventDefault(),$("#getDataModal").modal("hide"),$("#huc-download-alert").slideDown(250),map.getLayer("huc8").setVisibility(!0),dojo.byId("innerAlert").innerHTML="

Download Data

Please review the Data Download (www.fws.gov/wetlands/Data/Data-Download.html) page for information on how to download data, what is included in the download and data use limitations and disclaimer.


Click the map to select a watershed from which to extract wetland data.

"});var K=new t({value:"",maxLocations:25,autoComplete:!0,arcgisGeocoder:!0,autoNavigate:!1,map:map},"geosearch");K.startup(),K.on("select",N),K.on("findResults",W),K.on("clear",F),O(K.inputNode,"keydown",function(e){13==e.keyCode&&A()});var X=G("../images/purple-pin.png",0,12,13,24);map.on("load",function(){map.infoWindow.set("highlight",!1),map.infoWindow.set("titleInBody",!1)}),O(k.byId("btnGeosearch"),"click",R),$(document).ready(function(){function e(){$("#geosearchModal").modal("show")}function a(){$("#aboutModal").modal("show")}$("#geosearchNav").click(function(){e()}),$("#aboutNav").click(function(){a()}),$("#html").niceScroll(),$("#sidebar").niceScroll(),$("#sidebar").scroll(function(){$("#sidebar").getNiceScroll().resize()}),maxLegendHeight=.9*$("#mapDiv").height(),$("#legendElement").css("max-height",maxLegendHeight),maxLegendDivHeight=maxLegendHeight-parseInt($("#legendHeading").css("height").replace("px","")),$("#legendDiv").css("max-height",maxLegendDivHeight),$("#legendCollapse").on("shown.bs.collapse",function(){if(0==legendDiv.innerHTML.length){var e=new r({map:map,layerInfos:legendLayers},"legendDiv");e.startup(),$("#legendDiv").niceScroll()}}),$("#legendCollapse").on("hide.bs.collapse",function(){$("#legendElement").css("height","initial")}),$("#measurementCollapse").on("shown.bs.collapse",function(){$("#measureLabel").show()}),$("#measurementCollapse").on("hide.bs.collapse",function(){window.innerWidth<=767&&$("#measureLabel").hide()})}),require(["esri/InfoTemplate","esri/tasks/locator","esri/tasks/query","esri/tasks/QueryTask","esri/graphicsUtils","esri/geometry/Point","esri/geometry/Extent","esri/layers/ArcGISDynamicMapServiceLayer","esri/layers/ArcGISImageServiceLayer","esri/layers/FeatureLayer","esri/layers/WMSLayer","esri/layers/WMSLayerInfo","esri/tasks/GeometryService","dijit/form/CheckBox","dijit/form/RadioButton","dojo/query","dojo/dom","dojo/dom-class","dojo/dom-construct","dojo/dom-style","dojo/on"],function(e,a,i,t,n,r,o,s,l,d,p,c,m,g,u,y,f,h,b,v,w){function L(a,i,t,n,r,o,s){if(map.addLayer(t),0==s.legendLabel){var l=document.createElement("style");l.type="text/css",l.innerHTML="[id*="+t.id+"] .esriLegendLayerLabel { display: none; }",document.getElementsByTagName("head")[0].appendChild(l)}if("aoi"==t.id&&w(t,"load",function(a){w(t,"click",function(a){aoiClicked=!0;var i=a.graphic.attributes.HYPERLINK_2;if("None"==i){var n=new e("${NAME}","Type: ${TYPE}
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");t.setInfoTemplate(n)}else{var n=new e("${NAME}","Type: ${TYPE}
Ramsar: click here
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");t.setInfoTemplate(n)}})}),S.push([r,camelize(n),t]),r){if(!$("#"+camelize(r)).length){var d;if("Data Source"==r)var d=$('
');else var d=$('
");d.click(function(e){d.find("i.glyphspan").toggleClass("fa-check-square-o fa-square-o"),$.each(S,function(e,a){var i=map.getLayer(a[2].id);if(a[0]==r)if($("#"+a[1]).find("i.glyphspan").hasClass("fa-dot-circle-o")&&d.find("i.glyphspan").hasClass("fa-check-square-o")){console.log("adding layer: ",a[1]), -map.addLayer(a[2]);var i=map.getLayer(a[2].id);i.setVisibility(!0)}else if(d.find("i.glyphspan").hasClass("fa-square-o")){console.log("removing layer: ",a[1]);var i=map.getLayer(a[2].id);i.setVisibility(!1)}})});var p=$('
');$("#toggle").append(p)}if(t.visible)var c=$('
");else var c=$('
");$("#"+camelize(r)).append(c),c.click(function(e){if($(this).find("i.glyphspan").hasClass("fa-circle-o")){$(this).find("i.glyphspan").toggleClass("fa-dot-circle-o fa-circle-o");var a=$(this)[0].id;$.each(S,function(e,i){if(i[0]==r)if(i[1]==a&&$("#"+camelize(r+" Root")).find("i.glyphspan").hasClass("fa-check-square-o")){console.log("adding layer: ",i[1]),map.addLayer(i[2]);var t=map.getLayer(i[2].id);t.setVisibility(!0)}else if(i[1]==a&&$("#"+camelize(r+" Root")).find("i.glyphspan").hasClass("fa-square-o"))console.log("group heading not checked");else{console.log("removing layer: ",i[1]);var t=map.getLayer(i[2].id);t.setVisibility(!1),$("#"+i[1]).find("i.glyphspan").hasClass("fa-dot-circle-o")&&$("#"+i[1]).find("i.glyphspan").toggleClass("fa-dot-circle-o fa-circle-o")}})}})}else if(s.includeInLayerList){if(t.visible&&void 0!==s.hasOpacitySlider&&1==s.hasOpacitySlider&&void 0!==s.moreinfo&&s.moreinfo)var c=$('
');else if(!t.visible&&void 0!==s.hasOpacitySlider&&1==s.hasOpacitySlider&&void 0!==s.moreinfo&&s.moreinfo)var c=$('
');else if(t.visible&&void 0!==s.hasOpacitySlider&&1==s.hasOpacitySlider)var c=$('
');else if(t.visible||void 0===s.hasOpacitySlider||1!=s.hasOpacitySlider)if(t.visible&&void 0!==s.moreinfo&&s.moreinfo)var c=$('
');else if(!t.visible&&void 0!==s.moreinfo&&s.moreinfo)var c=$('
');else if(t.visible)var c=$('
");else var c=$('
");else var c=$('
');c.click(function(e){$(this).find("i.glyphspan").toggleClass("fa-check-square-o fa-square-o"),$(this).find("button").button("toggle"),t.visible?t.setVisibility(!1):t.setVisibility(!0),s.otherLayersToggled&&$.each(s.otherLayersToggled,function(e,a){var i=map.getLayer(a);i.setVisibility(t.visible)})})}if(void 0!==i){var m=camelize(a);if(!$("#"+m).length){if(i)var g=$('
");else var g=$('
');$("#toggle").append(g)}if(r){if($("#"+m).append(d),$("#"+m).append(p),void 0!==s.moreinfo&&s.moreinfo){var u="#info"+camelize(r),y=$(u);y.click(function(e){window.open(s.moreinfo,"_blank"),e.preventDefault(),e.stopPropagation()})}if($("#opacity"+camelize(r)).length>0){var u="#opacity"+camelize(r),f=$(u);f.click(function(e){e.preventDefault(),e.stopPropagation(),$(".opacitySlider").remove();var a=map.getLayer(o.id).opacity,i=$('
');$("body").append(i),$("#slider")[0].value=100*a,$(".opacitySlider").css("left",event.clientX-180),$(".opacitySlider").css("top",event.clientY-50),$(".opacitySlider").mouseleave(function(){$(".opacitySlider").remove()}),$(".opacityClose").click(function(){$(".opacitySlider").remove()}),$("#slider").change(function(e){var a=$("#slider")[0].value/100;console.log("o: "+a),$("#opacityValue").html("Opacity: "+a),map.getLayer(o.id).setOpacity(a),s.otherLayersToggled&&$.each(s.otherLayersToggled,function(e,i){var t=map.getLayer(i);t.setOpacity(a)})})})}}else{if($("#"+m).append(c),void 0!==s.moreinfo&&s.moreinfo){var u="#info"+camelize(n),y=$(u);y.click(function(e){window.open(s.moreinfo,"_blank"),e.preventDefault(),e.stopPropagation()})}$("#opacity"+camelize(n)).length>0&&$("#opacity"+camelize(n)).click(function(e){e.preventDefault(),e.stopPropagation(),$(".opacitySlider").remove();var a=map.getLayer(o.id).opacity,i=$('
');$("body").append(i),$("#slider")[0].value=100*a,$(".opacitySlider").css("left",event.clientX-180),$(".opacitySlider").css("top",event.clientY-50),$(".opacitySlider").mouseleave(function(){$(".opacitySlider").remove()}),$(".opacityClose").click(function(){$(".opacitySlider").remove()}),$("#slider").change(function(e){var a=$("#slider")[0].value/100;console.log("o: "+a),$("#opacityValue").html("Opacity: "+a),map.getLayer(o.id).setOpacity(a),s.otherLayersToggled&&$.each(s.otherLayersToggled,function(e,i){var t=map.getLayer(i);t.setOpacity(a)})})})}}else if($("#toggle").append(c),void 0!==s.moreinfo&&s.moreinfo){var u="#info"+camelize(n),y=$(u);y.click(function(e){alert(e.currentTarget.id),e.preventDefault(),e.stopPropagation()})}}var S=(new m("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/Geometry/GeometryServer"),[]);$.each(allLayers,function(e,a){console.log("processing: ",a.groupHeading),$.each(a.layers,function(e,i){var t="";if(i.wimOptions.exclusiveGroupName&&(t=i.wimOptions.exclusiveGroupName),"agisFeature"===i.wimOptions.layerType){var n=new d(i.url,i.options);void 0!==i.wimOptions.renderer&&n.setRenderer(i.wimOptions.renderer),i.wimOptions&&1==i.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),L(a.groupHeading,a.showGroupHeading,n,e,t,i.options,i.wimOptions)}else if("agisWMS"===i.wimOptions.layerType){var n=new p(i.url,{resourceInfo:i.options.resourceInfo,visibleLayers:i.options.visibleLayers},i.options);i.wimOptions&&1==i.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),L(a.groupHeading,a.showGroupHeading,n,e,t,i.options,i.wimOptions)}else if("agisDynamic"===i.wimOptions.layerType){var n=new s(i.url,i.options);if(i.visibleLayers&&n.setVisibleLayers(i.visibleLayers),i.wimOptions&&i.wimOptions.layerDefinitions){var r=[];$.each(i.wimOptions.layerDefinitions,function(e,a){r[e]=a}),n.setLayerDefinitions(r)}i.wimOptions&&1==i.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),L(a.groupHeading,a.showGroupHeading,n,e,t,i.options,i.wimOptions)}else if("agisImage"===i.wimOptions.layerType){var n=new l(i.url,i.options);i.wimOptions&&1==i.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),i.visibleLayers&&n.setVisibleLayers(i.visibleLayers),L(a.groupHeading,a.showGroupHeading,n,e,t,i.options,i.wimOptions)}})})})}),$(".close-alert").click(function(){$(this).parent().slideUp(250)}),$(document).ready(function(){}); \ No newline at end of file +function addCommas(e){e+="";for(var a=e.split("."),t=a[0],i=a.length>1?"."+a[1]:"",n=/(\d+)(\d{3})/;n.test(t);)t=t.replace(n,"$1,$2");return t+i}function camelize(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,a){return 0===a?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")}function stateSelected(){var e=$("#stateSelect")[0];if(e.selectedIndex>0){var a=e.options[e.selectedIndex].value,t=e.options[e.selectedIndex].label;$("#downloadState").html("Download Geodatabase and Shapefile data for "+t+"")}else $("#downloadState").html("")}function hucLinkListener(e){console.log(e),$.get("https://fwsprimary.wim.usgs.gov/downloadLoggingService/downloadLog.asmx/Log?huc="+e+",NWIV2",function(e){})}var allLayers,tractRenderer,centroidRenderer;require(["esri/Color","esri/InfoTemplate","esri/layers/LabelClass","esri/renderers/SimpleRenderer","esri/symbols/SimpleFillSymbol","esri/symbols/SimpleLineSymbol","esri/symbols/SimpleMarkerSymbol","esri/symbols/TextSymbol","dojo/domReady!"],function(e,a,t,i,n,r,o,s){var l=new o(o.STYLE_CIRCLE,5,new r(r.STYLE_SOLID,new e([255,255,255]),.5),new e([0,0,0,1]));centroidRenderer=new i(l);var d=new n(n.STYLE_SOLID,new r(r.STYLE_SOLID,new e([0,0,0]),.5),new e([115,178,115,.75]));tractRenderer=new i(d);var p=new a("${NAME}","Type: ${TYPE}
Ramsar: click here
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");allLayers=[{groupHeading:"ESRI dynamic map services",showGroupHeading:!1,includeInLayerList:!0,layers:{Wetlands:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands/MapServer",options:{id:"wetlands",opacity:.75,visible:!0},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,includeLegend:!0,legendLabel:!1,moreinfo:"https://www.fws.gov/wetlands/Data/Wetlands-Product-Summary.html",otherLayersToggled:["wetlandsStatus","wetlandsRaster"]}},"Wetlands Status":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands_Status/MapServer",options:{id:"wetlandsStatus",layers:[0],visible:!0,maxScale:285e3,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!1,includeLegend:!0,esriLegendLabel:!1}},"Wetlands ":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands_Raster/ImageServer",options:{id:"wetlandsRaster",visible:!0,maxScale:285e3,opacity:.6},wimOptions:{type:"layer",layerType:"agisImage",includeInLayerList:!1,includeLegend:!0,otherLayersToggled:["wetlands","wetlandsStatus"]}},Riparian:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Riparian/MapServer",visibleLayers:[0],options:{id:"riparian",opacity:.75,visible:!0},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/wetlands/Other/Riparian-Product-Summary.html",includeLegend:!0,legendLabel:!1}},"Riparian Mapping Areas":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Riparian/MapServer",visibleLayers:[1],options:{id:"riparianStatus",visible:!1,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/wetlands/Other/Riparian-Product-Summary.html",includeLegend:!0,legendLabel:!1}},HUC8:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/HUCs/MapServer",options:{id:"huc8",opacity:1,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!1,includeLegend:!0,esriLegendLabel:!1}}}},{groupHeading:"Data Source Group",showGroupHeading:!1,includeInLayerList:!0,moreinfo:"https://www.fws.gov/wetlands/Documents/Scalable-Wetland-Mapping-Fact-Sheet.pdf",otherLayersToggled:["sourceType","imageScale","imageYear"],layers:{"Source Type":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[1],options:{id:"sourceType",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["imageScale","imageYear"],legendLabel:!1}},"Image Scale":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[2],options:{id:"imageScale",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["sourceType","imageYear"],legendLabel:!1}},"Image Year":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[3],options:{id:"imageYear",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["sourceType","imageScale"],legendLabel:!1}}}},{groupHeading:"refuges and historic",showGroupHeading:!1,includeInLayerList:!0,layers:{"Areas of Interest":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Areas_of_Interest/MapServer/0",options:{id:"aoi",opacity:1,visible:!1,outFields:["*"],infoTemplate:p},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!0,hasOpacitySlider:!1,moreinfo:"https://www.fws.gov/wetlands/Data/metadata/FWS_Wetland_Areas_of_Interest.xml",includeLegend:!0}},"FWS Managed Lands Centroids":{url:"https://services.arcgis.com/QVENGdaPbd4LUkLV/ArcGIS/rest/services/FWSCentroids/FeatureServer/0",options:{id:"fwsCentroids",opacity:.75,maxScale:18e6,visible:!1},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!1,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html",includeLegend:!0,esriLegendLabel:!1,renderer:centroidRenderer}},"FWS Managed Lands Tracts":{url:"https://services.arcgis.com/QVENGdaPbd4LUkLV/arcgis/rest/services/FWSApproved_Authoritative/FeatureServer/1",options:{id:"fwsTracts",opacity:.75,minScale:18e6,visible:!1,outFields:["*"],showLabels:!0},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html",otherLayersToggled:["fwsCentroids"],includeLegend:!0,esriLegendLabel:!1,renderer:tractRenderer}},"Historic Wetland Data":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Historic_Wetlands/MapServer",visibleLayers:[0,1],options:{id:"historic",visible:!1,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,hasOpacitySlider:!0,moreinfo:"https://www.fws.gov/wetlands/Data/Historic-Wetlands-Data.html",includeLegend:!0,legendLabel:!1}}}}]});var map,allLayers,maxLegendHeight,maxLegendDivHeight,printCount=0,legendLayers=[],measurement,identifyTask,identifyParams,aoiClicked=!1,initWetlandClicked=!1;require(["esri/map","esri/arcgis/utils","esri/config","esri/dijit/Geocoder","esri/dijit/HomeButton","esri/dijit/Legend","esri/dijit/LocateButton","esri/dijit/Measurement","esri/dijit/PopupTemplate","esri/graphic","esri/geometry/Extent","esri/geometry/Multipoint","esri/geometry/Point","esri/layers/ArcGISTiledMapServiceLayer","esri/renderers/UniqueValueRenderer","esri/SpatialReference","esri/symbols/PictureMarkerSymbol","esri/tasks/GeometryService","esri/tasks/IdentifyParameters","esri/tasks/IdentifyTask","esri/tasks/LegendLayer","esri/tasks/PrintTask","esri/tasks/PrintParameters","esri/tasks/PrintTemplate","esri/geometry/webMercatorUtils","esri/urlUtils","dojo/dom","dojo/dom-class","dojo/dnd/Moveable","dojo/query","dojo/on","dojo/domReady!"],function(e,a,t,i,n,r,o,s,l,d,p,c,m,g,y,u,f,h,b,v,w,L,S,T,I,E,k,_,D,x,O){function C(){$("#printModal").modal("show")}function P(){$("#getDataModal").modal("show")}function M(e){var a="";switch(e){case"CIR":a="color infrared";break;case"TC":a="true color";break;case"BW":a="black and white"}return a}function A(){K.activeGeocoder.searchExtent=null}function R(){A();var e=K.find();e.then(function(e){W(e)})}function N(e){F();var a=e.graphic?e.graphic:e.result.feature;a.setSymbol(X)}function W(e){if(e=e.results,e.length>0){F();for(var a=0;a  '+s+"

");$("#printJobsDiv").find("p.toRemove").remove(),$("#printModalBody").append(a),$("#printTitle").val(""),$("#printExecuteButton").button("reset")}function a(e){alert("Sorry, an unclear print error occurred. Please try refreshing the application to fix the problem")}var t=new S;t.map=map;var i=new T;i.exportOptions={width:500,height:400,dpi:300},i.format="PDF",i.layout="Letter ANSI A Landscape test",i.preserveScale=!1;var n=new w;n.layerId="wetlands";var r=new w;r.layerId="wetlandsRaster";var o=$("#printTitle").val();""==o?i.layoutOptions={titleText:"Wetlands",authorText:"National Wetlands Inventory (NWI)",copyrightText:"This page was produced by the NWI mapper",legendLayers:[n,r]}:i.layoutOptions={titleText:o,authorText:"National Wetlands Inventory (NWI)",copyrightText:"This page was produced by the NWI mapper",legendLayers:[n,r]};var s=i.layoutOptions.titleText;t.template=i;var l=new L("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task");l.execute(t,e,a),$.get("https://fwsprimary.wim.usgs.gov/pdfLoggingService/pdfLog.asmx/Log?printInfo="+map.getScale()+","+map.extent.xmin+","+map.extent.ymax+","+map.extent.xmax+","+map.extent.ymin+",NWIV2",function(e){})}function H(e,a){var t;document.getElementById&&(t=document.getElementById(e))&&t.style&&(t.style.cursor=a)}t.defaults.io.corsEnabledServers.push("fwsprimary.wim.usgs.gov"),esri.config.defaults.io.proxyUrl="https://fwsprimary.wim.usgs.gov/serviceProxy/proxy.ashx",t.defaults.geometryService=new h("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/Geometry/GeometryServer"),map=new e("mapDiv",{basemap:"hybrid",extent:new p(-14638882.654811008,2641706.3772205533,-6821514.898031538,6403631.161302788,new u({wkid:3857})),fitExtent:!0,showLabels:!0});var Y=new n({map:map,extent:new p(-14638882.654811008,2641706.3772205533,-6821514.898031538,6403631.161302788,new u({wkid:3857}))},"homeButton");Y.startup();var j=new o({map:map,scale:4514},"locateButton");j.startup(),measurement=new s({map:map,advancedLocationUnits:!0},k.byId("measurementDiv")),measurement.startup(),$(window).resize(function(){$("#legendCollapse").hasClass("in")?(maxLegendHeight=.9*$("#mapDiv").height(),$("#legendElement").css("height",maxLegendHeight),$("#legendElement").css("max-height",maxLegendHeight),maxLegendDivHeight=$("#legendElement").height()-parseInt($("#legendHeading").css("height").replace("px","")),$("#legendDiv").css("max-height",maxLegendDivHeight)):$("#legendElement").css("height","initial")}),$("#printNavButton").click(function(){C()}),$("#printExecuteButton").click(function(e){e.preventDefault(),$(this).button("loading"),U()}),$("#getDataButton").click(function(){P()}),$("#aboutLink").click(function(){$("#aboutModal").modal("show"),$("#aboutTab").trigger("click")}),$("#disclaimerLink").click(function(){$("#aboutModal").modal("show"),$("#disclaimerTab").trigger("click")}),$("#dataLimitationsLink").click(function(){$("#aboutModal").modal("show"),$("#dataLimitationsTab").trigger("click")}),$("#userCautionLink").click(function(){$("#aboutModal").modal("show"),$("#userCautionTab").trigger("click")}),$(".docs").hide(),O(map,"load",function(){var e=map.getScale().toFixed(0);$("#scale")[0].innerHTML=addCommas(e);var a=I.webMercatorToGeographic(map.extent.getCenter());$("#latitude").html(a.y.toFixed(3)),$("#longitude").html(a.x.toFixed(3))}),O(map,"zoom-end",function(){var e=map.getScale().toFixed(0);$("#scale")[0].innerHTML=addCommas(e)}),O(map,"mouse-move",function(e){if($("#mapCenterLabel").css("display","none"),null!=e.mapPoint){var a=I.webMercatorToGeographic(e.mapPoint);$("#latitude").html(a.y.toFixed(3)),$("#longitude").html(a.x.toFixed(3))}}),O(map,"pan-end",function(){$("#mapCenterLabel").css("display","inline");var e=I.webMercatorToGeographic(map.extent.getCenter());$("#latitude").html(e.y.toFixed(3)),$("#longitude").html(e.x.toFixed(3))});var z=new g("https://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer"),B=new g("https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer");O(k.byId("btnStreets"),"click",function(){map.setBasemap("streets"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnSatellite"),"click",function(){map.setBasemap("satellite"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnHybrid"),"click",function(){map.setBasemap("hybrid"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnTerrain"),"click",function(){map.setBasemap("terrain"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnGray"),"click",function(){map.setBasemap("gray"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnNatGeo"),"click",function(){map.setBasemap("national-geographic"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnOSM"),"click",function(){map.setBasemap("osm"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnTopo"),"click",function(){map.setBasemap("topo"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnNatlMap"),"click",function(){map.addLayer(B,1),map.removeLayer(z)}),O(k.byId("btnUsgsTopo"),"click",function(){map.addLayer(z,1),map.removeLayer(B)}),$("#wetlandDiv").lobiPanel({unpin:!1,reload:!1,minimize:!1,close:!1,expand:!1,editTitle:!1,maxWidth:600,maxHeight:400}),$("#wetlandDiv .dropdown").prepend("
"),$("#wetlandClose").click(function(){$("#wetlandDiv").css("visibility","hidden"),map.graphics.clear()}),identifyParams=new b,identifyParams.tolerance=0,identifyParams.returnGeometry=!0,identifyParams.layerOption=b.LAYER_OPTION_ALL,identifyParams.width=map.width,identifyParams.height=map.height,identifyTask=new v(allLayers[0].layers.Wetlands.url);var q=x(".title",map.infoWindow.domNode)[0],V=new D(map.infoWindow.domNode,{handle:q});O(V,"FirstMove",function(){var e=x(".outerPointer",map.infoWindow.domNode)[0];_.add(e,"hidden");var e=x(".pointer",map.infoWindow.domNode)[0];_.add(e,"hidden")}.bind(this)),O(map,"click",function(e){if(1==aoiClicked)return void(aoiClicked=!1);if(null==measurement.activeTool)if(map.graphics.clear(),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click"),$("#wetlandDiv").css("visibility","hidden"),identifyParams.geometry=e.mapPoint,identifyParams.mapExtent=map.extent,map.getLevel()>=12&&0==$("#huc-download-alert")[0].scrollHeight){y=new v(allLayers[0].layers.Wetlands.url);var a=y.execute(identifyParams),t=new b;t.returnGeometry=!0,t.tolerance=0,t.width=map.width,t.height=map.height,t.geometry=e.mapPoint,t.layerOption=b.LAYER_OPTION_ALL,t.mapExtent=map.extent,t.layerIds=[0,1],H("mainDiv","wait"),map.setCursor("wait");var i=$("#wetlandDiv").data("lobiPanel"),n=$(document).height(),r=$(document).width(),o=.9,s=n*o,l=r*o,d=600,p=325;500>n&&($("#wetlandDiv").height(s),p=$("#floodToolsDiv").height()-50),500>r&&($("#wetlandDiv").width(l),d=$("#floodToolsDiv").width()-50);var c=.5*r-.5*$("#wetlandDiv").width(),m=.5*n-.5*$("#wetlandDiv").height();0==initWetlandClicked&&i.setPosition(c,m),1==i.isPinned()&&i.unpin(),initWetlandClicked=!0,$(".docs").hide(),$(".docItems").empty(),$("#reportInfo .panel-heading").addClass("loading-hide"),$("#reportInfo .panel-body").addClass("loading-hide"),$("#wetlandDiv").addClass("loading-background"),$(".tab-pane").addClass("hidden-loading"),a.addCallback(function(a){function i(e){var a;return a=0==e||""==e?"Link":e}if(a.length>1){var n,r,o,s,l=new b;l.returnGeometry=!1,l.tolerance=0,l.width=map.width,l.height=map.height,l.geometry=e.mapPoint,l.layerOption=b.LAYER_OPTION_ALL,l.mapExtent=map.extent,l.layerIds=[0,4];var d=new v(allLayers[1].layers["Source Type"].url),p=d.execute(l);p.addCallback(function(e){if(e.length>=1){for(var a=0;a"+i.PDF_NAME+"")):($("#"+e[t].value.toLowerCase()+"Docs").show(),$("#"+e[t].value.toLowerCase()+"Docs .docItems").append(""+i.Title+""))}}$("#reportInfo .panel-heading").removeClass("loading-hide"),$("#reportInfo .panel-body").removeClass("loading-hide"),$("#wetlandDiv").removeClass("loading-background"),$(".tab-pane").removeClass("hidden-loading")}),$("#wetlandTab").trigger("click"),$("#wetlandDiv").css("visibility","visible");for(var c=0;c10?$("#imageScalePopup").html("The wetlands and deepwater habitats in this area were photo interpreted using 1:"+addCommas(s.IMAGE_SCALE)+" scale, "):0!=s.IMAGE_SCALE&&$("#imageScalePopup").html("The wetlands and deepwater habitats in this area were photo interpreted using "+s.IMAGE_SCALE+" meter (or less) digital, "):$("#imageScalePopup").html(""),"Scalable"==s.SOURCE_TYPE?$("#sourceTypePopup").html("The data in this area are considered an interim scalable map product. Click here for a full description of Scalable Wetland Mapping. "):"Null"==s.SOURCE_TYPE?$("#sourceTypePopup").html("Photo interpretation information is not available for this project."):$("#sourceTypePopup").html(""+M(s.SOURCE_TYPE)+" imagery from "+i(s.IMAGE_YR)+". "),"None"!=s.SUPPMAPINFO?($("#suppMapInfo").empty(),$("#suppMapInfo").append('Click here for project specific mapping conventions and information.')):$("#suppMapInfo").empty();var u=["ATTRIBUTE","SYSTEM","SYSTEM_NAME","SYSTEM_DEFINITION","SUBSYSTEM","SUBSYSTEM_NAME","SUBSYSTEM_DEFINITION","CLASS","CLASS_NAME","CLASS_DEFINITION","SUBCLASS","SUBCLASS_NAME","SUBCLASS_DEFINITION","SPLIT_CLASS","SPLIT_CLASS_NAME","SPLIT_CLASS_DEFINITION","SPLIT_SUBCLASS","SPLIT_SUBCLASS_NAME","SPLIT_SUBCLASS_DEFINITION","WATER_REGIME","WATER_REGIME_NAME","WATER_REGIME_SUBGROUP","WATER_REGIME_DEFINITION","MODIFIER_1","MODIFIER_1_NAME","MODIFIER_1_GROUP","MODIFIER_1_SUBGROUP","MODIFIER_1_DEFINITION","MODIFIER_2","MODIFIER_2_NAME","MODIFIER_2_GROUP","MODIFIER_2_SUBGROUP","MODIFIER_2_DEFINITION","MODIFIER_3","MODIFIER_3_NAME","MODIFIER_3_GROUP","MODIFIER_3_SUBGROUP","MODIFIER_3_DEFINITION"];$.each(u,function(e){var a=u[e],t=o[a];"Null"!=t?"SPLIT_CLASS"!=a&&"SPLIT_CLASS_NAME"!=a&&"SPLIT_CLASS_DEFINITION"!=a||o.CLASS!=o.SPLIT_CLASS?($("#des"+a).html(o[a]),$("#des"+a).show(),$("#des"+a).parent().show()):$("#SPLIT_CLASS_GROUP").hide():$("#des"+a).parent().hasClass("decoder-group")&&$("#des"+a).parent().hide()});var f=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,f),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=I.webMercatorToGeographic(n.geometry),t=a.getExtent();map.setExtent(t,!0)}),$("#zoomProjectLink").click(function(e){var a=I.webMercatorToGeographic(r.geometry),t=a.getExtent();map.setExtent(t,!0);var i=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));r.geometry.spatialReference=map.spatialReference;var n=r;n.setSymbol(i),map.graphics.add(n)})}else if(a.length<=1){y=new v(allLayers[0].layers.Riparian.url);var h=y.execute(identifyParams);h.addCallback(function(a){if(a.length>1){for(var i,n,r,o,s=0;sclick here";var c=new esri.InfoTemplate("Riparian","Classification: "+r.ATTRIBUTE+" (decode)

Wetland Type: "+r.WETLAND_TYPE+"
Acres: "+Number(r.ACRES).toFixed(2)+"
Image Date(s): "+o.IMAGE_DATE+"
Project Metadata:"+p+"

Zoom to wetland

");$("#acreage").text(Number(r.ACRES).toFixed(2)),$("#wetlandCode").text(r.ATTRIBUTE),$("#wetlandType").text(r.WETLAND_TYPE),$("#decoderLink").click(function(e){$("#descriptionTab").trigger("click")}),$("#imageScalePopup").text(addCommas(o.IMAGE_SCALE)),$("#sourceTypePopup").text(M(o.SOURCE_TYPE)),0==o.IMAGE_DATE?$("#imageDate").append("Link"):$("#imageDate").text(o.IMAGE_DATE),$("#suppMapInfoLink").attr("href",o.SUPPMAPINFO),i.setInfoTemplate(c),map.infoWindow.setFeatures([i]),map.infoWindow.show(e.mapPoint);var m=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,m),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=I.webMercatorToGeographic(i.geometry),t=a.getExtent();map.setExtent(t,!0)}),$("#zoomProjectLink").click(function(e){var a=I.webMercatorToGeographic(n.geometry),t=a.getExtent();map.setExtent(t,!0);var i=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));n.geometry.spatialReference=map.spatialReference;var r=n;r.setSymbol(i),map.graphics.add(r)})}else if(a.length<=1){var g=new v(allLayers[2].layers["Historic Wetland Data"].url),y=g.execute(t);y.addCallback(function(a){if(a.length>=1){for(var t,i,n,r=0;rclick here",(""==n.IMAGE_DATE||"0"==n.IMAGE_DATE||0==n.IMAGE_DATE)&&(n.IMAGE_DATE=l);var d=new esri.InfoTemplate("Historic Wetland","

Wetland Type: "+i.WETLAND_TYPE+"
Acres: "+Number(i.ACRES).toFixed(2)+"
Project Metadata:"+l+"

Zoom to wetland

");t.setInfoTemplate(d),map.infoWindow.setFeatures([t]),map.infoWindow.show(e.mapPoint,map.getInfoWindowAnchor(e.screenPoint));var p=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,p),$("infoWindowLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=I.webMercatorToGeographic(t.geometry),i=a.getExtent();map.setExtent(i,!0)})}else H("mainDiv","default"),map.setCursor("default"),map.infoWindow.hide()})}})}})}else if($("#huc-download-alert")[0].scrollHeight>0){var g=new b;g.returnGeometry=!0,g.tolerance=0,g.width=map.width,g.height=map.height,g.geometry=e.mapPoint,g.layerOption=b.LAYER_OPTION_TOP,g.mapExtent=map.extent,g.spatialReference=map.spatialReference;var y=new v(allLayers[0].layers.HUC8.url),u=y.execute(g);u.addCallback(function(e){if(e.length>=1){var a;a=e[0].feature;var t=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));a.geometry.spatialReference=map.spatialReference;var i=a;i.setSymbol(t),map.graphics.add(i);var n=I.webMercatorToGeographic(a.geometry),r=n.getExtent();map.setExtent(r,!0);var o=e[0].feature.attributes.HUC8,s=e[0].feature.attributes.Name;dojo.byId("innerAlert").innerHTML="

Download Data

Click the link below to download data for "+s+" watershed

HUC "+o+"

"}})}}),$(document).on("click","#showHUCs",function(){event.preventDefault(),$("#getDataModal").modal("hide"),$("#huc-download-alert").slideDown(250),map.getLayer("huc8").setVisibility(!0),dojo.byId("innerAlert").innerHTML="

Download Data

Please review the Data Download (www.fws.gov/wetlands/Data/Data-Download.html) page for information on how to download data, what is included in the download and data use limitations and disclaimer.


Click the map to select a watershed from which to extract wetland data.

"});var K=new i({value:"",maxLocations:25,autoComplete:!0,arcgisGeocoder:!0,autoNavigate:!1,map:map},"geosearch");K.startup(),K.on("select",N),K.on("findResults",W),K.on("clear",F),O(K.inputNode,"keydown",function(e){13==e.keyCode&&A()});var X=G("../images/purple-pin.png",0,12,13,24);map.on("load",function(){map.infoWindow.set("highlight",!1),map.infoWindow.set("titleInBody",!1)}),O(k.byId("btnGeosearch"),"click",R),$(document).ready(function(){function e(){$("#geosearchModal").modal("show")}function a(){$("#aboutModal").modal("show")}$("#geosearchNav").click(function(){e()}),$("#aboutNav").click(function(){a()}),$("#html").niceScroll(),$("#sidebar").niceScroll(),$("#sidebar").scroll(function(){$("#sidebar").getNiceScroll().resize()}),maxLegendHeight=.9*$("#mapDiv").height(),$("#legendElement").css("max-height",maxLegendHeight),maxLegendDivHeight=maxLegendHeight-parseInt($("#legendHeading").css("height").replace("px","")),$("#legendDiv").css("max-height",maxLegendDivHeight),$("#legendCollapse").on("shown.bs.collapse",function(){if(0==legendDiv.innerHTML.length){var e=new r({map:map,layerInfos:legendLayers},"legendDiv");e.startup(),$("#legendDiv").niceScroll()}}),$("#legendCollapse").on("hide.bs.collapse",function(){$("#legendElement").css("height","initial")}),$("#measurementCollapse").on("shown.bs.collapse",function(){$("#measureLabel").show()}),$("#measurementCollapse").on("hide.bs.collapse",function(){window.innerWidth<=767&&$("#measureLabel").hide()})}),require(["esri/Color","esri/InfoTemplate","esri/tasks/locator","esri/tasks/query","esri/tasks/QueryTask","esri/graphicsUtils","esri/geometry/Point","esri/geometry/Extent","esri/layers/ArcGISDynamicMapServiceLayer","esri/layers/ArcGISImageServiceLayer","esri/layers/FeatureLayer","esri/layers/LabelClass","esri/layers/WMSLayer","esri/layers/WMSLayerInfo","esri/symbols/TextSymbol","esri/tasks/GeometryService","dijit/form/CheckBox","dijit/form/RadioButton","dojo/query","dojo/dom","dojo/dom-class","dojo/dom-construct","dojo/dom-style","dojo/on"],function(e,a,t,i,n,r,o,s,l,d,p,c,m,g,y,u,f,h,b,v,w,L,S,T){function I(t,i,n,r,o,s,l){if(map.addLayer(n),0==l.legendLabel){var d=document.createElement("style");d.type="text/css",d.innerHTML="[id*="+n.id+"] .esriLegendLayerLabel { display: none; }",document.getElementsByTagName("head")[0].appendChild(d)}if("fwsTracts"==n.id){var p=new e("#FFF"),m=(new y).setColor(p);m.font.setSize("10pt"),m.font.setFamily("arial");var g={labelExpressionInfo:{value:"{LABELNAME}"}},u=new c(g);u.symbol=m,n.setLabelingInfo([u])}if("aoi"==n.id&&T(n,"load",function(e){T(n,"click",function(e){aoiClicked=!0;var t=e.graphic.attributes.HYPERLINK_2;if("None"==t){var i=new a("${NAME}","Type: ${TYPE}
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");n.setInfoTemplate(i)}else{var i=new a("${NAME}","Type: ${TYPE}
Ramsar: click here
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");n.setInfoTemplate(i)}})}),E.push([o,camelize(r),n]),o){if(!$("#"+camelize(o)).length){var f;if("Data Source"==o)var f=$('
');else var f=$('
"); +f.click(function(e){f.find("i.glyphspan").toggleClass("fa-check-square-o fa-square-o"),$.each(E,function(e,a){var t=map.getLayer(a[2].id);if(a[0]==o)if($("#"+a[1]).find("i.glyphspan").hasClass("fa-dot-circle-o")&&f.find("i.glyphspan").hasClass("fa-check-square-o")){console.log("adding layer: ",a[1]),map.addLayer(a[2]);var t=map.getLayer(a[2].id);t.setVisibility(!0)}else if(f.find("i.glyphspan").hasClass("fa-square-o")){console.log("removing layer: ",a[1]);var t=map.getLayer(a[2].id);t.setVisibility(!1)}})});var h=$('
');$("#toggle").append(h)}if(n.visible)var b=$('
");else var b=$('
");$("#"+camelize(o)).append(b),b.click(function(e){if($(this).find("i.glyphspan").hasClass("fa-circle-o")){$(this).find("i.glyphspan").toggleClass("fa-dot-circle-o fa-circle-o");var a=$(this)[0].id;$.each(E,function(e,t){if(t[0]==o)if(t[1]==a&&$("#"+camelize(o+" Root")).find("i.glyphspan").hasClass("fa-check-square-o")){console.log("adding layer: ",t[1]),map.addLayer(t[2]);var i=map.getLayer(t[2].id);i.setVisibility(!0)}else if(t[1]==a&&$("#"+camelize(o+" Root")).find("i.glyphspan").hasClass("fa-square-o"))console.log("group heading not checked");else{console.log("removing layer: ",t[1]);var i=map.getLayer(t[2].id);i.setVisibility(!1),$("#"+t[1]).find("i.glyphspan").hasClass("fa-dot-circle-o")&&$("#"+t[1]).find("i.glyphspan").toggleClass("fa-dot-circle-o fa-circle-o")}})}})}else if(l.includeInLayerList){if(n.visible&&void 0!==l.hasOpacitySlider&&1==l.hasOpacitySlider&&void 0!==l.moreinfo&&l.moreinfo)var b=$('
');else if(!n.visible&&void 0!==l.hasOpacitySlider&&1==l.hasOpacitySlider&&void 0!==l.moreinfo&&l.moreinfo)var b=$('
');else if(n.visible&&void 0!==l.hasOpacitySlider&&1==l.hasOpacitySlider)var b=$('
');else if(n.visible||void 0===l.hasOpacitySlider||1!=l.hasOpacitySlider)if(n.visible&&void 0!==l.moreinfo&&l.moreinfo)var b=$('
');else if(!n.visible&&void 0!==l.moreinfo&&l.moreinfo)var b=$('
');else if(n.visible)var b=$('
");else var b=$('
");else var b=$('
');b.click(function(e){$(this).find("i.glyphspan").toggleClass("fa-check-square-o fa-square-o"),$(this).find("button").button("toggle"),n.visible?n.setVisibility(!1):n.setVisibility(!0),l.otherLayersToggled&&$.each(l.otherLayersToggled,function(e,a){var t=map.getLayer(a);t.setVisibility(n.visible)})})}if(void 0!==i){var v=camelize(t);if(!$("#"+v).length){if(i)var w=$('
");else var w=$('
');$("#toggle").append(w)}if(o){if($("#"+v).append(f),$("#"+v).append(h),void 0!==l.moreinfo&&l.moreinfo){var L="#info"+camelize(o),S=$(L);S.click(function(e){window.open(l.moreinfo,"_blank"),e.preventDefault(),e.stopPropagation()})}if($("#opacity"+camelize(o)).length>0){var L="#opacity"+camelize(o),I=$(L);I.click(function(e){e.preventDefault(),e.stopPropagation(),$(".opacitySlider").remove();var a=map.getLayer(s.id).opacity,t=$('
');$("body").append(t),$("#slider")[0].value=100*a,$(".opacitySlider").css("left",event.clientX-180),$(".opacitySlider").css("top",event.clientY-50),$(".opacitySlider").mouseleave(function(){$(".opacitySlider").remove()}),$(".opacityClose").click(function(){$(".opacitySlider").remove()}),$("#slider").change(function(e){var a=$("#slider")[0].value/100;console.log("o: "+a),$("#opacityValue").html("Opacity: "+a),map.getLayer(s.id).setOpacity(a),l.otherLayersToggled&&$.each(l.otherLayersToggled,function(e,t){var i=map.getLayer(t);i.setOpacity(a)})})})}}else{if($("#"+v).append(b),void 0!==l.moreinfo&&l.moreinfo){var L="#info"+camelize(r),S=$(L);S.click(function(e){window.open(l.moreinfo,"_blank"),e.preventDefault(),e.stopPropagation()})}$("#opacity"+camelize(r)).length>0&&$("#opacity"+camelize(r)).click(function(e){e.preventDefault(),e.stopPropagation(),$(".opacitySlider").remove();var a=map.getLayer(s.id).opacity,t=$('
');$("body").append(t),$("#slider")[0].value=100*a,$(".opacitySlider").css("left",event.clientX-180),$(".opacitySlider").css("top",event.clientY-50),$(".opacitySlider").mouseleave(function(){$(".opacitySlider").remove()}),$(".opacityClose").click(function(){$(".opacitySlider").remove()}),$("#slider").change(function(e){var a=$("#slider")[0].value/100;console.log("o: "+a),$("#opacityValue").html("Opacity: "+a),map.getLayer(s.id).setOpacity(a),l.otherLayersToggled&&$.each(l.otherLayersToggled,function(e,t){var i=map.getLayer(t);i.setOpacity(a)})})})}}else if($("#toggle").append(b),void 0!==l.moreinfo&&l.moreinfo){var L="#info"+camelize(r),S=$(L);S.click(function(e){alert(e.currentTarget.id),e.preventDefault(),e.stopPropagation()})}}var E=(new u("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/Geometry/GeometryServer"),[]);$.each(allLayers,function(e,a){console.log("processing: ",a.groupHeading),$.each(a.layers,function(e,t){var i="";if(t.wimOptions.exclusiveGroupName&&(i=t.wimOptions.exclusiveGroupName),"agisFeature"===t.wimOptions.layerType){var n=new p(t.url,t.options);void 0!==t.wimOptions.renderer&&n.setRenderer(t.wimOptions.renderer),t.wimOptions&&1==t.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),I(a.groupHeading,a.showGroupHeading,n,e,i,t.options,t.wimOptions)}else if("agisWMS"===t.wimOptions.layerType){var n=new m(t.url,{resourceInfo:t.options.resourceInfo,visibleLayers:t.options.visibleLayers},t.options);t.wimOptions&&1==t.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),I(a.groupHeading,a.showGroupHeading,n,e,i,t.options,t.wimOptions)}else if("agisDynamic"===t.wimOptions.layerType){var n=new l(t.url,t.options);if(t.visibleLayers&&n.setVisibleLayers(t.visibleLayers),t.wimOptions&&t.wimOptions.layerDefinitions){var r=[];$.each(t.wimOptions.layerDefinitions,function(e,a){r[e]=a}),n.setLayerDefinitions(r)}t.wimOptions&&1==t.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),I(a.groupHeading,a.showGroupHeading,n,e,i,t.options,t.wimOptions)}else if("agisImage"===t.wimOptions.layerType){var n=new d(t.url,t.options);t.wimOptions&&1==t.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),t.visibleLayers&&n.setVisibleLayers(t.visibleLayers),I(a.groupHeading,a.showGroupHeading,n,e,i,t.options,t.wimOptions)}})})})}),$(".close-alert").click(function(){$(this).parent().slideUp(250)}),$(document).ready(function(){}); \ No newline at end of file diff --git a/src/index.html b/src/index.html index a7da427..1c2b146 100644 --- a/src/index.html +++ b/src/index.html @@ -15,8 +15,8 @@ - - + + @@ -39,7 +39,7 @@ - + diff --git a/src/scripts/core.js b/src/scripts/core.js index b45c9d9..09fcd31 100644 --- a/src/scripts/core.js +++ b/src/scripts/core.js @@ -134,7 +134,8 @@ require([ map = new Map('mapDiv', { basemap: 'hybrid', extent: new Extent(-14638882.654811008, 2641706.3772205533, -6821514.898031538, 6403631.161302788, new SpatialReference({ wkid:3857 })), - fitExtent: true + fitExtent: true, + showLabels: true }); var home = new HomeButton({ @@ -1211,6 +1212,7 @@ require([ }); require([ + 'esri/Color', 'esri/InfoTemplate', 'esri/tasks/locator', 'esri/tasks/query', @@ -1221,8 +1223,10 @@ require([ 'esri/layers/ArcGISDynamicMapServiceLayer', 'esri/layers/ArcGISImageServiceLayer', 'esri/layers/FeatureLayer', + 'esri/layers/LabelClass', 'esri/layers/WMSLayer', 'esri/layers/WMSLayerInfo', + 'esri/symbols/TextSymbol', 'esri/tasks/GeometryService', 'dijit/form/CheckBox', 'dijit/form/RadioButton', @@ -1233,6 +1237,7 @@ require([ 'dojo/dom-style', 'dojo/on' ], function( + Color, InfoTemplate, Locator, Query, @@ -1243,8 +1248,10 @@ require([ ArcGISDynamicMapServiceLayer, ArcGISImageServiceLayer, FeatureLayer, + LabelClass, WMSLayer, WMSLayerInfo, + TextSymbol, GeometryService, CheckBox, RadioButton, @@ -1357,6 +1364,21 @@ require([ document.getElementsByTagName('head')[0].appendChild(style); } + if (layer.id == 'fwsTracts') { + var fwsTractsColor = new Color("#FFF"); + var fwsTractsLabel = new TextSymbol().setColor(fwsTractsColor); + fwsTractsLabel.font.setSize("10pt"); + fwsTractsLabel.font.setFamily("arial"); + + var json = { + "labelExpressionInfo": {"value": "{LABELNAME}"} + }; + + var fwsTractsLabelClass = new LabelClass(json); + fwsTractsLabelClass.symbol = fwsTractsLabel; + layer.setLabelingInfo([ fwsTractsLabelClass ]); + } + if (layer.id == 'aoi') { on(layer, 'load', function(evt) { on(layer, 'click', function (evt) { diff --git a/src/scripts/layers.js b/src/scripts/layers.js index 2775c66..be34f4a 100644 --- a/src/scripts/layers.js +++ b/src/scripts/layers.js @@ -2,22 +2,34 @@ * Created by bdraper on 4/27/2015. */ var allLayers; -var renderer; +var tractRenderer; +var centroidRenderer; require([ + 'esri/Color', 'esri/InfoTemplate', - 'esri/renderers/UniqueValueRenderer', - 'esri/symbols/PictureMarkerSymbol', + 'esri/layers/LabelClass', + 'esri/renderers/SimpleRenderer', + 'esri/symbols/SimpleFillSymbol', + 'esri/symbols/SimpleLineSymbol', + 'esri/symbols/SimpleMarkerSymbol', + 'esri/symbols/TextSymbol', 'dojo/domReady!' ], function( + Color, InfoTemplate, - UniqueValueRenderer, - PictureMarkerSymbol + LabelClass, + SimpleRenderer, + SimpleFillSymbol, + SimpleLineSymbol, + SimpleMarkerSymbol, + TextSymbol ) { + var centroidSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 5, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255,255,255]),0.5), new Color([0,0,0,1])); + centroidRenderer = new SimpleRenderer(centroidSymbol); - var defaultSymbol = new PictureMarkerSymbol("./images/grn-pushpin.png", 45, 45); - - renderer = new UniqueValueRenderer(defaultSymbol); + var tractSymbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([0,0,0]),0.5), new Color([115, 178, 115,0.75])); + tractRenderer = new SimpleRenderer(tractSymbol); var template = new InfoTemplate("${NAME}", "Type: ${TYPE}
" + @@ -26,7 +38,7 @@ require([ "Water Summary Report: click here
" + "Wildlife Action Plan: click here
" ) - + allLayers = [ { 'groupHeading': 'ESRI dynamic map services', @@ -216,7 +228,7 @@ require([ 'opacity': 1.00, 'visible': false, 'outFields': ["*"], - 'infoTemplate': template + 'infoTemplate': template, }, 'wimOptions': { 'type': 'layer', @@ -233,25 +245,31 @@ require([ 'options': { 'id': 'fwsCentroids', 'opacity': 0.75, + 'maxScale': 18000000, 'visible': false }, 'wimOptions': { 'type': 'layer', 'layerType': 'agisFeature', - 'includeInLayerList': true, + 'includeInLayerList': false, 'zoomScale': 144448, 'hasOpacitySlider': true, 'moreinfo': 'http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html', 'includeLegend' : true, - 'esriLegendLabel': false + 'esriLegendLabel': false, + 'renderer': centroidRenderer } }, 'FWS Managed Lands Tracts' : { //REALTY TRACTS - 'url': 'https://services.arcgis.com/QVENGdaPbd4LUkLV/ArcGIS/rest/services/FWSInterest/FeatureServer/1', + 'url': 'https://services.arcgis.com/QVENGdaPbd4LUkLV/arcgis/rest/services/FWSApproved_Authoritative/FeatureServer/1', + //'url': 'https://services.arcgis.com/QVENGdaPbd4LUkLV/ArcGIS/rest/services/National_Wildlife_Refuge_System_Boundaries/FeatureServer/0', 'options': { 'id': 'fwsTracts', 'opacity': 0.75, - 'visible': false + 'minScale': 18000000, + 'visible': false, + 'outFields': ["*"], + 'showLabels': true }, 'wimOptions': { 'type': 'layer', @@ -260,13 +278,15 @@ require([ 'zoomScale': 144448, 'hasOpacitySlider': true, 'moreinfo': 'http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html', + 'otherLayersToggled': ['fwsCentroids'], 'includeLegend' : true, - 'esriLegendLabel': false + 'esriLegendLabel': false, + 'renderer': tractRenderer } - }, - 'FWS Managed Lands' : { + },/* + 'FWS Managed Lands' : { //labels turn on at 1:2,311,162 'url': 'https://gis.fws.gov/ArcGIS/rest/services/FWS_Refuge_Boundaries/MapServer', - 'visibleLayers': [0,1,3], + 'visibleLayers': [1], 'options': { 'id': 'fwsRefuges', 'opacity': 0.75, @@ -279,10 +299,11 @@ require([ 'zoomScale': 144448, 'hasOpacitySlider': true, 'moreinfo': 'http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html', + 'otherLayersToggled': ['fwsCentroids', 'fwsTracts'], 'includeLegend' : true, 'esriLegendLabel': false } - }, + },*/ 'Historic Wetland Data' : { 'url': 'https://fwsprimary.wim.usgs.gov/server/rest/services/Historic_Wetlands/MapServer', 'visibleLayers': [0,1], From 646bf709241820cdaba66955f840540001bc42dc Mon Sep 17 00:00:00 2001 From: Estes Date: Fri, 26 Jun 2020 10:19:30 -0700 Subject: [PATCH 3/4] updated fws managed lands polygons to new service --- build/scripts/combined.js | 4 ++-- src/scripts/core.js | 2 +- src/scripts/layers.js | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build/scripts/combined.js b/build/scripts/combined.js index 3a9232a..c489114 100644 --- a/build/scripts/combined.js +++ b/build/scripts/combined.js @@ -1,2 +1,2 @@ -function addCommas(e){e+="";for(var a=e.split("."),t=a[0],i=a.length>1?"."+a[1]:"",n=/(\d+)(\d{3})/;n.test(t);)t=t.replace(n,"$1,$2");return t+i}function camelize(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,a){return 0===a?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")}function stateSelected(){var e=$("#stateSelect")[0];if(e.selectedIndex>0){var a=e.options[e.selectedIndex].value,t=e.options[e.selectedIndex].label;$("#downloadState").html("Download Geodatabase and Shapefile data for "+t+"")}else $("#downloadState").html("")}function hucLinkListener(e){console.log(e),$.get("https://fwsprimary.wim.usgs.gov/downloadLoggingService/downloadLog.asmx/Log?huc="+e+",NWIV2",function(e){})}var allLayers,tractRenderer,centroidRenderer;require(["esri/Color","esri/InfoTemplate","esri/layers/LabelClass","esri/renderers/SimpleRenderer","esri/symbols/SimpleFillSymbol","esri/symbols/SimpleLineSymbol","esri/symbols/SimpleMarkerSymbol","esri/symbols/TextSymbol","dojo/domReady!"],function(e,a,t,i,n,r,o,s){var l=new o(o.STYLE_CIRCLE,5,new r(r.STYLE_SOLID,new e([255,255,255]),.5),new e([0,0,0,1]));centroidRenderer=new i(l);var d=new n(n.STYLE_SOLID,new r(r.STYLE_SOLID,new e([0,0,0]),.5),new e([115,178,115,.75]));tractRenderer=new i(d);var p=new a("${NAME}","Type: ${TYPE}
Ramsar: click here
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");allLayers=[{groupHeading:"ESRI dynamic map services",showGroupHeading:!1,includeInLayerList:!0,layers:{Wetlands:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands/MapServer",options:{id:"wetlands",opacity:.75,visible:!0},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,includeLegend:!0,legendLabel:!1,moreinfo:"https://www.fws.gov/wetlands/Data/Wetlands-Product-Summary.html",otherLayersToggled:["wetlandsStatus","wetlandsRaster"]}},"Wetlands Status":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands_Status/MapServer",options:{id:"wetlandsStatus",layers:[0],visible:!0,maxScale:285e3,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!1,includeLegend:!0,esriLegendLabel:!1}},"Wetlands ":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands_Raster/ImageServer",options:{id:"wetlandsRaster",visible:!0,maxScale:285e3,opacity:.6},wimOptions:{type:"layer",layerType:"agisImage",includeInLayerList:!1,includeLegend:!0,otherLayersToggled:["wetlands","wetlandsStatus"]}},Riparian:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Riparian/MapServer",visibleLayers:[0],options:{id:"riparian",opacity:.75,visible:!0},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/wetlands/Other/Riparian-Product-Summary.html",includeLegend:!0,legendLabel:!1}},"Riparian Mapping Areas":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Riparian/MapServer",visibleLayers:[1],options:{id:"riparianStatus",visible:!1,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/wetlands/Other/Riparian-Product-Summary.html",includeLegend:!0,legendLabel:!1}},HUC8:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/HUCs/MapServer",options:{id:"huc8",opacity:1,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!1,includeLegend:!0,esriLegendLabel:!1}}}},{groupHeading:"Data Source Group",showGroupHeading:!1,includeInLayerList:!0,moreinfo:"https://www.fws.gov/wetlands/Documents/Scalable-Wetland-Mapping-Fact-Sheet.pdf",otherLayersToggled:["sourceType","imageScale","imageYear"],layers:{"Source Type":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[1],options:{id:"sourceType",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["imageScale","imageYear"],legendLabel:!1}},"Image Scale":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[2],options:{id:"imageScale",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["sourceType","imageYear"],legendLabel:!1}},"Image Year":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[3],options:{id:"imageYear",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["sourceType","imageScale"],legendLabel:!1}}}},{groupHeading:"refuges and historic",showGroupHeading:!1,includeInLayerList:!0,layers:{"Areas of Interest":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Areas_of_Interest/MapServer/0",options:{id:"aoi",opacity:1,visible:!1,outFields:["*"],infoTemplate:p},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!0,hasOpacitySlider:!1,moreinfo:"https://www.fws.gov/wetlands/Data/metadata/FWS_Wetland_Areas_of_Interest.xml",includeLegend:!0}},"FWS Managed Lands Centroids":{url:"https://services.arcgis.com/QVENGdaPbd4LUkLV/ArcGIS/rest/services/FWSCentroids/FeatureServer/0",options:{id:"fwsCentroids",opacity:.75,maxScale:18e6,visible:!1},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!1,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html",includeLegend:!0,esriLegendLabel:!1,renderer:centroidRenderer}},"FWS Managed Lands Tracts":{url:"https://services.arcgis.com/QVENGdaPbd4LUkLV/arcgis/rest/services/FWSApproved_Authoritative/FeatureServer/1",options:{id:"fwsTracts",opacity:.75,minScale:18e6,visible:!1,outFields:["*"],showLabels:!0},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html",otherLayersToggled:["fwsCentroids"],includeLegend:!0,esriLegendLabel:!1,renderer:tractRenderer}},"Historic Wetland Data":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Historic_Wetlands/MapServer",visibleLayers:[0,1],options:{id:"historic",visible:!1,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,hasOpacitySlider:!0,moreinfo:"https://www.fws.gov/wetlands/Data/Historic-Wetlands-Data.html",includeLegend:!0,legendLabel:!1}}}}]});var map,allLayers,maxLegendHeight,maxLegendDivHeight,printCount=0,legendLayers=[],measurement,identifyTask,identifyParams,aoiClicked=!1,initWetlandClicked=!1;require(["esri/map","esri/arcgis/utils","esri/config","esri/dijit/Geocoder","esri/dijit/HomeButton","esri/dijit/Legend","esri/dijit/LocateButton","esri/dijit/Measurement","esri/dijit/PopupTemplate","esri/graphic","esri/geometry/Extent","esri/geometry/Multipoint","esri/geometry/Point","esri/layers/ArcGISTiledMapServiceLayer","esri/renderers/UniqueValueRenderer","esri/SpatialReference","esri/symbols/PictureMarkerSymbol","esri/tasks/GeometryService","esri/tasks/IdentifyParameters","esri/tasks/IdentifyTask","esri/tasks/LegendLayer","esri/tasks/PrintTask","esri/tasks/PrintParameters","esri/tasks/PrintTemplate","esri/geometry/webMercatorUtils","esri/urlUtils","dojo/dom","dojo/dom-class","dojo/dnd/Moveable","dojo/query","dojo/on","dojo/domReady!"],function(e,a,t,i,n,r,o,s,l,d,p,c,m,g,y,u,f,h,b,v,w,L,S,T,I,E,k,_,D,x,O){function C(){$("#printModal").modal("show")}function P(){$("#getDataModal").modal("show")}function M(e){var a="";switch(e){case"CIR":a="color infrared";break;case"TC":a="true color";break;case"BW":a="black and white"}return a}function A(){K.activeGeocoder.searchExtent=null}function R(){A();var e=K.find();e.then(function(e){W(e)})}function N(e){F();var a=e.graphic?e.graphic:e.result.feature;a.setSymbol(X)}function W(e){if(e=e.results,e.length>0){F();for(var a=0;a  '+s+"

");$("#printJobsDiv").find("p.toRemove").remove(),$("#printModalBody").append(a),$("#printTitle").val(""),$("#printExecuteButton").button("reset")}function a(e){alert("Sorry, an unclear print error occurred. Please try refreshing the application to fix the problem")}var t=new S;t.map=map;var i=new T;i.exportOptions={width:500,height:400,dpi:300},i.format="PDF",i.layout="Letter ANSI A Landscape test",i.preserveScale=!1;var n=new w;n.layerId="wetlands";var r=new w;r.layerId="wetlandsRaster";var o=$("#printTitle").val();""==o?i.layoutOptions={titleText:"Wetlands",authorText:"National Wetlands Inventory (NWI)",copyrightText:"This page was produced by the NWI mapper",legendLayers:[n,r]}:i.layoutOptions={titleText:o,authorText:"National Wetlands Inventory (NWI)",copyrightText:"This page was produced by the NWI mapper",legendLayers:[n,r]};var s=i.layoutOptions.titleText;t.template=i;var l=new L("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task");l.execute(t,e,a),$.get("https://fwsprimary.wim.usgs.gov/pdfLoggingService/pdfLog.asmx/Log?printInfo="+map.getScale()+","+map.extent.xmin+","+map.extent.ymax+","+map.extent.xmax+","+map.extent.ymin+",NWIV2",function(e){})}function H(e,a){var t;document.getElementById&&(t=document.getElementById(e))&&t.style&&(t.style.cursor=a)}t.defaults.io.corsEnabledServers.push("fwsprimary.wim.usgs.gov"),esri.config.defaults.io.proxyUrl="https://fwsprimary.wim.usgs.gov/serviceProxy/proxy.ashx",t.defaults.geometryService=new h("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/Geometry/GeometryServer"),map=new e("mapDiv",{basemap:"hybrid",extent:new p(-14638882.654811008,2641706.3772205533,-6821514.898031538,6403631.161302788,new u({wkid:3857})),fitExtent:!0,showLabels:!0});var Y=new n({map:map,extent:new p(-14638882.654811008,2641706.3772205533,-6821514.898031538,6403631.161302788,new u({wkid:3857}))},"homeButton");Y.startup();var j=new o({map:map,scale:4514},"locateButton");j.startup(),measurement=new s({map:map,advancedLocationUnits:!0},k.byId("measurementDiv")),measurement.startup(),$(window).resize(function(){$("#legendCollapse").hasClass("in")?(maxLegendHeight=.9*$("#mapDiv").height(),$("#legendElement").css("height",maxLegendHeight),$("#legendElement").css("max-height",maxLegendHeight),maxLegendDivHeight=$("#legendElement").height()-parseInt($("#legendHeading").css("height").replace("px","")),$("#legendDiv").css("max-height",maxLegendDivHeight)):$("#legendElement").css("height","initial")}),$("#printNavButton").click(function(){C()}),$("#printExecuteButton").click(function(e){e.preventDefault(),$(this).button("loading"),U()}),$("#getDataButton").click(function(){P()}),$("#aboutLink").click(function(){$("#aboutModal").modal("show"),$("#aboutTab").trigger("click")}),$("#disclaimerLink").click(function(){$("#aboutModal").modal("show"),$("#disclaimerTab").trigger("click")}),$("#dataLimitationsLink").click(function(){$("#aboutModal").modal("show"),$("#dataLimitationsTab").trigger("click")}),$("#userCautionLink").click(function(){$("#aboutModal").modal("show"),$("#userCautionTab").trigger("click")}),$(".docs").hide(),O(map,"load",function(){var e=map.getScale().toFixed(0);$("#scale")[0].innerHTML=addCommas(e);var a=I.webMercatorToGeographic(map.extent.getCenter());$("#latitude").html(a.y.toFixed(3)),$("#longitude").html(a.x.toFixed(3))}),O(map,"zoom-end",function(){var e=map.getScale().toFixed(0);$("#scale")[0].innerHTML=addCommas(e)}),O(map,"mouse-move",function(e){if($("#mapCenterLabel").css("display","none"),null!=e.mapPoint){var a=I.webMercatorToGeographic(e.mapPoint);$("#latitude").html(a.y.toFixed(3)),$("#longitude").html(a.x.toFixed(3))}}),O(map,"pan-end",function(){$("#mapCenterLabel").css("display","inline");var e=I.webMercatorToGeographic(map.extent.getCenter());$("#latitude").html(e.y.toFixed(3)),$("#longitude").html(e.x.toFixed(3))});var z=new g("https://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer"),B=new g("https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer");O(k.byId("btnStreets"),"click",function(){map.setBasemap("streets"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnSatellite"),"click",function(){map.setBasemap("satellite"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnHybrid"),"click",function(){map.setBasemap("hybrid"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnTerrain"),"click",function(){map.setBasemap("terrain"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnGray"),"click",function(){map.setBasemap("gray"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnNatGeo"),"click",function(){map.setBasemap("national-geographic"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnOSM"),"click",function(){map.setBasemap("osm"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnTopo"),"click",function(){map.setBasemap("topo"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnNatlMap"),"click",function(){map.addLayer(B,1),map.removeLayer(z)}),O(k.byId("btnUsgsTopo"),"click",function(){map.addLayer(z,1),map.removeLayer(B)}),$("#wetlandDiv").lobiPanel({unpin:!1,reload:!1,minimize:!1,close:!1,expand:!1,editTitle:!1,maxWidth:600,maxHeight:400}),$("#wetlandDiv .dropdown").prepend("
"),$("#wetlandClose").click(function(){$("#wetlandDiv").css("visibility","hidden"),map.graphics.clear()}),identifyParams=new b,identifyParams.tolerance=0,identifyParams.returnGeometry=!0,identifyParams.layerOption=b.LAYER_OPTION_ALL,identifyParams.width=map.width,identifyParams.height=map.height,identifyTask=new v(allLayers[0].layers.Wetlands.url);var q=x(".title",map.infoWindow.domNode)[0],V=new D(map.infoWindow.domNode,{handle:q});O(V,"FirstMove",function(){var e=x(".outerPointer",map.infoWindow.domNode)[0];_.add(e,"hidden");var e=x(".pointer",map.infoWindow.domNode)[0];_.add(e,"hidden")}.bind(this)),O(map,"click",function(e){if(1==aoiClicked)return void(aoiClicked=!1);if(null==measurement.activeTool)if(map.graphics.clear(),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click"),$("#wetlandDiv").css("visibility","hidden"),identifyParams.geometry=e.mapPoint,identifyParams.mapExtent=map.extent,map.getLevel()>=12&&0==$("#huc-download-alert")[0].scrollHeight){y=new v(allLayers[0].layers.Wetlands.url);var a=y.execute(identifyParams),t=new b;t.returnGeometry=!0,t.tolerance=0,t.width=map.width,t.height=map.height,t.geometry=e.mapPoint,t.layerOption=b.LAYER_OPTION_ALL,t.mapExtent=map.extent,t.layerIds=[0,1],H("mainDiv","wait"),map.setCursor("wait");var i=$("#wetlandDiv").data("lobiPanel"),n=$(document).height(),r=$(document).width(),o=.9,s=n*o,l=r*o,d=600,p=325;500>n&&($("#wetlandDiv").height(s),p=$("#floodToolsDiv").height()-50),500>r&&($("#wetlandDiv").width(l),d=$("#floodToolsDiv").width()-50);var c=.5*r-.5*$("#wetlandDiv").width(),m=.5*n-.5*$("#wetlandDiv").height();0==initWetlandClicked&&i.setPosition(c,m),1==i.isPinned()&&i.unpin(),initWetlandClicked=!0,$(".docs").hide(),$(".docItems").empty(),$("#reportInfo .panel-heading").addClass("loading-hide"),$("#reportInfo .panel-body").addClass("loading-hide"),$("#wetlandDiv").addClass("loading-background"),$(".tab-pane").addClass("hidden-loading"),a.addCallback(function(a){function i(e){var a;return a=0==e||""==e?"Link":e}if(a.length>1){var n,r,o,s,l=new b;l.returnGeometry=!1,l.tolerance=0,l.width=map.width,l.height=map.height,l.geometry=e.mapPoint,l.layerOption=b.LAYER_OPTION_ALL,l.mapExtent=map.extent,l.layerIds=[0,4];var d=new v(allLayers[1].layers["Source Type"].url),p=d.execute(l);p.addCallback(function(e){if(e.length>=1){for(var a=0;a"+i.PDF_NAME+"")):($("#"+e[t].value.toLowerCase()+"Docs").show(),$("#"+e[t].value.toLowerCase()+"Docs .docItems").append(""+i.Title+""))}}$("#reportInfo .panel-heading").removeClass("loading-hide"),$("#reportInfo .panel-body").removeClass("loading-hide"),$("#wetlandDiv").removeClass("loading-background"),$(".tab-pane").removeClass("hidden-loading")}),$("#wetlandTab").trigger("click"),$("#wetlandDiv").css("visibility","visible");for(var c=0;c10?$("#imageScalePopup").html("The wetlands and deepwater habitats in this area were photo interpreted using 1:"+addCommas(s.IMAGE_SCALE)+" scale, "):0!=s.IMAGE_SCALE&&$("#imageScalePopup").html("The wetlands and deepwater habitats in this area were photo interpreted using "+s.IMAGE_SCALE+" meter (or less) digital, "):$("#imageScalePopup").html(""),"Scalable"==s.SOURCE_TYPE?$("#sourceTypePopup").html("The data in this area are considered an interim scalable map product. Click here for a full description of Scalable Wetland Mapping. "):"Null"==s.SOURCE_TYPE?$("#sourceTypePopup").html("Photo interpretation information is not available for this project."):$("#sourceTypePopup").html(""+M(s.SOURCE_TYPE)+" imagery from "+i(s.IMAGE_YR)+". "),"None"!=s.SUPPMAPINFO?($("#suppMapInfo").empty(),$("#suppMapInfo").append('Click here for project specific mapping conventions and information.')):$("#suppMapInfo").empty();var u=["ATTRIBUTE","SYSTEM","SYSTEM_NAME","SYSTEM_DEFINITION","SUBSYSTEM","SUBSYSTEM_NAME","SUBSYSTEM_DEFINITION","CLASS","CLASS_NAME","CLASS_DEFINITION","SUBCLASS","SUBCLASS_NAME","SUBCLASS_DEFINITION","SPLIT_CLASS","SPLIT_CLASS_NAME","SPLIT_CLASS_DEFINITION","SPLIT_SUBCLASS","SPLIT_SUBCLASS_NAME","SPLIT_SUBCLASS_DEFINITION","WATER_REGIME","WATER_REGIME_NAME","WATER_REGIME_SUBGROUP","WATER_REGIME_DEFINITION","MODIFIER_1","MODIFIER_1_NAME","MODIFIER_1_GROUP","MODIFIER_1_SUBGROUP","MODIFIER_1_DEFINITION","MODIFIER_2","MODIFIER_2_NAME","MODIFIER_2_GROUP","MODIFIER_2_SUBGROUP","MODIFIER_2_DEFINITION","MODIFIER_3","MODIFIER_3_NAME","MODIFIER_3_GROUP","MODIFIER_3_SUBGROUP","MODIFIER_3_DEFINITION"];$.each(u,function(e){var a=u[e],t=o[a];"Null"!=t?"SPLIT_CLASS"!=a&&"SPLIT_CLASS_NAME"!=a&&"SPLIT_CLASS_DEFINITION"!=a||o.CLASS!=o.SPLIT_CLASS?($("#des"+a).html(o[a]),$("#des"+a).show(),$("#des"+a).parent().show()):$("#SPLIT_CLASS_GROUP").hide():$("#des"+a).parent().hasClass("decoder-group")&&$("#des"+a).parent().hide()});var f=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,f),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=I.webMercatorToGeographic(n.geometry),t=a.getExtent();map.setExtent(t,!0)}),$("#zoomProjectLink").click(function(e){var a=I.webMercatorToGeographic(r.geometry),t=a.getExtent();map.setExtent(t,!0);var i=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));r.geometry.spatialReference=map.spatialReference;var n=r;n.setSymbol(i),map.graphics.add(n)})}else if(a.length<=1){y=new v(allLayers[0].layers.Riparian.url);var h=y.execute(identifyParams);h.addCallback(function(a){if(a.length>1){for(var i,n,r,o,s=0;sclick here";var c=new esri.InfoTemplate("Riparian","Classification: "+r.ATTRIBUTE+" (decode)

Wetland Type: "+r.WETLAND_TYPE+"
Acres: "+Number(r.ACRES).toFixed(2)+"
Image Date(s): "+o.IMAGE_DATE+"
Project Metadata:"+p+"

Zoom to wetland

");$("#acreage").text(Number(r.ACRES).toFixed(2)),$("#wetlandCode").text(r.ATTRIBUTE),$("#wetlandType").text(r.WETLAND_TYPE),$("#decoderLink").click(function(e){$("#descriptionTab").trigger("click")}),$("#imageScalePopup").text(addCommas(o.IMAGE_SCALE)),$("#sourceTypePopup").text(M(o.SOURCE_TYPE)),0==o.IMAGE_DATE?$("#imageDate").append("Link"):$("#imageDate").text(o.IMAGE_DATE),$("#suppMapInfoLink").attr("href",o.SUPPMAPINFO),i.setInfoTemplate(c),map.infoWindow.setFeatures([i]),map.infoWindow.show(e.mapPoint);var m=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,m),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=I.webMercatorToGeographic(i.geometry),t=a.getExtent();map.setExtent(t,!0)}),$("#zoomProjectLink").click(function(e){var a=I.webMercatorToGeographic(n.geometry),t=a.getExtent();map.setExtent(t,!0);var i=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));n.geometry.spatialReference=map.spatialReference;var r=n;r.setSymbol(i),map.graphics.add(r)})}else if(a.length<=1){var g=new v(allLayers[2].layers["Historic Wetland Data"].url),y=g.execute(t);y.addCallback(function(a){if(a.length>=1){for(var t,i,n,r=0;rclick here",(""==n.IMAGE_DATE||"0"==n.IMAGE_DATE||0==n.IMAGE_DATE)&&(n.IMAGE_DATE=l);var d=new esri.InfoTemplate("Historic Wetland","

Wetland Type: "+i.WETLAND_TYPE+"
Acres: "+Number(i.ACRES).toFixed(2)+"
Project Metadata:"+l+"

Zoom to wetland

");t.setInfoTemplate(d),map.infoWindow.setFeatures([t]),map.infoWindow.show(e.mapPoint,map.getInfoWindowAnchor(e.screenPoint));var p=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,p),$("infoWindowLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=I.webMercatorToGeographic(t.geometry),i=a.getExtent();map.setExtent(i,!0)})}else H("mainDiv","default"),map.setCursor("default"),map.infoWindow.hide()})}})}})}else if($("#huc-download-alert")[0].scrollHeight>0){var g=new b;g.returnGeometry=!0,g.tolerance=0,g.width=map.width,g.height=map.height,g.geometry=e.mapPoint,g.layerOption=b.LAYER_OPTION_TOP,g.mapExtent=map.extent,g.spatialReference=map.spatialReference;var y=new v(allLayers[0].layers.HUC8.url),u=y.execute(g);u.addCallback(function(e){if(e.length>=1){var a;a=e[0].feature;var t=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));a.geometry.spatialReference=map.spatialReference;var i=a;i.setSymbol(t),map.graphics.add(i);var n=I.webMercatorToGeographic(a.geometry),r=n.getExtent();map.setExtent(r,!0);var o=e[0].feature.attributes.HUC8,s=e[0].feature.attributes.Name;dojo.byId("innerAlert").innerHTML="

Download Data

Click the link below to download data for "+s+" watershed

HUC "+o+"

"}})}}),$(document).on("click","#showHUCs",function(){event.preventDefault(),$("#getDataModal").modal("hide"),$("#huc-download-alert").slideDown(250),map.getLayer("huc8").setVisibility(!0),dojo.byId("innerAlert").innerHTML="

Download Data

Please review the Data Download (www.fws.gov/wetlands/Data/Data-Download.html) page for information on how to download data, what is included in the download and data use limitations and disclaimer.


Click the map to select a watershed from which to extract wetland data.

"});var K=new i({value:"",maxLocations:25,autoComplete:!0,arcgisGeocoder:!0,autoNavigate:!1,map:map},"geosearch");K.startup(),K.on("select",N),K.on("findResults",W),K.on("clear",F),O(K.inputNode,"keydown",function(e){13==e.keyCode&&A()});var X=G("../images/purple-pin.png",0,12,13,24);map.on("load",function(){map.infoWindow.set("highlight",!1),map.infoWindow.set("titleInBody",!1)}),O(k.byId("btnGeosearch"),"click",R),$(document).ready(function(){function e(){$("#geosearchModal").modal("show")}function a(){$("#aboutModal").modal("show")}$("#geosearchNav").click(function(){e()}),$("#aboutNav").click(function(){a()}),$("#html").niceScroll(),$("#sidebar").niceScroll(),$("#sidebar").scroll(function(){$("#sidebar").getNiceScroll().resize()}),maxLegendHeight=.9*$("#mapDiv").height(),$("#legendElement").css("max-height",maxLegendHeight),maxLegendDivHeight=maxLegendHeight-parseInt($("#legendHeading").css("height").replace("px","")),$("#legendDiv").css("max-height",maxLegendDivHeight),$("#legendCollapse").on("shown.bs.collapse",function(){if(0==legendDiv.innerHTML.length){var e=new r({map:map,layerInfos:legendLayers},"legendDiv");e.startup(),$("#legendDiv").niceScroll()}}),$("#legendCollapse").on("hide.bs.collapse",function(){$("#legendElement").css("height","initial")}),$("#measurementCollapse").on("shown.bs.collapse",function(){$("#measureLabel").show()}),$("#measurementCollapse").on("hide.bs.collapse",function(){window.innerWidth<=767&&$("#measureLabel").hide()})}),require(["esri/Color","esri/InfoTemplate","esri/tasks/locator","esri/tasks/query","esri/tasks/QueryTask","esri/graphicsUtils","esri/geometry/Point","esri/geometry/Extent","esri/layers/ArcGISDynamicMapServiceLayer","esri/layers/ArcGISImageServiceLayer","esri/layers/FeatureLayer","esri/layers/LabelClass","esri/layers/WMSLayer","esri/layers/WMSLayerInfo","esri/symbols/TextSymbol","esri/tasks/GeometryService","dijit/form/CheckBox","dijit/form/RadioButton","dojo/query","dojo/dom","dojo/dom-class","dojo/dom-construct","dojo/dom-style","dojo/on"],function(e,a,t,i,n,r,o,s,l,d,p,c,m,g,y,u,f,h,b,v,w,L,S,T){function I(t,i,n,r,o,s,l){if(map.addLayer(n),0==l.legendLabel){var d=document.createElement("style");d.type="text/css",d.innerHTML="[id*="+n.id+"] .esriLegendLayerLabel { display: none; }",document.getElementsByTagName("head")[0].appendChild(d)}if("fwsTracts"==n.id){var p=new e("#FFF"),m=(new y).setColor(p);m.font.setSize("10pt"),m.font.setFamily("arial");var g={labelExpressionInfo:{value:"{LABELNAME}"}},u=new c(g);u.symbol=m,n.setLabelingInfo([u])}if("aoi"==n.id&&T(n,"load",function(e){T(n,"click",function(e){aoiClicked=!0;var t=e.graphic.attributes.HYPERLINK_2;if("None"==t){var i=new a("${NAME}","Type: ${TYPE}
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");n.setInfoTemplate(i)}else{var i=new a("${NAME}","Type: ${TYPE}
Ramsar: click here
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");n.setInfoTemplate(i)}})}),E.push([o,camelize(r),n]),o){if(!$("#"+camelize(o)).length){var f;if("Data Source"==o)var f=$('
');else var f=$('
"); -f.click(function(e){f.find("i.glyphspan").toggleClass("fa-check-square-o fa-square-o"),$.each(E,function(e,a){var t=map.getLayer(a[2].id);if(a[0]==o)if($("#"+a[1]).find("i.glyphspan").hasClass("fa-dot-circle-o")&&f.find("i.glyphspan").hasClass("fa-check-square-o")){console.log("adding layer: ",a[1]),map.addLayer(a[2]);var t=map.getLayer(a[2].id);t.setVisibility(!0)}else if(f.find("i.glyphspan").hasClass("fa-square-o")){console.log("removing layer: ",a[1]);var t=map.getLayer(a[2].id);t.setVisibility(!1)}})});var h=$('
');$("#toggle").append(h)}if(n.visible)var b=$('
");else var b=$('
");$("#"+camelize(o)).append(b),b.click(function(e){if($(this).find("i.glyphspan").hasClass("fa-circle-o")){$(this).find("i.glyphspan").toggleClass("fa-dot-circle-o fa-circle-o");var a=$(this)[0].id;$.each(E,function(e,t){if(t[0]==o)if(t[1]==a&&$("#"+camelize(o+" Root")).find("i.glyphspan").hasClass("fa-check-square-o")){console.log("adding layer: ",t[1]),map.addLayer(t[2]);var i=map.getLayer(t[2].id);i.setVisibility(!0)}else if(t[1]==a&&$("#"+camelize(o+" Root")).find("i.glyphspan").hasClass("fa-square-o"))console.log("group heading not checked");else{console.log("removing layer: ",t[1]);var i=map.getLayer(t[2].id);i.setVisibility(!1),$("#"+t[1]).find("i.glyphspan").hasClass("fa-dot-circle-o")&&$("#"+t[1]).find("i.glyphspan").toggleClass("fa-dot-circle-o fa-circle-o")}})}})}else if(l.includeInLayerList){if(n.visible&&void 0!==l.hasOpacitySlider&&1==l.hasOpacitySlider&&void 0!==l.moreinfo&&l.moreinfo)var b=$('
');else if(!n.visible&&void 0!==l.hasOpacitySlider&&1==l.hasOpacitySlider&&void 0!==l.moreinfo&&l.moreinfo)var b=$('
');else if(n.visible&&void 0!==l.hasOpacitySlider&&1==l.hasOpacitySlider)var b=$('
');else if(n.visible||void 0===l.hasOpacitySlider||1!=l.hasOpacitySlider)if(n.visible&&void 0!==l.moreinfo&&l.moreinfo)var b=$('
');else if(!n.visible&&void 0!==l.moreinfo&&l.moreinfo)var b=$('
');else if(n.visible)var b=$('
");else var b=$('
");else var b=$('
');b.click(function(e){$(this).find("i.glyphspan").toggleClass("fa-check-square-o fa-square-o"),$(this).find("button").button("toggle"),n.visible?n.setVisibility(!1):n.setVisibility(!0),l.otherLayersToggled&&$.each(l.otherLayersToggled,function(e,a){var t=map.getLayer(a);t.setVisibility(n.visible)})})}if(void 0!==i){var v=camelize(t);if(!$("#"+v).length){if(i)var w=$('
");else var w=$('
');$("#toggle").append(w)}if(o){if($("#"+v).append(f),$("#"+v).append(h),void 0!==l.moreinfo&&l.moreinfo){var L="#info"+camelize(o),S=$(L);S.click(function(e){window.open(l.moreinfo,"_blank"),e.preventDefault(),e.stopPropagation()})}if($("#opacity"+camelize(o)).length>0){var L="#opacity"+camelize(o),I=$(L);I.click(function(e){e.preventDefault(),e.stopPropagation(),$(".opacitySlider").remove();var a=map.getLayer(s.id).opacity,t=$('
');$("body").append(t),$("#slider")[0].value=100*a,$(".opacitySlider").css("left",event.clientX-180),$(".opacitySlider").css("top",event.clientY-50),$(".opacitySlider").mouseleave(function(){$(".opacitySlider").remove()}),$(".opacityClose").click(function(){$(".opacitySlider").remove()}),$("#slider").change(function(e){var a=$("#slider")[0].value/100;console.log("o: "+a),$("#opacityValue").html("Opacity: "+a),map.getLayer(s.id).setOpacity(a),l.otherLayersToggled&&$.each(l.otherLayersToggled,function(e,t){var i=map.getLayer(t);i.setOpacity(a)})})})}}else{if($("#"+v).append(b),void 0!==l.moreinfo&&l.moreinfo){var L="#info"+camelize(r),S=$(L);S.click(function(e){window.open(l.moreinfo,"_blank"),e.preventDefault(),e.stopPropagation()})}$("#opacity"+camelize(r)).length>0&&$("#opacity"+camelize(r)).click(function(e){e.preventDefault(),e.stopPropagation(),$(".opacitySlider").remove();var a=map.getLayer(s.id).opacity,t=$('
');$("body").append(t),$("#slider")[0].value=100*a,$(".opacitySlider").css("left",event.clientX-180),$(".opacitySlider").css("top",event.clientY-50),$(".opacitySlider").mouseleave(function(){$(".opacitySlider").remove()}),$(".opacityClose").click(function(){$(".opacitySlider").remove()}),$("#slider").change(function(e){var a=$("#slider")[0].value/100;console.log("o: "+a),$("#opacityValue").html("Opacity: "+a),map.getLayer(s.id).setOpacity(a),l.otherLayersToggled&&$.each(l.otherLayersToggled,function(e,t){var i=map.getLayer(t);i.setOpacity(a)})})})}}else if($("#toggle").append(b),void 0!==l.moreinfo&&l.moreinfo){var L="#info"+camelize(r),S=$(L);S.click(function(e){alert(e.currentTarget.id),e.preventDefault(),e.stopPropagation()})}}var E=(new u("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/Geometry/GeometryServer"),[]);$.each(allLayers,function(e,a){console.log("processing: ",a.groupHeading),$.each(a.layers,function(e,t){var i="";if(t.wimOptions.exclusiveGroupName&&(i=t.wimOptions.exclusiveGroupName),"agisFeature"===t.wimOptions.layerType){var n=new p(t.url,t.options);void 0!==t.wimOptions.renderer&&n.setRenderer(t.wimOptions.renderer),t.wimOptions&&1==t.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),I(a.groupHeading,a.showGroupHeading,n,e,i,t.options,t.wimOptions)}else if("agisWMS"===t.wimOptions.layerType){var n=new m(t.url,{resourceInfo:t.options.resourceInfo,visibleLayers:t.options.visibleLayers},t.options);t.wimOptions&&1==t.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),I(a.groupHeading,a.showGroupHeading,n,e,i,t.options,t.wimOptions)}else if("agisDynamic"===t.wimOptions.layerType){var n=new l(t.url,t.options);if(t.visibleLayers&&n.setVisibleLayers(t.visibleLayers),t.wimOptions&&t.wimOptions.layerDefinitions){var r=[];$.each(t.wimOptions.layerDefinitions,function(e,a){r[e]=a}),n.setLayerDefinitions(r)}t.wimOptions&&1==t.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),I(a.groupHeading,a.showGroupHeading,n,e,i,t.options,t.wimOptions)}else if("agisImage"===t.wimOptions.layerType){var n=new d(t.url,t.options);t.wimOptions&&1==t.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),t.visibleLayers&&n.setVisibleLayers(t.visibleLayers),I(a.groupHeading,a.showGroupHeading,n,e,i,t.options,t.wimOptions)}})})})}),$(".close-alert").click(function(){$(this).parent().slideUp(250)}),$(document).ready(function(){}); \ No newline at end of file +function addCommas(e){e+="";for(var a=e.split("."),i=a[0],t=a.length>1?"."+a[1]:"",n=/(\d+)(\d{3})/;n.test(i);)i=i.replace(n,"$1,$2");return i+t}function camelize(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,a){return 0===a?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")}function stateSelected(){var e=$("#stateSelect")[0];if(e.selectedIndex>0){var a=e.options[e.selectedIndex].value,i=e.options[e.selectedIndex].label;$("#downloadState").html("Download Geodatabase and Shapefile data for "+i+"")}else $("#downloadState").html("")}function hucLinkListener(e){console.log(e),$.get("https://fwsprimary.wim.usgs.gov/downloadLoggingService/downloadLog.asmx/Log?huc="+e+",NWIV2",function(e){})}var allLayers,tractRenderer,centroidRenderer;require(["esri/Color","esri/InfoTemplate","esri/layers/LabelClass","esri/renderers/SimpleRenderer","esri/symbols/SimpleFillSymbol","esri/symbols/SimpleLineSymbol","esri/symbols/SimpleMarkerSymbol","esri/symbols/TextSymbol","dojo/domReady!"],function(e,a,i,t,n,r,o,s){var l=new o(o.STYLE_CIRCLE,5,new r(r.STYLE_SOLID,new e([255,255,255]),.5),new e([0,0,0,1]));centroidRenderer=new t(l);var d=new n(n.STYLE_SOLID,new r(r.STYLE_SOLID,new e([0,0,0]),.5),new e([115,178,115,.75]));tractRenderer=new t(d);var p=new a("${NAME}","Type: ${TYPE}
Ramsar: click here
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");allLayers=[{groupHeading:"ESRI dynamic map services",showGroupHeading:!1,includeInLayerList:!0,layers:{Wetlands:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands/MapServer",options:{id:"wetlands",opacity:.75,visible:!0},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,includeLegend:!0,legendLabel:!1,moreinfo:"https://www.fws.gov/wetlands/Data/Wetlands-Product-Summary.html",otherLayersToggled:["wetlandsStatus","wetlandsRaster"]}},"Wetlands Status":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands_Status/MapServer",options:{id:"wetlandsStatus",layers:[0],visible:!0,maxScale:285e3,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!1,includeLegend:!0,esriLegendLabel:!1}},"Wetlands ":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands_Raster/ImageServer",options:{id:"wetlandsRaster",visible:!0,maxScale:285e3,opacity:.6},wimOptions:{type:"layer",layerType:"agisImage",includeInLayerList:!1,includeLegend:!0,otherLayersToggled:["wetlands","wetlandsStatus"]}},Riparian:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Riparian/MapServer",visibleLayers:[0],options:{id:"riparian",opacity:.75,visible:!0},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/wetlands/Other/Riparian-Product-Summary.html",includeLegend:!0,legendLabel:!1}},"Riparian Mapping Areas":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Riparian/MapServer",visibleLayers:[1],options:{id:"riparianStatus",visible:!1,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/wetlands/Other/Riparian-Product-Summary.html",includeLegend:!0,legendLabel:!1}},HUC8:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/HUCs/MapServer",options:{id:"huc8",opacity:1,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!1,includeLegend:!0,esriLegendLabel:!1}}}},{groupHeading:"Data Source Group",showGroupHeading:!1,includeInLayerList:!0,moreinfo:"https://www.fws.gov/wetlands/Documents/Scalable-Wetland-Mapping-Fact-Sheet.pdf",otherLayersToggled:["sourceType","imageScale","imageYear"],layers:{"Source Type":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[1],options:{id:"sourceType",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["imageScale","imageYear"],legendLabel:!1}},"Image Scale":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[2],options:{id:"imageScale",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["sourceType","imageYear"],legendLabel:!1}},"Image Year":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[3],options:{id:"imageYear",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["sourceType","imageScale"],legendLabel:!1}}}},{groupHeading:"refuges and historic",showGroupHeading:!1,includeInLayerList:!0,layers:{"Areas of Interest":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Areas_of_Interest/MapServer/0",options:{id:"aoi",opacity:1,visible:!1,outFields:["*"],infoTemplate:p},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!0,hasOpacitySlider:!1,moreinfo:"https://www.fws.gov/wetlands/Data/metadata/FWS_Wetland_Areas_of_Interest.xml",includeLegend:!0}},"FWS Managed Lands Centroids":{url:"https://services.arcgis.com/QVENGdaPbd4LUkLV/ArcGIS/rest/services/FWSCentroids/FeatureServer/0",options:{id:"fwsCentroids",opacity:.75,maxScale:18e6,visible:!1},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!1,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html",includeLegend:!0,esriLegendLabel:!1,renderer:centroidRenderer}},"FWS Managed Lands":{url:"https://services.arcgis.com/QVENGdaPbd4LUkLV/arcgis/rest/services/National_Wildlife_Refuge_System_Boundaries/FeatureServer/0",options:{id:"fwsTracts",opacity:.75,minScale:18e6,visible:!1,outFields:["*"],showLabels:!0},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html",otherLayersToggled:["fwsCentroids"],includeLegend:!0,esriLegendLabel:!1,renderer:tractRenderer}},"Historic Wetland Data":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Historic_Wetlands/MapServer",visibleLayers:[0,1],options:{id:"historic",visible:!1,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,hasOpacitySlider:!0,moreinfo:"https://www.fws.gov/wetlands/Data/Historic-Wetlands-Data.html",includeLegend:!0,legendLabel:!1}}}}]});var map,allLayers,maxLegendHeight,maxLegendDivHeight,printCount=0,legendLayers=[],measurement,identifyTask,identifyParams,aoiClicked=!1,initWetlandClicked=!1;require(["esri/map","esri/arcgis/utils","esri/config","esri/dijit/Geocoder","esri/dijit/HomeButton","esri/dijit/Legend","esri/dijit/LocateButton","esri/dijit/Measurement","esri/dijit/PopupTemplate","esri/graphic","esri/geometry/Extent","esri/geometry/Multipoint","esri/geometry/Point","esri/layers/ArcGISTiledMapServiceLayer","esri/renderers/UniqueValueRenderer","esri/SpatialReference","esri/symbols/PictureMarkerSymbol","esri/tasks/GeometryService","esri/tasks/IdentifyParameters","esri/tasks/IdentifyTask","esri/tasks/LegendLayer","esri/tasks/PrintTask","esri/tasks/PrintParameters","esri/tasks/PrintTemplate","esri/geometry/webMercatorUtils","esri/urlUtils","dojo/dom","dojo/dom-class","dojo/dnd/Moveable","dojo/query","dojo/on","dojo/domReady!"],function(e,a,i,t,n,r,o,s,l,d,p,c,m,g,y,u,f,h,b,v,w,L,S,T,I,E,k,_,D,x,O){function C(){$("#printModal").modal("show")}function P(){$("#getDataModal").modal("show")}function M(e){var a="";switch(e){case"CIR":a="color infrared";break;case"TC":a="true color";break;case"BW":a="black and white"}return a}function A(){K.activeGeocoder.searchExtent=null}function R(){A();var e=K.find();e.then(function(e){W(e)})}function N(e){F();var a=e.graphic?e.graphic:e.result.feature;a.setSymbol(X)}function W(e){if(e=e.results,e.length>0){F();for(var a=0;a  '+s+"

");$("#printJobsDiv").find("p.toRemove").remove(),$("#printModalBody").append(a),$("#printTitle").val(""),$("#printExecuteButton").button("reset")}function a(e){alert("Sorry, an unclear print error occurred. Please try refreshing the application to fix the problem")}var i=new S;i.map=map;var t=new T;t.exportOptions={width:500,height:400,dpi:300},t.format="PDF",t.layout="Letter ANSI A Landscape test",t.preserveScale=!1;var n=new w;n.layerId="wetlands";var r=new w;r.layerId="wetlandsRaster";var o=$("#printTitle").val();""==o?t.layoutOptions={titleText:"Wetlands",authorText:"National Wetlands Inventory (NWI)",copyrightText:"This page was produced by the NWI mapper",legendLayers:[n,r]}:t.layoutOptions={titleText:o,authorText:"National Wetlands Inventory (NWI)",copyrightText:"This page was produced by the NWI mapper",legendLayers:[n,r]};var s=t.layoutOptions.titleText;i.template=t;var l=new L("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task");l.execute(i,e,a),$.get("https://fwsprimary.wim.usgs.gov/pdfLoggingService/pdfLog.asmx/Log?printInfo="+map.getScale()+","+map.extent.xmin+","+map.extent.ymax+","+map.extent.xmax+","+map.extent.ymin+",NWIV2",function(e){})}function H(e,a){var i;document.getElementById&&(i=document.getElementById(e))&&i.style&&(i.style.cursor=a)}i.defaults.io.corsEnabledServers.push("fwsprimary.wim.usgs.gov"),esri.config.defaults.io.proxyUrl="https://fwsprimary.wim.usgs.gov/serviceProxy/proxy.ashx",i.defaults.geometryService=new h("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/Geometry/GeometryServer"),map=new e("mapDiv",{basemap:"hybrid",extent:new p(-14638882.654811008,2641706.3772205533,-6821514.898031538,6403631.161302788,new u({wkid:3857})),fitExtent:!0,showLabels:!0});var Y=new n({map:map,extent:new p(-14638882.654811008,2641706.3772205533,-6821514.898031538,6403631.161302788,new u({wkid:3857}))},"homeButton");Y.startup();var j=new o({map:map,scale:4514},"locateButton");j.startup(),measurement=new s({map:map,advancedLocationUnits:!0},k.byId("measurementDiv")),measurement.startup(),$(window).resize(function(){$("#legendCollapse").hasClass("in")?(maxLegendHeight=.9*$("#mapDiv").height(),$("#legendElement").css("height",maxLegendHeight),$("#legendElement").css("max-height",maxLegendHeight),maxLegendDivHeight=$("#legendElement").height()-parseInt($("#legendHeading").css("height").replace("px","")),$("#legendDiv").css("max-height",maxLegendDivHeight)):$("#legendElement").css("height","initial")}),$("#printNavButton").click(function(){C()}),$("#printExecuteButton").click(function(e){e.preventDefault(),$(this).button("loading"),U()}),$("#getDataButton").click(function(){P()}),$("#aboutLink").click(function(){$("#aboutModal").modal("show"),$("#aboutTab").trigger("click")}),$("#disclaimerLink").click(function(){$("#aboutModal").modal("show"),$("#disclaimerTab").trigger("click")}),$("#dataLimitationsLink").click(function(){$("#aboutModal").modal("show"),$("#dataLimitationsTab").trigger("click")}),$("#userCautionLink").click(function(){$("#aboutModal").modal("show"),$("#userCautionTab").trigger("click")}),$(".docs").hide(),O(map,"load",function(){var e=map.getScale().toFixed(0);$("#scale")[0].innerHTML=addCommas(e);var a=I.webMercatorToGeographic(map.extent.getCenter());$("#latitude").html(a.y.toFixed(3)),$("#longitude").html(a.x.toFixed(3))}),O(map,"zoom-end",function(){var e=map.getScale().toFixed(0);$("#scale")[0].innerHTML=addCommas(e)}),O(map,"mouse-move",function(e){if($("#mapCenterLabel").css("display","none"),null!=e.mapPoint){var a=I.webMercatorToGeographic(e.mapPoint);$("#latitude").html(a.y.toFixed(3)),$("#longitude").html(a.x.toFixed(3))}}),O(map,"pan-end",function(){$("#mapCenterLabel").css("display","inline");var e=I.webMercatorToGeographic(map.extent.getCenter());$("#latitude").html(e.y.toFixed(3)),$("#longitude").html(e.x.toFixed(3))});var z=new g("https://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer"),B=new g("https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer");O(k.byId("btnStreets"),"click",function(){map.setBasemap("streets"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnSatellite"),"click",function(){map.setBasemap("satellite"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnHybrid"),"click",function(){map.setBasemap("hybrid"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnTerrain"),"click",function(){map.setBasemap("terrain"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnGray"),"click",function(){map.setBasemap("gray"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnNatGeo"),"click",function(){map.setBasemap("national-geographic"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnOSM"),"click",function(){map.setBasemap("osm"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnTopo"),"click",function(){map.setBasemap("topo"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnNatlMap"),"click",function(){map.addLayer(B,1),map.removeLayer(z)}),O(k.byId("btnUsgsTopo"),"click",function(){map.addLayer(z,1),map.removeLayer(B)}),$("#wetlandDiv").lobiPanel({unpin:!1,reload:!1,minimize:!1,close:!1,expand:!1,editTitle:!1,maxWidth:600,maxHeight:400}),$("#wetlandDiv .dropdown").prepend("
"),$("#wetlandClose").click(function(){$("#wetlandDiv").css("visibility","hidden"),map.graphics.clear()}),identifyParams=new b,identifyParams.tolerance=0,identifyParams.returnGeometry=!0,identifyParams.layerOption=b.LAYER_OPTION_ALL,identifyParams.width=map.width,identifyParams.height=map.height,identifyTask=new v(allLayers[0].layers.Wetlands.url);var q=x(".title",map.infoWindow.domNode)[0],V=new D(map.infoWindow.domNode,{handle:q});O(V,"FirstMove",function(){var e=x(".outerPointer",map.infoWindow.domNode)[0];_.add(e,"hidden");var e=x(".pointer",map.infoWindow.domNode)[0];_.add(e,"hidden")}.bind(this)),O(map,"click",function(e){if(1==aoiClicked)return void(aoiClicked=!1);if(null==measurement.activeTool)if(map.graphics.clear(),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click"),$("#wetlandDiv").css("visibility","hidden"),identifyParams.geometry=e.mapPoint,identifyParams.mapExtent=map.extent,map.getLevel()>=12&&0==$("#huc-download-alert")[0].scrollHeight){y=new v(allLayers[0].layers.Wetlands.url);var a=y.execute(identifyParams),i=new b;i.returnGeometry=!0,i.tolerance=0,i.width=map.width,i.height=map.height,i.geometry=e.mapPoint,i.layerOption=b.LAYER_OPTION_ALL,i.mapExtent=map.extent,i.layerIds=[0,1],H("mainDiv","wait"),map.setCursor("wait");var t=$("#wetlandDiv").data("lobiPanel"),n=$(document).height(),r=$(document).width(),o=.9,s=n*o,l=r*o,d=600,p=325;500>n&&($("#wetlandDiv").height(s),p=$("#floodToolsDiv").height()-50),500>r&&($("#wetlandDiv").width(l),d=$("#floodToolsDiv").width()-50);var c=.5*r-.5*$("#wetlandDiv").width(),m=.5*n-.5*$("#wetlandDiv").height();0==initWetlandClicked&&t.setPosition(c,m),1==t.isPinned()&&t.unpin(),initWetlandClicked=!0,$(".docs").hide(),$(".docItems").empty(),$("#reportInfo .panel-heading").addClass("loading-hide"),$("#reportInfo .panel-body").addClass("loading-hide"),$("#wetlandDiv").addClass("loading-background"),$(".tab-pane").addClass("hidden-loading"),a.addCallback(function(a){function t(e){var a;return a=0==e||""==e?"Link":e}if(a.length>1){var n,r,o,s,l=new b;l.returnGeometry=!1,l.tolerance=0,l.width=map.width,l.height=map.height,l.geometry=e.mapPoint,l.layerOption=b.LAYER_OPTION_ALL,l.mapExtent=map.extent,l.layerIds=[0,4];var d=new v(allLayers[1].layers["Source Type"].url),p=d.execute(l);p.addCallback(function(e){if(e.length>=1){for(var a=0;a"+t.PDF_NAME+"")):($("#"+e[i].value.toLowerCase()+"Docs").show(),$("#"+e[i].value.toLowerCase()+"Docs .docItems").append(""+t.Title+""))}}$("#reportInfo .panel-heading").removeClass("loading-hide"),$("#reportInfo .panel-body").removeClass("loading-hide"),$("#wetlandDiv").removeClass("loading-background"),$(".tab-pane").removeClass("hidden-loading")}),$("#wetlandTab").trigger("click"),$("#wetlandDiv").css("visibility","visible");for(var c=0;c10?$("#imageScalePopup").html("The wetlands and deepwater habitats in this area were photo interpreted using 1:"+addCommas(s.IMAGE_SCALE)+" scale, "):0!=s.IMAGE_SCALE&&$("#imageScalePopup").html("The wetlands and deepwater habitats in this area were photo interpreted using "+s.IMAGE_SCALE+" meter (or less) digital, "):$("#imageScalePopup").html(""),"Scalable"==s.SOURCE_TYPE?$("#sourceTypePopup").html("The data in this area are considered an interim scalable map product. Click here for a full description of Scalable Wetland Mapping. "):"Null"==s.SOURCE_TYPE?$("#sourceTypePopup").html("Photo interpretation information is not available for this project."):$("#sourceTypePopup").html(""+M(s.SOURCE_TYPE)+" imagery from "+t(s.IMAGE_YR)+". "),"None"!=s.SUPPMAPINFO?($("#suppMapInfo").empty(),$("#suppMapInfo").append('Click here for project specific mapping conventions and information.')):$("#suppMapInfo").empty();var u=["ATTRIBUTE","SYSTEM","SYSTEM_NAME","SYSTEM_DEFINITION","SUBSYSTEM","SUBSYSTEM_NAME","SUBSYSTEM_DEFINITION","CLASS","CLASS_NAME","CLASS_DEFINITION","SUBCLASS","SUBCLASS_NAME","SUBCLASS_DEFINITION","SPLIT_CLASS","SPLIT_CLASS_NAME","SPLIT_CLASS_DEFINITION","SPLIT_SUBCLASS","SPLIT_SUBCLASS_NAME","SPLIT_SUBCLASS_DEFINITION","WATER_REGIME","WATER_REGIME_NAME","WATER_REGIME_SUBGROUP","WATER_REGIME_DEFINITION","MODIFIER_1","MODIFIER_1_NAME","MODIFIER_1_GROUP","MODIFIER_1_SUBGROUP","MODIFIER_1_DEFINITION","MODIFIER_2","MODIFIER_2_NAME","MODIFIER_2_GROUP","MODIFIER_2_SUBGROUP","MODIFIER_2_DEFINITION","MODIFIER_3","MODIFIER_3_NAME","MODIFIER_3_GROUP","MODIFIER_3_SUBGROUP","MODIFIER_3_DEFINITION"];$.each(u,function(e){var a=u[e],i=o[a];"Null"!=i?"SPLIT_CLASS"!=a&&"SPLIT_CLASS_NAME"!=a&&"SPLIT_CLASS_DEFINITION"!=a||o.CLASS!=o.SPLIT_CLASS?($("#des"+a).html(o[a]),$("#des"+a).show(),$("#des"+a).parent().show()):$("#SPLIT_CLASS_GROUP").hide():$("#des"+a).parent().hasClass("decoder-group")&&$("#des"+a).parent().hide()});var f=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,f),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=I.webMercatorToGeographic(n.geometry),i=a.getExtent();map.setExtent(i,!0)}),$("#zoomProjectLink").click(function(e){var a=I.webMercatorToGeographic(r.geometry),i=a.getExtent();map.setExtent(i,!0);var t=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));r.geometry.spatialReference=map.spatialReference;var n=r;n.setSymbol(t),map.graphics.add(n)})}else if(a.length<=1){y=new v(allLayers[0].layers.Riparian.url);var h=y.execute(identifyParams);h.addCallback(function(a){if(a.length>1){for(var t,n,r,o,s=0;sclick here";var c=new esri.InfoTemplate("Riparian","Classification: "+r.ATTRIBUTE+" (decode)

Wetland Type: "+r.WETLAND_TYPE+"
Acres: "+Number(r.ACRES).toFixed(2)+"
Image Date(s): "+o.IMAGE_DATE+"
Project Metadata:"+p+"

Zoom to wetland

");$("#acreage").text(Number(r.ACRES).toFixed(2)),$("#wetlandCode").text(r.ATTRIBUTE),$("#wetlandType").text(r.WETLAND_TYPE),$("#decoderLink").click(function(e){$("#descriptionTab").trigger("click")}),$("#imageScalePopup").text(addCommas(o.IMAGE_SCALE)),$("#sourceTypePopup").text(M(o.SOURCE_TYPE)),0==o.IMAGE_DATE?$("#imageDate").append("Link"):$("#imageDate").text(o.IMAGE_DATE),$("#suppMapInfoLink").attr("href",o.SUPPMAPINFO),t.setInfoTemplate(c),map.infoWindow.setFeatures([t]),map.infoWindow.show(e.mapPoint);var m=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,m),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=I.webMercatorToGeographic(t.geometry),i=a.getExtent();map.setExtent(i,!0)}),$("#zoomProjectLink").click(function(e){var a=I.webMercatorToGeographic(n.geometry),i=a.getExtent();map.setExtent(i,!0);var t=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));n.geometry.spatialReference=map.spatialReference;var r=n;r.setSymbol(t),map.graphics.add(r)})}else if(a.length<=1){var g=new v(allLayers[2].layers["Historic Wetland Data"].url),y=g.execute(i);y.addCallback(function(a){if(a.length>=1){for(var i,t,n,r=0;rclick here",(""==n.IMAGE_DATE||"0"==n.IMAGE_DATE||0==n.IMAGE_DATE)&&(n.IMAGE_DATE=l);var d=new esri.InfoTemplate("Historic Wetland","

Wetland Type: "+t.WETLAND_TYPE+"
Acres: "+Number(t.ACRES).toFixed(2)+"
Project Metadata:"+l+"

Zoom to wetland

");i.setInfoTemplate(d),map.infoWindow.setFeatures([i]),map.infoWindow.show(e.mapPoint,map.getInfoWindowAnchor(e.screenPoint));var p=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,p),$("infoWindowLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=I.webMercatorToGeographic(i.geometry),t=a.getExtent();map.setExtent(t,!0)})}else H("mainDiv","default"),map.setCursor("default"),map.infoWindow.hide()})}})}})}else if($("#huc-download-alert")[0].scrollHeight>0){var g=new b;g.returnGeometry=!0,g.tolerance=0,g.width=map.width,g.height=map.height,g.geometry=e.mapPoint,g.layerOption=b.LAYER_OPTION_TOP,g.mapExtent=map.extent,g.spatialReference=map.spatialReference;var y=new v(allLayers[0].layers.HUC8.url),u=y.execute(g);u.addCallback(function(e){if(e.length>=1){var a;a=e[0].feature;var i=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));a.geometry.spatialReference=map.spatialReference;var t=a;t.setSymbol(i),map.graphics.add(t);var n=I.webMercatorToGeographic(a.geometry),r=n.getExtent();map.setExtent(r,!0);var o=e[0].feature.attributes.HUC8,s=e[0].feature.attributes.Name;dojo.byId("innerAlert").innerHTML="

Download Data

Click the link below to download data for "+s+" watershed

HUC "+o+"

"}})}}),$(document).on("click","#showHUCs",function(){event.preventDefault(),$("#getDataModal").modal("hide"),$("#huc-download-alert").slideDown(250),map.getLayer("huc8").setVisibility(!0),dojo.byId("innerAlert").innerHTML="

Download Data

Please review the Data Download (www.fws.gov/wetlands/Data/Data-Download.html) page for information on how to download data, what is included in the download and data use limitations and disclaimer.


Click the map to select a watershed from which to extract wetland data.

"});var K=new t({value:"",maxLocations:25,autoComplete:!0,arcgisGeocoder:!0,autoNavigate:!1,map:map},"geosearch");K.startup(),K.on("select",N),K.on("findResults",W),K.on("clear",F),O(K.inputNode,"keydown",function(e){13==e.keyCode&&A()});var X=G("../images/purple-pin.png",0,12,13,24);map.on("load",function(){map.infoWindow.set("highlight",!1),map.infoWindow.set("titleInBody",!1)}),O(k.byId("btnGeosearch"),"click",R),$(document).ready(function(){function e(){$("#geosearchModal").modal("show")}function a(){$("#aboutModal").modal("show")}$("#geosearchNav").click(function(){e()}),$("#aboutNav").click(function(){a()}),$("#html").niceScroll(),$("#sidebar").niceScroll(),$("#sidebar").scroll(function(){$("#sidebar").getNiceScroll().resize()}),maxLegendHeight=.9*$("#mapDiv").height(),$("#legendElement").css("max-height",maxLegendHeight),maxLegendDivHeight=maxLegendHeight-parseInt($("#legendHeading").css("height").replace("px","")),$("#legendDiv").css("max-height",maxLegendDivHeight),$("#legendCollapse").on("shown.bs.collapse",function(){if(0==legendDiv.innerHTML.length){var e=new r({map:map,layerInfos:legendLayers},"legendDiv");e.startup(),$("#legendDiv").niceScroll()}}),$("#legendCollapse").on("hide.bs.collapse",function(){$("#legendElement").css("height","initial")}),$("#measurementCollapse").on("shown.bs.collapse",function(){$("#measureLabel").show()}),$("#measurementCollapse").on("hide.bs.collapse",function(){window.innerWidth<=767&&$("#measureLabel").hide()})}),require(["esri/Color","esri/InfoTemplate","esri/tasks/locator","esri/tasks/query","esri/tasks/QueryTask","esri/graphicsUtils","esri/geometry/Point","esri/geometry/Extent","esri/layers/ArcGISDynamicMapServiceLayer","esri/layers/ArcGISImageServiceLayer","esri/layers/FeatureLayer","esri/layers/LabelClass","esri/layers/WMSLayer","esri/layers/WMSLayerInfo","esri/symbols/TextSymbol","esri/tasks/GeometryService","dijit/form/CheckBox","dijit/form/RadioButton","dojo/query","dojo/dom","dojo/dom-class","dojo/dom-construct","dojo/dom-style","dojo/on"],function(e,a,i,t,n,r,o,s,l,d,p,c,m,g,y,u,f,h,b,v,w,L,S,T){function I(i,t,n,r,o,s,l){if(map.addLayer(n),0==l.legendLabel){var d=document.createElement("style");d.type="text/css",d.innerHTML="[id*="+n.id+"] .esriLegendLayerLabel { display: none; }",document.getElementsByTagName("head")[0].appendChild(d)}if("fwsTracts"==n.id){var p=new e("#FFF"),m=(new y).setColor(p);m.font.setSize("10pt"),m.font.setFamily("arial");var g={labelExpressionInfo:{value:"{ORGNAME}"}},u=new c(g);u.symbol=m,n.setLabelingInfo([u])}if("aoi"==n.id&&T(n,"load",function(e){T(n,"click",function(e){aoiClicked=!0;var i=e.graphic.attributes.HYPERLINK_2;if("None"==i){var t=new a("${NAME}","Type: ${TYPE}
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");n.setInfoTemplate(t)}else{var t=new a("${NAME}","Type: ${TYPE}
Ramsar: click here
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");n.setInfoTemplate(t)}})}),E.push([o,camelize(r),n]),o){if(!$("#"+camelize(o)).length){var f;if("Data Source"==o)var f=$('
');else var f=$('
"); +f.click(function(e){f.find("i.glyphspan").toggleClass("fa-check-square-o fa-square-o"),$.each(E,function(e,a){var i=map.getLayer(a[2].id);if(a[0]==o)if($("#"+a[1]).find("i.glyphspan").hasClass("fa-dot-circle-o")&&f.find("i.glyphspan").hasClass("fa-check-square-o")){console.log("adding layer: ",a[1]),map.addLayer(a[2]);var i=map.getLayer(a[2].id);i.setVisibility(!0)}else if(f.find("i.glyphspan").hasClass("fa-square-o")){console.log("removing layer: ",a[1]);var i=map.getLayer(a[2].id);i.setVisibility(!1)}})});var h=$('
');$("#toggle").append(h)}if(n.visible)var b=$('
");else var b=$('
");$("#"+camelize(o)).append(b),b.click(function(e){if($(this).find("i.glyphspan").hasClass("fa-circle-o")){$(this).find("i.glyphspan").toggleClass("fa-dot-circle-o fa-circle-o");var a=$(this)[0].id;$.each(E,function(e,i){if(i[0]==o)if(i[1]==a&&$("#"+camelize(o+" Root")).find("i.glyphspan").hasClass("fa-check-square-o")){console.log("adding layer: ",i[1]),map.addLayer(i[2]);var t=map.getLayer(i[2].id);t.setVisibility(!0)}else if(i[1]==a&&$("#"+camelize(o+" Root")).find("i.glyphspan").hasClass("fa-square-o"))console.log("group heading not checked");else{console.log("removing layer: ",i[1]);var t=map.getLayer(i[2].id);t.setVisibility(!1),$("#"+i[1]).find("i.glyphspan").hasClass("fa-dot-circle-o")&&$("#"+i[1]).find("i.glyphspan").toggleClass("fa-dot-circle-o fa-circle-o")}})}})}else if(l.includeInLayerList){if(n.visible&&void 0!==l.hasOpacitySlider&&1==l.hasOpacitySlider&&void 0!==l.moreinfo&&l.moreinfo)var b=$('
');else if(!n.visible&&void 0!==l.hasOpacitySlider&&1==l.hasOpacitySlider&&void 0!==l.moreinfo&&l.moreinfo)var b=$('
');else if(n.visible&&void 0!==l.hasOpacitySlider&&1==l.hasOpacitySlider)var b=$('
');else if(n.visible||void 0===l.hasOpacitySlider||1!=l.hasOpacitySlider)if(n.visible&&void 0!==l.moreinfo&&l.moreinfo)var b=$('
');else if(!n.visible&&void 0!==l.moreinfo&&l.moreinfo)var b=$('
');else if(n.visible)var b=$('
");else var b=$('
");else var b=$('
');b.click(function(e){$(this).find("i.glyphspan").toggleClass("fa-check-square-o fa-square-o"),$(this).find("button").button("toggle"),n.visible?n.setVisibility(!1):n.setVisibility(!0),l.otherLayersToggled&&$.each(l.otherLayersToggled,function(e,a){var i=map.getLayer(a);i.setVisibility(n.visible)})})}if(void 0!==t){var v=camelize(i);if(!$("#"+v).length){if(t)var w=$('
");else var w=$('
');$("#toggle").append(w)}if(o){if($("#"+v).append(f),$("#"+v).append(h),void 0!==l.moreinfo&&l.moreinfo){var L="#info"+camelize(o),S=$(L);S.click(function(e){window.open(l.moreinfo,"_blank"),e.preventDefault(),e.stopPropagation()})}if($("#opacity"+camelize(o)).length>0){var L="#opacity"+camelize(o),I=$(L);I.click(function(e){e.preventDefault(),e.stopPropagation(),$(".opacitySlider").remove();var a=map.getLayer(s.id).opacity,i=$('
');$("body").append(i),$("#slider")[0].value=100*a,$(".opacitySlider").css("left",event.clientX-180),$(".opacitySlider").css("top",event.clientY-50),$(".opacitySlider").mouseleave(function(){$(".opacitySlider").remove()}),$(".opacityClose").click(function(){$(".opacitySlider").remove()}),$("#slider").change(function(e){var a=$("#slider")[0].value/100;console.log("o: "+a),$("#opacityValue").html("Opacity: "+a),map.getLayer(s.id).setOpacity(a),l.otherLayersToggled&&$.each(l.otherLayersToggled,function(e,i){var t=map.getLayer(i);t.setOpacity(a)})})})}}else{if($("#"+v).append(b),void 0!==l.moreinfo&&l.moreinfo){var L="#info"+camelize(r),S=$(L);S.click(function(e){window.open(l.moreinfo,"_blank"),e.preventDefault(),e.stopPropagation()})}$("#opacity"+camelize(r)).length>0&&$("#opacity"+camelize(r)).click(function(e){e.preventDefault(),e.stopPropagation(),$(".opacitySlider").remove();var a=map.getLayer(s.id).opacity,i=$('
');$("body").append(i),$("#slider")[0].value=100*a,$(".opacitySlider").css("left",event.clientX-180),$(".opacitySlider").css("top",event.clientY-50),$(".opacitySlider").mouseleave(function(){$(".opacitySlider").remove()}),$(".opacityClose").click(function(){$(".opacitySlider").remove()}),$("#slider").change(function(e){var a=$("#slider")[0].value/100;console.log("o: "+a),$("#opacityValue").html("Opacity: "+a),map.getLayer(s.id).setOpacity(a),l.otherLayersToggled&&$.each(l.otherLayersToggled,function(e,i){var t=map.getLayer(i);t.setOpacity(a)})})})}}else if($("#toggle").append(b),void 0!==l.moreinfo&&l.moreinfo){var L="#info"+camelize(r),S=$(L);S.click(function(e){alert(e.currentTarget.id),e.preventDefault(),e.stopPropagation()})}}var E=(new u("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/Geometry/GeometryServer"),[]);$.each(allLayers,function(e,a){console.log("processing: ",a.groupHeading),$.each(a.layers,function(e,i){var t="";if(i.wimOptions.exclusiveGroupName&&(t=i.wimOptions.exclusiveGroupName),"agisFeature"===i.wimOptions.layerType){var n=new p(i.url,i.options);void 0!==i.wimOptions.renderer&&n.setRenderer(i.wimOptions.renderer),i.wimOptions&&1==i.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),I(a.groupHeading,a.showGroupHeading,n,e,t,i.options,i.wimOptions)}else if("agisWMS"===i.wimOptions.layerType){var n=new m(i.url,{resourceInfo:i.options.resourceInfo,visibleLayers:i.options.visibleLayers},i.options);i.wimOptions&&1==i.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),I(a.groupHeading,a.showGroupHeading,n,e,t,i.options,i.wimOptions)}else if("agisDynamic"===i.wimOptions.layerType){var n=new l(i.url,i.options);if(i.visibleLayers&&n.setVisibleLayers(i.visibleLayers),i.wimOptions&&i.wimOptions.layerDefinitions){var r=[];$.each(i.wimOptions.layerDefinitions,function(e,a){r[e]=a}),n.setLayerDefinitions(r)}i.wimOptions&&1==i.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),I(a.groupHeading,a.showGroupHeading,n,e,t,i.options,i.wimOptions)}else if("agisImage"===i.wimOptions.layerType){var n=new d(i.url,i.options);i.wimOptions&&1==i.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),i.visibleLayers&&n.setVisibleLayers(i.visibleLayers),I(a.groupHeading,a.showGroupHeading,n,e,t,i.options,i.wimOptions)}})})})}),$(".close-alert").click(function(){$(this).parent().slideUp(250)}),$(document).ready(function(){}); \ No newline at end of file diff --git a/src/scripts/core.js b/src/scripts/core.js index 09fcd31..012ce18 100644 --- a/src/scripts/core.js +++ b/src/scripts/core.js @@ -1371,7 +1371,7 @@ require([ fwsTractsLabel.font.setFamily("arial"); var json = { - "labelExpressionInfo": {"value": "{LABELNAME}"} + "labelExpressionInfo": {"value": "{ORGNAME}"} }; var fwsTractsLabelClass = new LabelClass(json); diff --git a/src/scripts/layers.js b/src/scripts/layers.js index be34f4a..b92c1a4 100644 --- a/src/scripts/layers.js +++ b/src/scripts/layers.js @@ -260,8 +260,9 @@ require([ 'renderer': centroidRenderer } }, - 'FWS Managed Lands Tracts' : { //REALTY TRACTS - 'url': 'https://services.arcgis.com/QVENGdaPbd4LUkLV/arcgis/rest/services/FWSApproved_Authoritative/FeatureServer/1', + 'FWS Managed Lands' : { + 'url': 'https://services.arcgis.com/QVENGdaPbd4LUkLV/arcgis/rest/services/National_Wildlife_Refuge_System_Boundaries/FeatureServer/0', + //'url': 'https://services.arcgis.com/QVENGdaPbd4LUkLV/arcgis/rest/services/FWSApproved_Authoritative/FeatureServer/1', //'url': 'https://services.arcgis.com/QVENGdaPbd4LUkLV/ArcGIS/rest/services/National_Wildlife_Refuge_System_Boundaries/FeatureServer/0', 'options': { 'id': 'fwsTracts', From 58d96a3845f2c998d2266f0974bc60f2c10f9659 Mon Sep 17 00:00:00 2001 From: Estes Date: Fri, 26 Jun 2020 10:49:25 -0700 Subject: [PATCH 4/4] update to fws managed lands more info link and scale for label visibility --- build/scripts/combined.js | 2 +- src/scripts/core.js | 3 ++- src/scripts/layers.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build/scripts/combined.js b/build/scripts/combined.js index c489114..b5b27bc 100644 --- a/build/scripts/combined.js +++ b/build/scripts/combined.js @@ -1,2 +1,2 @@ -function addCommas(e){e+="";for(var a=e.split("."),i=a[0],t=a.length>1?"."+a[1]:"",n=/(\d+)(\d{3})/;n.test(i);)i=i.replace(n,"$1,$2");return i+t}function camelize(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,a){return 0===a?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")}function stateSelected(){var e=$("#stateSelect")[0];if(e.selectedIndex>0){var a=e.options[e.selectedIndex].value,i=e.options[e.selectedIndex].label;$("#downloadState").html("Download Geodatabase and Shapefile data for "+i+"")}else $("#downloadState").html("")}function hucLinkListener(e){console.log(e),$.get("https://fwsprimary.wim.usgs.gov/downloadLoggingService/downloadLog.asmx/Log?huc="+e+",NWIV2",function(e){})}var allLayers,tractRenderer,centroidRenderer;require(["esri/Color","esri/InfoTemplate","esri/layers/LabelClass","esri/renderers/SimpleRenderer","esri/symbols/SimpleFillSymbol","esri/symbols/SimpleLineSymbol","esri/symbols/SimpleMarkerSymbol","esri/symbols/TextSymbol","dojo/domReady!"],function(e,a,i,t,n,r,o,s){var l=new o(o.STYLE_CIRCLE,5,new r(r.STYLE_SOLID,new e([255,255,255]),.5),new e([0,0,0,1]));centroidRenderer=new t(l);var d=new n(n.STYLE_SOLID,new r(r.STYLE_SOLID,new e([0,0,0]),.5),new e([115,178,115,.75]));tractRenderer=new t(d);var p=new a("${NAME}","Type: ${TYPE}
Ramsar: click here
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");allLayers=[{groupHeading:"ESRI dynamic map services",showGroupHeading:!1,includeInLayerList:!0,layers:{Wetlands:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands/MapServer",options:{id:"wetlands",opacity:.75,visible:!0},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,includeLegend:!0,legendLabel:!1,moreinfo:"https://www.fws.gov/wetlands/Data/Wetlands-Product-Summary.html",otherLayersToggled:["wetlandsStatus","wetlandsRaster"]}},"Wetlands Status":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands_Status/MapServer",options:{id:"wetlandsStatus",layers:[0],visible:!0,maxScale:285e3,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!1,includeLegend:!0,esriLegendLabel:!1}},"Wetlands ":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands_Raster/ImageServer",options:{id:"wetlandsRaster",visible:!0,maxScale:285e3,opacity:.6},wimOptions:{type:"layer",layerType:"agisImage",includeInLayerList:!1,includeLegend:!0,otherLayersToggled:["wetlands","wetlandsStatus"]}},Riparian:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Riparian/MapServer",visibleLayers:[0],options:{id:"riparian",opacity:.75,visible:!0},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/wetlands/Other/Riparian-Product-Summary.html",includeLegend:!0,legendLabel:!1}},"Riparian Mapping Areas":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Riparian/MapServer",visibleLayers:[1],options:{id:"riparianStatus",visible:!1,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/wetlands/Other/Riparian-Product-Summary.html",includeLegend:!0,legendLabel:!1}},HUC8:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/HUCs/MapServer",options:{id:"huc8",opacity:1,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!1,includeLegend:!0,esriLegendLabel:!1}}}},{groupHeading:"Data Source Group",showGroupHeading:!1,includeInLayerList:!0,moreinfo:"https://www.fws.gov/wetlands/Documents/Scalable-Wetland-Mapping-Fact-Sheet.pdf",otherLayersToggled:["sourceType","imageScale","imageYear"],layers:{"Source Type":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[1],options:{id:"sourceType",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["imageScale","imageYear"],legendLabel:!1}},"Image Scale":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[2],options:{id:"imageScale",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["sourceType","imageYear"],legendLabel:!1}},"Image Year":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[3],options:{id:"imageYear",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["sourceType","imageScale"],legendLabel:!1}}}},{groupHeading:"refuges and historic",showGroupHeading:!1,includeInLayerList:!0,layers:{"Areas of Interest":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Areas_of_Interest/MapServer/0",options:{id:"aoi",opacity:1,visible:!1,outFields:["*"],infoTemplate:p},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!0,hasOpacitySlider:!1,moreinfo:"https://www.fws.gov/wetlands/Data/metadata/FWS_Wetland_Areas_of_Interest.xml",includeLegend:!0}},"FWS Managed Lands Centroids":{url:"https://services.arcgis.com/QVENGdaPbd4LUkLV/ArcGIS/rest/services/FWSCentroids/FeatureServer/0",options:{id:"fwsCentroids",opacity:.75,maxScale:18e6,visible:!1},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!1,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html",includeLegend:!0,esriLegendLabel:!1,renderer:centroidRenderer}},"FWS Managed Lands":{url:"https://services.arcgis.com/QVENGdaPbd4LUkLV/arcgis/rest/services/National_Wildlife_Refuge_System_Boundaries/FeatureServer/0",options:{id:"fwsTracts",opacity:.75,minScale:18e6,visible:!1,outFields:["*"],showLabels:!0},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html",otherLayersToggled:["fwsCentroids"],includeLegend:!0,esriLegendLabel:!1,renderer:tractRenderer}},"Historic Wetland Data":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Historic_Wetlands/MapServer",visibleLayers:[0,1],options:{id:"historic",visible:!1,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,hasOpacitySlider:!0,moreinfo:"https://www.fws.gov/wetlands/Data/Historic-Wetlands-Data.html",includeLegend:!0,legendLabel:!1}}}}]});var map,allLayers,maxLegendHeight,maxLegendDivHeight,printCount=0,legendLayers=[],measurement,identifyTask,identifyParams,aoiClicked=!1,initWetlandClicked=!1;require(["esri/map","esri/arcgis/utils","esri/config","esri/dijit/Geocoder","esri/dijit/HomeButton","esri/dijit/Legend","esri/dijit/LocateButton","esri/dijit/Measurement","esri/dijit/PopupTemplate","esri/graphic","esri/geometry/Extent","esri/geometry/Multipoint","esri/geometry/Point","esri/layers/ArcGISTiledMapServiceLayer","esri/renderers/UniqueValueRenderer","esri/SpatialReference","esri/symbols/PictureMarkerSymbol","esri/tasks/GeometryService","esri/tasks/IdentifyParameters","esri/tasks/IdentifyTask","esri/tasks/LegendLayer","esri/tasks/PrintTask","esri/tasks/PrintParameters","esri/tasks/PrintTemplate","esri/geometry/webMercatorUtils","esri/urlUtils","dojo/dom","dojo/dom-class","dojo/dnd/Moveable","dojo/query","dojo/on","dojo/domReady!"],function(e,a,i,t,n,r,o,s,l,d,p,c,m,g,y,u,f,h,b,v,w,L,S,T,I,E,k,_,D,x,O){function C(){$("#printModal").modal("show")}function P(){$("#getDataModal").modal("show")}function M(e){var a="";switch(e){case"CIR":a="color infrared";break;case"TC":a="true color";break;case"BW":a="black and white"}return a}function A(){K.activeGeocoder.searchExtent=null}function R(){A();var e=K.find();e.then(function(e){W(e)})}function N(e){F();var a=e.graphic?e.graphic:e.result.feature;a.setSymbol(X)}function W(e){if(e=e.results,e.length>0){F();for(var a=0;a  '+s+"

");$("#printJobsDiv").find("p.toRemove").remove(),$("#printModalBody").append(a),$("#printTitle").val(""),$("#printExecuteButton").button("reset")}function a(e){alert("Sorry, an unclear print error occurred. Please try refreshing the application to fix the problem")}var i=new S;i.map=map;var t=new T;t.exportOptions={width:500,height:400,dpi:300},t.format="PDF",t.layout="Letter ANSI A Landscape test",t.preserveScale=!1;var n=new w;n.layerId="wetlands";var r=new w;r.layerId="wetlandsRaster";var o=$("#printTitle").val();""==o?t.layoutOptions={titleText:"Wetlands",authorText:"National Wetlands Inventory (NWI)",copyrightText:"This page was produced by the NWI mapper",legendLayers:[n,r]}:t.layoutOptions={titleText:o,authorText:"National Wetlands Inventory (NWI)",copyrightText:"This page was produced by the NWI mapper",legendLayers:[n,r]};var s=t.layoutOptions.titleText;i.template=t;var l=new L("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task");l.execute(i,e,a),$.get("https://fwsprimary.wim.usgs.gov/pdfLoggingService/pdfLog.asmx/Log?printInfo="+map.getScale()+","+map.extent.xmin+","+map.extent.ymax+","+map.extent.xmax+","+map.extent.ymin+",NWIV2",function(e){})}function H(e,a){var i;document.getElementById&&(i=document.getElementById(e))&&i.style&&(i.style.cursor=a)}i.defaults.io.corsEnabledServers.push("fwsprimary.wim.usgs.gov"),esri.config.defaults.io.proxyUrl="https://fwsprimary.wim.usgs.gov/serviceProxy/proxy.ashx",i.defaults.geometryService=new h("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/Geometry/GeometryServer"),map=new e("mapDiv",{basemap:"hybrid",extent:new p(-14638882.654811008,2641706.3772205533,-6821514.898031538,6403631.161302788,new u({wkid:3857})),fitExtent:!0,showLabels:!0});var Y=new n({map:map,extent:new p(-14638882.654811008,2641706.3772205533,-6821514.898031538,6403631.161302788,new u({wkid:3857}))},"homeButton");Y.startup();var j=new o({map:map,scale:4514},"locateButton");j.startup(),measurement=new s({map:map,advancedLocationUnits:!0},k.byId("measurementDiv")),measurement.startup(),$(window).resize(function(){$("#legendCollapse").hasClass("in")?(maxLegendHeight=.9*$("#mapDiv").height(),$("#legendElement").css("height",maxLegendHeight),$("#legendElement").css("max-height",maxLegendHeight),maxLegendDivHeight=$("#legendElement").height()-parseInt($("#legendHeading").css("height").replace("px","")),$("#legendDiv").css("max-height",maxLegendDivHeight)):$("#legendElement").css("height","initial")}),$("#printNavButton").click(function(){C()}),$("#printExecuteButton").click(function(e){e.preventDefault(),$(this).button("loading"),U()}),$("#getDataButton").click(function(){P()}),$("#aboutLink").click(function(){$("#aboutModal").modal("show"),$("#aboutTab").trigger("click")}),$("#disclaimerLink").click(function(){$("#aboutModal").modal("show"),$("#disclaimerTab").trigger("click")}),$("#dataLimitationsLink").click(function(){$("#aboutModal").modal("show"),$("#dataLimitationsTab").trigger("click")}),$("#userCautionLink").click(function(){$("#aboutModal").modal("show"),$("#userCautionTab").trigger("click")}),$(".docs").hide(),O(map,"load",function(){var e=map.getScale().toFixed(0);$("#scale")[0].innerHTML=addCommas(e);var a=I.webMercatorToGeographic(map.extent.getCenter());$("#latitude").html(a.y.toFixed(3)),$("#longitude").html(a.x.toFixed(3))}),O(map,"zoom-end",function(){var e=map.getScale().toFixed(0);$("#scale")[0].innerHTML=addCommas(e)}),O(map,"mouse-move",function(e){if($("#mapCenterLabel").css("display","none"),null!=e.mapPoint){var a=I.webMercatorToGeographic(e.mapPoint);$("#latitude").html(a.y.toFixed(3)),$("#longitude").html(a.x.toFixed(3))}}),O(map,"pan-end",function(){$("#mapCenterLabel").css("display","inline");var e=I.webMercatorToGeographic(map.extent.getCenter());$("#latitude").html(e.y.toFixed(3)),$("#longitude").html(e.x.toFixed(3))});var z=new g("https://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer"),B=new g("https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer");O(k.byId("btnStreets"),"click",function(){map.setBasemap("streets"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnSatellite"),"click",function(){map.setBasemap("satellite"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnHybrid"),"click",function(){map.setBasemap("hybrid"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnTerrain"),"click",function(){map.setBasemap("terrain"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnGray"),"click",function(){map.setBasemap("gray"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnNatGeo"),"click",function(){map.setBasemap("national-geographic"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnOSM"),"click",function(){map.setBasemap("osm"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnTopo"),"click",function(){map.setBasemap("topo"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnNatlMap"),"click",function(){map.addLayer(B,1),map.removeLayer(z)}),O(k.byId("btnUsgsTopo"),"click",function(){map.addLayer(z,1),map.removeLayer(B)}),$("#wetlandDiv").lobiPanel({unpin:!1,reload:!1,minimize:!1,close:!1,expand:!1,editTitle:!1,maxWidth:600,maxHeight:400}),$("#wetlandDiv .dropdown").prepend("
"),$("#wetlandClose").click(function(){$("#wetlandDiv").css("visibility","hidden"),map.graphics.clear()}),identifyParams=new b,identifyParams.tolerance=0,identifyParams.returnGeometry=!0,identifyParams.layerOption=b.LAYER_OPTION_ALL,identifyParams.width=map.width,identifyParams.height=map.height,identifyTask=new v(allLayers[0].layers.Wetlands.url);var q=x(".title",map.infoWindow.domNode)[0],V=new D(map.infoWindow.domNode,{handle:q});O(V,"FirstMove",function(){var e=x(".outerPointer",map.infoWindow.domNode)[0];_.add(e,"hidden");var e=x(".pointer",map.infoWindow.domNode)[0];_.add(e,"hidden")}.bind(this)),O(map,"click",function(e){if(1==aoiClicked)return void(aoiClicked=!1);if(null==measurement.activeTool)if(map.graphics.clear(),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click"),$("#wetlandDiv").css("visibility","hidden"),identifyParams.geometry=e.mapPoint,identifyParams.mapExtent=map.extent,map.getLevel()>=12&&0==$("#huc-download-alert")[0].scrollHeight){y=new v(allLayers[0].layers.Wetlands.url);var a=y.execute(identifyParams),i=new b;i.returnGeometry=!0,i.tolerance=0,i.width=map.width,i.height=map.height,i.geometry=e.mapPoint,i.layerOption=b.LAYER_OPTION_ALL,i.mapExtent=map.extent,i.layerIds=[0,1],H("mainDiv","wait"),map.setCursor("wait");var t=$("#wetlandDiv").data("lobiPanel"),n=$(document).height(),r=$(document).width(),o=.9,s=n*o,l=r*o,d=600,p=325;500>n&&($("#wetlandDiv").height(s),p=$("#floodToolsDiv").height()-50),500>r&&($("#wetlandDiv").width(l),d=$("#floodToolsDiv").width()-50);var c=.5*r-.5*$("#wetlandDiv").width(),m=.5*n-.5*$("#wetlandDiv").height();0==initWetlandClicked&&t.setPosition(c,m),1==t.isPinned()&&t.unpin(),initWetlandClicked=!0,$(".docs").hide(),$(".docItems").empty(),$("#reportInfo .panel-heading").addClass("loading-hide"),$("#reportInfo .panel-body").addClass("loading-hide"),$("#wetlandDiv").addClass("loading-background"),$(".tab-pane").addClass("hidden-loading"),a.addCallback(function(a){function t(e){var a;return a=0==e||""==e?"Link":e}if(a.length>1){var n,r,o,s,l=new b;l.returnGeometry=!1,l.tolerance=0,l.width=map.width,l.height=map.height,l.geometry=e.mapPoint,l.layerOption=b.LAYER_OPTION_ALL,l.mapExtent=map.extent,l.layerIds=[0,4];var d=new v(allLayers[1].layers["Source Type"].url),p=d.execute(l);p.addCallback(function(e){if(e.length>=1){for(var a=0;a"+t.PDF_NAME+"")):($("#"+e[i].value.toLowerCase()+"Docs").show(),$("#"+e[i].value.toLowerCase()+"Docs .docItems").append(""+t.Title+""))}}$("#reportInfo .panel-heading").removeClass("loading-hide"),$("#reportInfo .panel-body").removeClass("loading-hide"),$("#wetlandDiv").removeClass("loading-background"),$(".tab-pane").removeClass("hidden-loading")}),$("#wetlandTab").trigger("click"),$("#wetlandDiv").css("visibility","visible");for(var c=0;c10?$("#imageScalePopup").html("The wetlands and deepwater habitats in this area were photo interpreted using 1:"+addCommas(s.IMAGE_SCALE)+" scale, "):0!=s.IMAGE_SCALE&&$("#imageScalePopup").html("The wetlands and deepwater habitats in this area were photo interpreted using "+s.IMAGE_SCALE+" meter (or less) digital, "):$("#imageScalePopup").html(""),"Scalable"==s.SOURCE_TYPE?$("#sourceTypePopup").html("The data in this area are considered an interim scalable map product. Click here for a full description of Scalable Wetland Mapping. "):"Null"==s.SOURCE_TYPE?$("#sourceTypePopup").html("Photo interpretation information is not available for this project."):$("#sourceTypePopup").html(""+M(s.SOURCE_TYPE)+" imagery from "+t(s.IMAGE_YR)+". "),"None"!=s.SUPPMAPINFO?($("#suppMapInfo").empty(),$("#suppMapInfo").append('Click here for project specific mapping conventions and information.')):$("#suppMapInfo").empty();var u=["ATTRIBUTE","SYSTEM","SYSTEM_NAME","SYSTEM_DEFINITION","SUBSYSTEM","SUBSYSTEM_NAME","SUBSYSTEM_DEFINITION","CLASS","CLASS_NAME","CLASS_DEFINITION","SUBCLASS","SUBCLASS_NAME","SUBCLASS_DEFINITION","SPLIT_CLASS","SPLIT_CLASS_NAME","SPLIT_CLASS_DEFINITION","SPLIT_SUBCLASS","SPLIT_SUBCLASS_NAME","SPLIT_SUBCLASS_DEFINITION","WATER_REGIME","WATER_REGIME_NAME","WATER_REGIME_SUBGROUP","WATER_REGIME_DEFINITION","MODIFIER_1","MODIFIER_1_NAME","MODIFIER_1_GROUP","MODIFIER_1_SUBGROUP","MODIFIER_1_DEFINITION","MODIFIER_2","MODIFIER_2_NAME","MODIFIER_2_GROUP","MODIFIER_2_SUBGROUP","MODIFIER_2_DEFINITION","MODIFIER_3","MODIFIER_3_NAME","MODIFIER_3_GROUP","MODIFIER_3_SUBGROUP","MODIFIER_3_DEFINITION"];$.each(u,function(e){var a=u[e],i=o[a];"Null"!=i?"SPLIT_CLASS"!=a&&"SPLIT_CLASS_NAME"!=a&&"SPLIT_CLASS_DEFINITION"!=a||o.CLASS!=o.SPLIT_CLASS?($("#des"+a).html(o[a]),$("#des"+a).show(),$("#des"+a).parent().show()):$("#SPLIT_CLASS_GROUP").hide():$("#des"+a).parent().hasClass("decoder-group")&&$("#des"+a).parent().hide()});var f=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,f),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=I.webMercatorToGeographic(n.geometry),i=a.getExtent();map.setExtent(i,!0)}),$("#zoomProjectLink").click(function(e){var a=I.webMercatorToGeographic(r.geometry),i=a.getExtent();map.setExtent(i,!0);var t=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));r.geometry.spatialReference=map.spatialReference;var n=r;n.setSymbol(t),map.graphics.add(n)})}else if(a.length<=1){y=new v(allLayers[0].layers.Riparian.url);var h=y.execute(identifyParams);h.addCallback(function(a){if(a.length>1){for(var t,n,r,o,s=0;sclick here";var c=new esri.InfoTemplate("Riparian","Classification: "+r.ATTRIBUTE+" (decode)

Wetland Type: "+r.WETLAND_TYPE+"
Acres: "+Number(r.ACRES).toFixed(2)+"
Image Date(s): "+o.IMAGE_DATE+"
Project Metadata:"+p+"

Zoom to wetland

");$("#acreage").text(Number(r.ACRES).toFixed(2)),$("#wetlandCode").text(r.ATTRIBUTE),$("#wetlandType").text(r.WETLAND_TYPE),$("#decoderLink").click(function(e){$("#descriptionTab").trigger("click")}),$("#imageScalePopup").text(addCommas(o.IMAGE_SCALE)),$("#sourceTypePopup").text(M(o.SOURCE_TYPE)),0==o.IMAGE_DATE?$("#imageDate").append("Link"):$("#imageDate").text(o.IMAGE_DATE),$("#suppMapInfoLink").attr("href",o.SUPPMAPINFO),t.setInfoTemplate(c),map.infoWindow.setFeatures([t]),map.infoWindow.show(e.mapPoint);var m=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,m),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=I.webMercatorToGeographic(t.geometry),i=a.getExtent();map.setExtent(i,!0)}),$("#zoomProjectLink").click(function(e){var a=I.webMercatorToGeographic(n.geometry),i=a.getExtent();map.setExtent(i,!0);var t=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));n.geometry.spatialReference=map.spatialReference;var r=n;r.setSymbol(t),map.graphics.add(r)})}else if(a.length<=1){var g=new v(allLayers[2].layers["Historic Wetland Data"].url),y=g.execute(i);y.addCallback(function(a){if(a.length>=1){for(var i,t,n,r=0;rclick here",(""==n.IMAGE_DATE||"0"==n.IMAGE_DATE||0==n.IMAGE_DATE)&&(n.IMAGE_DATE=l);var d=new esri.InfoTemplate("Historic Wetland","

Wetland Type: "+t.WETLAND_TYPE+"
Acres: "+Number(t.ACRES).toFixed(2)+"
Project Metadata:"+l+"

Zoom to wetland

");i.setInfoTemplate(d),map.infoWindow.setFeatures([i]),map.infoWindow.show(e.mapPoint,map.getInfoWindowAnchor(e.screenPoint));var p=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,p),$("infoWindowLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=I.webMercatorToGeographic(i.geometry),t=a.getExtent();map.setExtent(t,!0)})}else H("mainDiv","default"),map.setCursor("default"),map.infoWindow.hide()})}})}})}else if($("#huc-download-alert")[0].scrollHeight>0){var g=new b;g.returnGeometry=!0,g.tolerance=0,g.width=map.width,g.height=map.height,g.geometry=e.mapPoint,g.layerOption=b.LAYER_OPTION_TOP,g.mapExtent=map.extent,g.spatialReference=map.spatialReference;var y=new v(allLayers[0].layers.HUC8.url),u=y.execute(g);u.addCallback(function(e){if(e.length>=1){var a;a=e[0].feature;var i=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));a.geometry.spatialReference=map.spatialReference;var t=a;t.setSymbol(i),map.graphics.add(t);var n=I.webMercatorToGeographic(a.geometry),r=n.getExtent();map.setExtent(r,!0);var o=e[0].feature.attributes.HUC8,s=e[0].feature.attributes.Name;dojo.byId("innerAlert").innerHTML="

Download Data

Click the link below to download data for "+s+" watershed

HUC "+o+"

"}})}}),$(document).on("click","#showHUCs",function(){event.preventDefault(),$("#getDataModal").modal("hide"),$("#huc-download-alert").slideDown(250),map.getLayer("huc8").setVisibility(!0),dojo.byId("innerAlert").innerHTML="

Download Data

Please review the Data Download (www.fws.gov/wetlands/Data/Data-Download.html) page for information on how to download data, what is included in the download and data use limitations and disclaimer.


Click the map to select a watershed from which to extract wetland data.

"});var K=new t({value:"",maxLocations:25,autoComplete:!0,arcgisGeocoder:!0,autoNavigate:!1,map:map},"geosearch");K.startup(),K.on("select",N),K.on("findResults",W),K.on("clear",F),O(K.inputNode,"keydown",function(e){13==e.keyCode&&A()});var X=G("../images/purple-pin.png",0,12,13,24);map.on("load",function(){map.infoWindow.set("highlight",!1),map.infoWindow.set("titleInBody",!1)}),O(k.byId("btnGeosearch"),"click",R),$(document).ready(function(){function e(){$("#geosearchModal").modal("show")}function a(){$("#aboutModal").modal("show")}$("#geosearchNav").click(function(){e()}),$("#aboutNav").click(function(){a()}),$("#html").niceScroll(),$("#sidebar").niceScroll(),$("#sidebar").scroll(function(){$("#sidebar").getNiceScroll().resize()}),maxLegendHeight=.9*$("#mapDiv").height(),$("#legendElement").css("max-height",maxLegendHeight),maxLegendDivHeight=maxLegendHeight-parseInt($("#legendHeading").css("height").replace("px","")),$("#legendDiv").css("max-height",maxLegendDivHeight),$("#legendCollapse").on("shown.bs.collapse",function(){if(0==legendDiv.innerHTML.length){var e=new r({map:map,layerInfos:legendLayers},"legendDiv");e.startup(),$("#legendDiv").niceScroll()}}),$("#legendCollapse").on("hide.bs.collapse",function(){$("#legendElement").css("height","initial")}),$("#measurementCollapse").on("shown.bs.collapse",function(){$("#measureLabel").show()}),$("#measurementCollapse").on("hide.bs.collapse",function(){window.innerWidth<=767&&$("#measureLabel").hide()})}),require(["esri/Color","esri/InfoTemplate","esri/tasks/locator","esri/tasks/query","esri/tasks/QueryTask","esri/graphicsUtils","esri/geometry/Point","esri/geometry/Extent","esri/layers/ArcGISDynamicMapServiceLayer","esri/layers/ArcGISImageServiceLayer","esri/layers/FeatureLayer","esri/layers/LabelClass","esri/layers/WMSLayer","esri/layers/WMSLayerInfo","esri/symbols/TextSymbol","esri/tasks/GeometryService","dijit/form/CheckBox","dijit/form/RadioButton","dojo/query","dojo/dom","dojo/dom-class","dojo/dom-construct","dojo/dom-style","dojo/on"],function(e,a,i,t,n,r,o,s,l,d,p,c,m,g,y,u,f,h,b,v,w,L,S,T){function I(i,t,n,r,o,s,l){if(map.addLayer(n),0==l.legendLabel){var d=document.createElement("style");d.type="text/css",d.innerHTML="[id*="+n.id+"] .esriLegendLayerLabel { display: none; }",document.getElementsByTagName("head")[0].appendChild(d)}if("fwsTracts"==n.id){var p=new e("#FFF"),m=(new y).setColor(p);m.font.setSize("10pt"),m.font.setFamily("arial");var g={labelExpressionInfo:{value:"{ORGNAME}"}},u=new c(g);u.symbol=m,n.setLabelingInfo([u])}if("aoi"==n.id&&T(n,"load",function(e){T(n,"click",function(e){aoiClicked=!0;var i=e.graphic.attributes.HYPERLINK_2;if("None"==i){var t=new a("${NAME}","Type: ${TYPE}
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");n.setInfoTemplate(t)}else{var t=new a("${NAME}","Type: ${TYPE}
Ramsar: click here
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");n.setInfoTemplate(t)}})}),E.push([o,camelize(r),n]),o){if(!$("#"+camelize(o)).length){var f;if("Data Source"==o)var f=$('
');else var f=$('
"); +function addCommas(e){e+="";for(var a=e.split("."),i=a[0],t=a.length>1?"."+a[1]:"",n=/(\d+)(\d{3})/;n.test(i);)i=i.replace(n,"$1,$2");return i+t}function camelize(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,a){return 0===a?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")}function stateSelected(){var e=$("#stateSelect")[0];if(e.selectedIndex>0){var a=e.options[e.selectedIndex].value,i=e.options[e.selectedIndex].label;$("#downloadState").html("Download Geodatabase and Shapefile data for "+i+"")}else $("#downloadState").html("")}function hucLinkListener(e){console.log(e),$.get("https://fwsprimary.wim.usgs.gov/downloadLoggingService/downloadLog.asmx/Log?huc="+e+",NWIV2",function(e){})}var allLayers,tractRenderer,centroidRenderer;require(["esri/Color","esri/InfoTemplate","esri/layers/LabelClass","esri/renderers/SimpleRenderer","esri/symbols/SimpleFillSymbol","esri/symbols/SimpleLineSymbol","esri/symbols/SimpleMarkerSymbol","esri/symbols/TextSymbol","dojo/domReady!"],function(e,a,i,t,n,r,o,s){var l=new o(o.STYLE_CIRCLE,5,new r(r.STYLE_SOLID,new e([255,255,255]),.5),new e([0,0,0,1]));centroidRenderer=new t(l);var d=new n(n.STYLE_SOLID,new r(r.STYLE_SOLID,new e([0,0,0]),.5),new e([115,178,115,.75]));tractRenderer=new t(d);var p=new a("${NAME}","Type: ${TYPE}
Ramsar: click here
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");allLayers=[{groupHeading:"ESRI dynamic map services",showGroupHeading:!1,includeInLayerList:!0,layers:{Wetlands:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands/MapServer",options:{id:"wetlands",opacity:.75,visible:!0},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,includeLegend:!0,legendLabel:!1,moreinfo:"https://www.fws.gov/wetlands/Data/Wetlands-Product-Summary.html",otherLayersToggled:["wetlandsStatus","wetlandsRaster"]}},"Wetlands Status":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands_Status/MapServer",options:{id:"wetlandsStatus",layers:[0],visible:!0,maxScale:285e3,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!1,includeLegend:!0,esriLegendLabel:!1}},"Wetlands ":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Wetlands_Raster/ImageServer",options:{id:"wetlandsRaster",visible:!0,maxScale:285e3,opacity:.6},wimOptions:{type:"layer",layerType:"agisImage",includeInLayerList:!1,includeLegend:!0,otherLayersToggled:["wetlands","wetlandsStatus"]}},Riparian:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Riparian/MapServer",visibleLayers:[0],options:{id:"riparian",opacity:.75,visible:!0},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/wetlands/Other/Riparian-Product-Summary.html",includeLegend:!0,legendLabel:!1}},"Riparian Mapping Areas":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Riparian/MapServer",visibleLayers:[1],options:{id:"riparianStatus",visible:!1,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/wetlands/Other/Riparian-Product-Summary.html",includeLegend:!0,legendLabel:!1}},HUC8:{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/HUCs/MapServer",options:{id:"huc8",opacity:1,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!1,includeLegend:!0,esriLegendLabel:!1}}}},{groupHeading:"Data Source Group",showGroupHeading:!1,includeInLayerList:!0,moreinfo:"https://www.fws.gov/wetlands/Documents/Scalable-Wetland-Mapping-Fact-Sheet.pdf",otherLayersToggled:["sourceType","imageScale","imageYear"],layers:{"Source Type":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[1],options:{id:"sourceType",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["imageScale","imageYear"],legendLabel:!1}},"Image Scale":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[2],options:{id:"imageScale",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["sourceType","imageYear"],legendLabel:!1}},"Image Year":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Data_Source/MapServer",visibleLayers:[3],options:{id:"imageYear",opacity:.6,visible:!1},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,exclusiveGroupName:"Data Source",includeLegend:!0,otherLayersToggled:["sourceType","imageScale"],legendLabel:!1}}}},{groupHeading:"refuges and historic",showGroupHeading:!1,includeInLayerList:!0,layers:{"Areas of Interest":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Areas_of_Interest/MapServer/0",options:{id:"aoi",opacity:1,visible:!1,outFields:["*"],infoTemplate:p},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!0,hasOpacitySlider:!1,moreinfo:"https://www.fws.gov/wetlands/Data/metadata/FWS_Wetland_Areas_of_Interest.xml",includeLegend:!0}},"FWS Managed Lands Centroids":{url:"https://services.arcgis.com/QVENGdaPbd4LUkLV/ArcGIS/rest/services/FWSCentroids/FeatureServer/0",options:{id:"fwsCentroids",opacity:.75,maxScale:18e6,visible:!1},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!1,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html",includeLegend:!0,esriLegendLabel:!1,renderer:centroidRenderer}},"FWS Managed Lands":{url:"https://services.arcgis.com/QVENGdaPbd4LUkLV/arcgis/rest/services/National_Wildlife_Refuge_System_Boundaries/FeatureServer/0",options:{id:"fwsTracts",opacity:.75,minScale:18e6,visible:!1,outFields:["*"],showLabels:!0},wimOptions:{type:"layer",layerType:"agisFeature",includeInLayerList:!0,zoomScale:144448,hasOpacitySlider:!0,moreinfo:"https://fws.maps.arcgis.com/home/item.html?id=745ed874c1394da3a9aae50267c9e049",otherLayersToggled:["fwsCentroids"],includeLegend:!0,esriLegendLabel:!1,renderer:tractRenderer}},"Historic Wetland Data":{url:"https://fwsprimary.wim.usgs.gov/server/rest/services/Historic_Wetlands/MapServer",visibleLayers:[0,1],options:{id:"historic",visible:!1,opacity:.6},wimOptions:{type:"layer",layerType:"agisDynamic",includeInLayerList:!0,hasOpacitySlider:!0,moreinfo:"https://www.fws.gov/wetlands/Data/Historic-Wetlands-Data.html",includeLegend:!0,legendLabel:!1}}}}]});var map,allLayers,maxLegendHeight,maxLegendDivHeight,printCount=0,legendLayers=[],measurement,identifyTask,identifyParams,aoiClicked=!1,initWetlandClicked=!1;require(["esri/map","esri/arcgis/utils","esri/config","esri/dijit/Geocoder","esri/dijit/HomeButton","esri/dijit/Legend","esri/dijit/LocateButton","esri/dijit/Measurement","esri/dijit/PopupTemplate","esri/graphic","esri/geometry/Extent","esri/geometry/Multipoint","esri/geometry/Point","esri/layers/ArcGISTiledMapServiceLayer","esri/renderers/UniqueValueRenderer","esri/SpatialReference","esri/symbols/PictureMarkerSymbol","esri/tasks/GeometryService","esri/tasks/IdentifyParameters","esri/tasks/IdentifyTask","esri/tasks/LegendLayer","esri/tasks/PrintTask","esri/tasks/PrintParameters","esri/tasks/PrintTemplate","esri/geometry/webMercatorUtils","esri/urlUtils","dojo/dom","dojo/dom-class","dojo/dnd/Moveable","dojo/query","dojo/on","dojo/domReady!"],function(e,a,i,t,n,r,o,s,l,d,p,c,m,g,y,u,f,h,b,v,w,L,S,T,I,E,k,_,D,x,O){function C(){$("#printModal").modal("show")}function P(){$("#getDataModal").modal("show")}function M(e){var a="";switch(e){case"CIR":a="color infrared";break;case"TC":a="true color";break;case"BW":a="black and white"}return a}function A(){K.activeGeocoder.searchExtent=null}function R(){A();var e=K.find();e.then(function(e){W(e)})}function N(e){F();var a=e.graphic?e.graphic:e.result.feature;a.setSymbol(X)}function W(e){if(e=e.results,e.length>0){F();for(var a=0;a  '+s+"

");$("#printJobsDiv").find("p.toRemove").remove(),$("#printModalBody").append(a),$("#printTitle").val(""),$("#printExecuteButton").button("reset")}function a(e){alert("Sorry, an unclear print error occurred. Please try refreshing the application to fix the problem")}var i=new S;i.map=map;var t=new T;t.exportOptions={width:500,height:400,dpi:300},t.format="PDF",t.layout="Letter ANSI A Landscape test",t.preserveScale=!1;var n=new w;n.layerId="wetlands";var r=new w;r.layerId="wetlandsRaster";var o=$("#printTitle").val();""==o?t.layoutOptions={titleText:"Wetlands",authorText:"National Wetlands Inventory (NWI)",copyrightText:"This page was produced by the NWI mapper",legendLayers:[n,r]}:t.layoutOptions={titleText:o,authorText:"National Wetlands Inventory (NWI)",copyrightText:"This page was produced by the NWI mapper",legendLayers:[n,r]};var s=t.layoutOptions.titleText;i.template=t;var l=new L("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task");l.execute(i,e,a),$.get("https://fwsprimary.wim.usgs.gov/pdfLoggingService/pdfLog.asmx/Log?printInfo="+map.getScale()+","+map.extent.xmin+","+map.extent.ymax+","+map.extent.xmax+","+map.extent.ymin+",NWIV2",function(e){})}function H(e,a){var i;document.getElementById&&(i=document.getElementById(e))&&i.style&&(i.style.cursor=a)}i.defaults.io.corsEnabledServers.push("fwsprimary.wim.usgs.gov"),esri.config.defaults.io.proxyUrl="https://fwsprimary.wim.usgs.gov/serviceProxy/proxy.ashx",i.defaults.geometryService=new h("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/Geometry/GeometryServer"),map=new e("mapDiv",{basemap:"hybrid",extent:new p(-14638882.654811008,2641706.3772205533,-6821514.898031538,6403631.161302788,new u({wkid:3857})),fitExtent:!0,showLabels:!0});var Y=new n({map:map,extent:new p(-14638882.654811008,2641706.3772205533,-6821514.898031538,6403631.161302788,new u({wkid:3857}))},"homeButton");Y.startup();var j=new o({map:map,scale:4514},"locateButton");j.startup(),measurement=new s({map:map,advancedLocationUnits:!0},k.byId("measurementDiv")),measurement.startup(),$(window).resize(function(){$("#legendCollapse").hasClass("in")?(maxLegendHeight=.9*$("#mapDiv").height(),$("#legendElement").css("height",maxLegendHeight),$("#legendElement").css("max-height",maxLegendHeight),maxLegendDivHeight=$("#legendElement").height()-parseInt($("#legendHeading").css("height").replace("px","")),$("#legendDiv").css("max-height",maxLegendDivHeight)):$("#legendElement").css("height","initial")}),$("#printNavButton").click(function(){C()}),$("#printExecuteButton").click(function(e){e.preventDefault(),$(this).button("loading"),U()}),$("#getDataButton").click(function(){P()}),$("#aboutLink").click(function(){$("#aboutModal").modal("show"),$("#aboutTab").trigger("click")}),$("#disclaimerLink").click(function(){$("#aboutModal").modal("show"),$("#disclaimerTab").trigger("click")}),$("#dataLimitationsLink").click(function(){$("#aboutModal").modal("show"),$("#dataLimitationsTab").trigger("click")}),$("#userCautionLink").click(function(){$("#aboutModal").modal("show"),$("#userCautionTab").trigger("click")}),$(".docs").hide(),O(map,"load",function(){var e=map.getScale().toFixed(0);$("#scale")[0].innerHTML=addCommas(e);var a=I.webMercatorToGeographic(map.extent.getCenter());$("#latitude").html(a.y.toFixed(3)),$("#longitude").html(a.x.toFixed(3))}),O(map,"zoom-end",function(){var e=map.getScale().toFixed(0);$("#scale")[0].innerHTML=addCommas(e)}),O(map,"mouse-move",function(e){if($("#mapCenterLabel").css("display","none"),null!=e.mapPoint){var a=I.webMercatorToGeographic(e.mapPoint);$("#latitude").html(a.y.toFixed(3)),$("#longitude").html(a.x.toFixed(3))}}),O(map,"pan-end",function(){$("#mapCenterLabel").css("display","inline");var e=I.webMercatorToGeographic(map.extent.getCenter());$("#latitude").html(e.y.toFixed(3)),$("#longitude").html(e.x.toFixed(3))});var z=new g("https://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer"),B=new g("https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer");O(k.byId("btnStreets"),"click",function(){map.setBasemap("streets"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnSatellite"),"click",function(){map.setBasemap("satellite"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnHybrid"),"click",function(){map.setBasemap("hybrid"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnTerrain"),"click",function(){map.setBasemap("terrain"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnGray"),"click",function(){map.setBasemap("gray"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnNatGeo"),"click",function(){map.setBasemap("national-geographic"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnOSM"),"click",function(){map.setBasemap("osm"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnTopo"),"click",function(){map.setBasemap("topo"),map.removeLayer(B),map.removeLayer(z)}),O(k.byId("btnNatlMap"),"click",function(){map.addLayer(B,1),map.removeLayer(z)}),O(k.byId("btnUsgsTopo"),"click",function(){map.addLayer(z,1),map.removeLayer(B)}),$("#wetlandDiv").lobiPanel({unpin:!1,reload:!1,minimize:!1,close:!1,expand:!1,editTitle:!1,maxWidth:600,maxHeight:400}),$("#wetlandDiv .dropdown").prepend("
"),$("#wetlandClose").click(function(){$("#wetlandDiv").css("visibility","hidden"),map.graphics.clear()}),identifyParams=new b,identifyParams.tolerance=0,identifyParams.returnGeometry=!0,identifyParams.layerOption=b.LAYER_OPTION_ALL,identifyParams.width=map.width,identifyParams.height=map.height,identifyTask=new v(allLayers[0].layers.Wetlands.url);var q=x(".title",map.infoWindow.domNode)[0],V=new D(map.infoWindow.domNode,{handle:q});O(V,"FirstMove",function(){var e=x(".outerPointer",map.infoWindow.domNode)[0];_.add(e,"hidden");var e=x(".pointer",map.infoWindow.domNode)[0];_.add(e,"hidden")}.bind(this)),O(map,"click",function(e){if(1==aoiClicked)return void(aoiClicked=!1);if(null==measurement.activeTool)if(map.graphics.clear(),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click"),$("#wetlandDiv").css("visibility","hidden"),identifyParams.geometry=e.mapPoint,identifyParams.mapExtent=map.extent,map.getLevel()>=12&&0==$("#huc-download-alert")[0].scrollHeight){y=new v(allLayers[0].layers.Wetlands.url);var a=y.execute(identifyParams),i=new b;i.returnGeometry=!0,i.tolerance=0,i.width=map.width,i.height=map.height,i.geometry=e.mapPoint,i.layerOption=b.LAYER_OPTION_ALL,i.mapExtent=map.extent,i.layerIds=[0,1],H("mainDiv","wait"),map.setCursor("wait");var t=$("#wetlandDiv").data("lobiPanel"),n=$(document).height(),r=$(document).width(),o=.9,s=n*o,l=r*o,d=600,p=325;500>n&&($("#wetlandDiv").height(s),p=$("#floodToolsDiv").height()-50),500>r&&($("#wetlandDiv").width(l),d=$("#floodToolsDiv").width()-50);var c=.5*r-.5*$("#wetlandDiv").width(),m=.5*n-.5*$("#wetlandDiv").height();0==initWetlandClicked&&t.setPosition(c,m),1==t.isPinned()&&t.unpin(),initWetlandClicked=!0,$(".docs").hide(),$(".docItems").empty(),$("#reportInfo .panel-heading").addClass("loading-hide"),$("#reportInfo .panel-body").addClass("loading-hide"),$("#wetlandDiv").addClass("loading-background"),$(".tab-pane").addClass("hidden-loading"),a.addCallback(function(a){function t(e){var a;return a=0==e||""==e?"Link":e}if(a.length>1){var n,r,o,s,l=new b;l.returnGeometry=!1,l.tolerance=0,l.width=map.width,l.height=map.height,l.geometry=e.mapPoint,l.layerOption=b.LAYER_OPTION_ALL,l.mapExtent=map.extent,l.layerIds=[0,4];var d=new v(allLayers[1].layers["Source Type"].url),p=d.execute(l);p.addCallback(function(e){if(e.length>=1){for(var a=0;a"+t.PDF_NAME+"")):($("#"+e[i].value.toLowerCase()+"Docs").show(),$("#"+e[i].value.toLowerCase()+"Docs .docItems").append(""+t.Title+""))}}$("#reportInfo .panel-heading").removeClass("loading-hide"),$("#reportInfo .panel-body").removeClass("loading-hide"),$("#wetlandDiv").removeClass("loading-background"),$(".tab-pane").removeClass("hidden-loading")}),$("#wetlandTab").trigger("click"),$("#wetlandDiv").css("visibility","visible");for(var c=0;c10?$("#imageScalePopup").html("The wetlands and deepwater habitats in this area were photo interpreted using 1:"+addCommas(s.IMAGE_SCALE)+" scale, "):0!=s.IMAGE_SCALE&&$("#imageScalePopup").html("The wetlands and deepwater habitats in this area were photo interpreted using "+s.IMAGE_SCALE+" meter (or less) digital, "):$("#imageScalePopup").html(""),"Scalable"==s.SOURCE_TYPE?$("#sourceTypePopup").html("The data in this area are considered an interim scalable map product. Click here for a full description of Scalable Wetland Mapping. "):"Null"==s.SOURCE_TYPE?$("#sourceTypePopup").html("Photo interpretation information is not available for this project."):$("#sourceTypePopup").html(""+M(s.SOURCE_TYPE)+" imagery from "+t(s.IMAGE_YR)+". "),"None"!=s.SUPPMAPINFO?($("#suppMapInfo").empty(),$("#suppMapInfo").append('Click here for project specific mapping conventions and information.')):$("#suppMapInfo").empty();var u=["ATTRIBUTE","SYSTEM","SYSTEM_NAME","SYSTEM_DEFINITION","SUBSYSTEM","SUBSYSTEM_NAME","SUBSYSTEM_DEFINITION","CLASS","CLASS_NAME","CLASS_DEFINITION","SUBCLASS","SUBCLASS_NAME","SUBCLASS_DEFINITION","SPLIT_CLASS","SPLIT_CLASS_NAME","SPLIT_CLASS_DEFINITION","SPLIT_SUBCLASS","SPLIT_SUBCLASS_NAME","SPLIT_SUBCLASS_DEFINITION","WATER_REGIME","WATER_REGIME_NAME","WATER_REGIME_SUBGROUP","WATER_REGIME_DEFINITION","MODIFIER_1","MODIFIER_1_NAME","MODIFIER_1_GROUP","MODIFIER_1_SUBGROUP","MODIFIER_1_DEFINITION","MODIFIER_2","MODIFIER_2_NAME","MODIFIER_2_GROUP","MODIFIER_2_SUBGROUP","MODIFIER_2_DEFINITION","MODIFIER_3","MODIFIER_3_NAME","MODIFIER_3_GROUP","MODIFIER_3_SUBGROUP","MODIFIER_3_DEFINITION"];$.each(u,function(e){var a=u[e],i=o[a];"Null"!=i?"SPLIT_CLASS"!=a&&"SPLIT_CLASS_NAME"!=a&&"SPLIT_CLASS_DEFINITION"!=a||o.CLASS!=o.SPLIT_CLASS?($("#des"+a).html(o[a]),$("#des"+a).show(),$("#des"+a).parent().show()):$("#SPLIT_CLASS_GROUP").hide():$("#des"+a).parent().hasClass("decoder-group")&&$("#des"+a).parent().hide()});var f=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,f),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=I.webMercatorToGeographic(n.geometry),i=a.getExtent();map.setExtent(i,!0)}),$("#zoomProjectLink").click(function(e){var a=I.webMercatorToGeographic(r.geometry),i=a.getExtent();map.setExtent(i,!0);var t=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));r.geometry.spatialReference=map.spatialReference;var n=r;n.setSymbol(t),map.graphics.add(n)})}else if(a.length<=1){y=new v(allLayers[0].layers.Riparian.url);var h=y.execute(identifyParams);h.addCallback(function(a){if(a.length>1){for(var t,n,r,o,s=0;sclick here";var c=new esri.InfoTemplate("Riparian","Classification: "+r.ATTRIBUTE+" (decode)

Wetland Type: "+r.WETLAND_TYPE+"
Acres: "+Number(r.ACRES).toFixed(2)+"
Image Date(s): "+o.IMAGE_DATE+"
Project Metadata:"+p+"

Zoom to wetland

");$("#acreage").text(Number(r.ACRES).toFixed(2)),$("#wetlandCode").text(r.ATTRIBUTE),$("#wetlandType").text(r.WETLAND_TYPE),$("#decoderLink").click(function(e){$("#descriptionTab").trigger("click")}),$("#imageScalePopup").text(addCommas(o.IMAGE_SCALE)),$("#sourceTypePopup").text(M(o.SOURCE_TYPE)),0==o.IMAGE_DATE?$("#imageDate").append("Link"):$("#imageDate").text(o.IMAGE_DATE),$("#suppMapInfoLink").attr("href",o.SUPPMAPINFO),t.setInfoTemplate(c),map.infoWindow.setFeatures([t]),map.infoWindow.show(e.mapPoint);var m=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,m),$("infoWindowLink").unbind("click"),$("#zoomProjectLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=I.webMercatorToGeographic(t.geometry),i=a.getExtent();map.setExtent(i,!0)}),$("#zoomProjectLink").click(function(e){var a=I.webMercatorToGeographic(n.geometry),i=a.getExtent();map.setExtent(i,!0);var t=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));n.geometry.spatialReference=map.spatialReference;var r=n;r.setSymbol(t),map.graphics.add(r)})}else if(a.length<=1){var g=new v(allLayers[2].layers["Historic Wetland Data"].url),y=g.execute(i);y.addCallback(function(a){if(a.length>=1){for(var i,t,n,r=0;rclick here",(""==n.IMAGE_DATE||"0"==n.IMAGE_DATE||0==n.IMAGE_DATE)&&(n.IMAGE_DATE=l);var d=new esri.InfoTemplate("Historic Wetland","

Wetland Type: "+t.WETLAND_TYPE+"
Acres: "+Number(t.ACRES).toFixed(2)+"
Project Metadata:"+l+"

Zoom to wetland

");i.setInfoTemplate(d),map.infoWindow.setFeatures([i]),map.infoWindow.show(e.mapPoint,map.getInfoWindowAnchor(e.screenPoint));var p=dojo.connect(map.infoWindow,"onHide",function(e){map.graphics.clear(),dojo.disconnect(map.infoWindow,p),$("infoWindowLink").unbind("click")});H("mainDiv","default"),map.setCursor("default"),$("#infoWindowLink").click(function(e){var a=I.webMercatorToGeographic(i.geometry),t=a.getExtent();map.setExtent(t,!0)})}else H("mainDiv","default"),map.setCursor("default"),map.infoWindow.hide()})}})}})}else if($("#huc-download-alert")[0].scrollHeight>0){var g=new b;g.returnGeometry=!0,g.tolerance=0,g.width=map.width,g.height=map.height,g.geometry=e.mapPoint,g.layerOption=b.LAYER_OPTION_TOP,g.mapExtent=map.extent,g.spatialReference=map.spatialReference;var y=new v(allLayers[0].layers.HUC8.url),u=y.execute(g);u.addCallback(function(e){if(e.length>=1){var a;a=e[0].feature;var i=new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,255,0]),2),new dojo.Color([98,194,204,0]));a.geometry.spatialReference=map.spatialReference;var t=a;t.setSymbol(i),map.graphics.add(t);var n=I.webMercatorToGeographic(a.geometry),r=n.getExtent();map.setExtent(r,!0);var o=e[0].feature.attributes.HUC8,s=e[0].feature.attributes.Name;dojo.byId("innerAlert").innerHTML="

Download Data

Click the link below to download data for "+s+" watershed

HUC "+o+"

"}})}}),$(document).on("click","#showHUCs",function(){event.preventDefault(),$("#getDataModal").modal("hide"),$("#huc-download-alert").slideDown(250),map.getLayer("huc8").setVisibility(!0),dojo.byId("innerAlert").innerHTML="

Download Data

Please review the Data Download (www.fws.gov/wetlands/Data/Data-Download.html) page for information on how to download data, what is included in the download and data use limitations and disclaimer.


Click the map to select a watershed from which to extract wetland data.

"});var K=new t({value:"",maxLocations:25,autoComplete:!0,arcgisGeocoder:!0,autoNavigate:!1,map:map},"geosearch");K.startup(),K.on("select",N),K.on("findResults",W),K.on("clear",F),O(K.inputNode,"keydown",function(e){13==e.keyCode&&A()});var X=G("../images/purple-pin.png",0,12,13,24);map.on("load",function(){map.infoWindow.set("highlight",!1),map.infoWindow.set("titleInBody",!1)}),O(k.byId("btnGeosearch"),"click",R),$(document).ready(function(){function e(){$("#geosearchModal").modal("show")}function a(){$("#aboutModal").modal("show")}$("#geosearchNav").click(function(){e()}),$("#aboutNav").click(function(){a()}),$("#html").niceScroll(),$("#sidebar").niceScroll(),$("#sidebar").scroll(function(){$("#sidebar").getNiceScroll().resize()}),maxLegendHeight=.9*$("#mapDiv").height(),$("#legendElement").css("max-height",maxLegendHeight),maxLegendDivHeight=maxLegendHeight-parseInt($("#legendHeading").css("height").replace("px","")),$("#legendDiv").css("max-height",maxLegendDivHeight),$("#legendCollapse").on("shown.bs.collapse",function(){if(0==legendDiv.innerHTML.length){var e=new r({map:map,layerInfos:legendLayers},"legendDiv");e.startup(),$("#legendDiv").niceScroll()}}),$("#legendCollapse").on("hide.bs.collapse",function(){$("#legendElement").css("height","initial")}),$("#measurementCollapse").on("shown.bs.collapse",function(){$("#measureLabel").show()}),$("#measurementCollapse").on("hide.bs.collapse",function(){window.innerWidth<=767&&$("#measureLabel").hide()})}),require(["esri/Color","esri/InfoTemplate","esri/tasks/locator","esri/tasks/query","esri/tasks/QueryTask","esri/graphicsUtils","esri/geometry/Point","esri/geometry/Extent","esri/layers/ArcGISDynamicMapServiceLayer","esri/layers/ArcGISImageServiceLayer","esri/layers/FeatureLayer","esri/layers/LabelClass","esri/layers/WMSLayer","esri/layers/WMSLayerInfo","esri/symbols/TextSymbol","esri/tasks/GeometryService","dijit/form/CheckBox","dijit/form/RadioButton","dojo/query","dojo/dom","dojo/dom-class","dojo/dom-construct","dojo/dom-style","dojo/on"],function(e,a,i,t,n,r,o,s,l,d,p,c,m,g,y,u,f,h,b,v,w,L,S,T){function I(i,t,n,r,o,s,l){if(map.addLayer(n),0==l.legendLabel){var d=document.createElement("style");d.type="text/css",d.innerHTML="[id*="+n.id+"] .esriLegendLayerLabel { display: none; }",document.getElementsByTagName("head")[0].appendChild(d)}if("fwsTracts"==n.id){var p=new e("#FFF"),m=(new y).setColor(p);m.font.setSize("10pt"),m.font.setFamily("arial");var g={labelExpressionInfo:{value:"{ORGNAME}"}},u=new c(g);u.symbol=m,u.minScale=175e3,n.setLabelingInfo([u])}if("aoi"==n.id&&T(n,"load",function(e){T(n,"click",function(e){aoiClicked=!0;var i=e.graphic.attributes.HYPERLINK_2;if("None"==i){var t=new a("${NAME}","Type: ${TYPE}
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");n.setInfoTemplate(t)}else{var t=new a("${NAME}","Type: ${TYPE}
Ramsar: click here
Location Website: click here
Water Summary Report: click here
Wildlife Action Plan: click here
");n.setInfoTemplate(t)}})}),E.push([o,camelize(r),n]),o){if(!$("#"+camelize(o)).length){var f;if("Data Source"==o)var f=$('
');else var f=$('
"); f.click(function(e){f.find("i.glyphspan").toggleClass("fa-check-square-o fa-square-o"),$.each(E,function(e,a){var i=map.getLayer(a[2].id);if(a[0]==o)if($("#"+a[1]).find("i.glyphspan").hasClass("fa-dot-circle-o")&&f.find("i.glyphspan").hasClass("fa-check-square-o")){console.log("adding layer: ",a[1]),map.addLayer(a[2]);var i=map.getLayer(a[2].id);i.setVisibility(!0)}else if(f.find("i.glyphspan").hasClass("fa-square-o")){console.log("removing layer: ",a[1]);var i=map.getLayer(a[2].id);i.setVisibility(!1)}})});var h=$('
');$("#toggle").append(h)}if(n.visible)var b=$('
");else var b=$('
");$("#"+camelize(o)).append(b),b.click(function(e){if($(this).find("i.glyphspan").hasClass("fa-circle-o")){$(this).find("i.glyphspan").toggleClass("fa-dot-circle-o fa-circle-o");var a=$(this)[0].id;$.each(E,function(e,i){if(i[0]==o)if(i[1]==a&&$("#"+camelize(o+" Root")).find("i.glyphspan").hasClass("fa-check-square-o")){console.log("adding layer: ",i[1]),map.addLayer(i[2]);var t=map.getLayer(i[2].id);t.setVisibility(!0)}else if(i[1]==a&&$("#"+camelize(o+" Root")).find("i.glyphspan").hasClass("fa-square-o"))console.log("group heading not checked");else{console.log("removing layer: ",i[1]);var t=map.getLayer(i[2].id);t.setVisibility(!1),$("#"+i[1]).find("i.glyphspan").hasClass("fa-dot-circle-o")&&$("#"+i[1]).find("i.glyphspan").toggleClass("fa-dot-circle-o fa-circle-o")}})}})}else if(l.includeInLayerList){if(n.visible&&void 0!==l.hasOpacitySlider&&1==l.hasOpacitySlider&&void 0!==l.moreinfo&&l.moreinfo)var b=$('
');else if(!n.visible&&void 0!==l.hasOpacitySlider&&1==l.hasOpacitySlider&&void 0!==l.moreinfo&&l.moreinfo)var b=$('
');else if(n.visible&&void 0!==l.hasOpacitySlider&&1==l.hasOpacitySlider)var b=$('
');else if(n.visible||void 0===l.hasOpacitySlider||1!=l.hasOpacitySlider)if(n.visible&&void 0!==l.moreinfo&&l.moreinfo)var b=$('
');else if(!n.visible&&void 0!==l.moreinfo&&l.moreinfo)var b=$('
');else if(n.visible)var b=$('
");else var b=$('
");else var b=$('
');b.click(function(e){$(this).find("i.glyphspan").toggleClass("fa-check-square-o fa-square-o"),$(this).find("button").button("toggle"),n.visible?n.setVisibility(!1):n.setVisibility(!0),l.otherLayersToggled&&$.each(l.otherLayersToggled,function(e,a){var i=map.getLayer(a);i.setVisibility(n.visible)})})}if(void 0!==t){var v=camelize(i);if(!$("#"+v).length){if(t)var w=$('
");else var w=$('
');$("#toggle").append(w)}if(o){if($("#"+v).append(f),$("#"+v).append(h),void 0!==l.moreinfo&&l.moreinfo){var L="#info"+camelize(o),S=$(L);S.click(function(e){window.open(l.moreinfo,"_blank"),e.preventDefault(),e.stopPropagation()})}if($("#opacity"+camelize(o)).length>0){var L="#opacity"+camelize(o),I=$(L);I.click(function(e){e.preventDefault(),e.stopPropagation(),$(".opacitySlider").remove();var a=map.getLayer(s.id).opacity,i=$('
');$("body").append(i),$("#slider")[0].value=100*a,$(".opacitySlider").css("left",event.clientX-180),$(".opacitySlider").css("top",event.clientY-50),$(".opacitySlider").mouseleave(function(){$(".opacitySlider").remove()}),$(".opacityClose").click(function(){$(".opacitySlider").remove()}),$("#slider").change(function(e){var a=$("#slider")[0].value/100;console.log("o: "+a),$("#opacityValue").html("Opacity: "+a),map.getLayer(s.id).setOpacity(a),l.otherLayersToggled&&$.each(l.otherLayersToggled,function(e,i){var t=map.getLayer(i);t.setOpacity(a)})})})}}else{if($("#"+v).append(b),void 0!==l.moreinfo&&l.moreinfo){var L="#info"+camelize(r),S=$(L);S.click(function(e){window.open(l.moreinfo,"_blank"),e.preventDefault(),e.stopPropagation()})}$("#opacity"+camelize(r)).length>0&&$("#opacity"+camelize(r)).click(function(e){e.preventDefault(),e.stopPropagation(),$(".opacitySlider").remove();var a=map.getLayer(s.id).opacity,i=$('
');$("body").append(i),$("#slider")[0].value=100*a,$(".opacitySlider").css("left",event.clientX-180),$(".opacitySlider").css("top",event.clientY-50),$(".opacitySlider").mouseleave(function(){$(".opacitySlider").remove()}),$(".opacityClose").click(function(){$(".opacitySlider").remove()}),$("#slider").change(function(e){var a=$("#slider")[0].value/100;console.log("o: "+a),$("#opacityValue").html("Opacity: "+a),map.getLayer(s.id).setOpacity(a),l.otherLayersToggled&&$.each(l.otherLayersToggled,function(e,i){var t=map.getLayer(i);t.setOpacity(a)})})})}}else if($("#toggle").append(b),void 0!==l.moreinfo&&l.moreinfo){var L="#info"+camelize(r),S=$(L);S.click(function(e){alert(e.currentTarget.id),e.preventDefault(),e.stopPropagation()})}}var E=(new u("https://fwsprimary.wim.usgs.gov/server/rest/services/Utilities/Geometry/GeometryServer"),[]);$.each(allLayers,function(e,a){console.log("processing: ",a.groupHeading),$.each(a.layers,function(e,i){var t="";if(i.wimOptions.exclusiveGroupName&&(t=i.wimOptions.exclusiveGroupName),"agisFeature"===i.wimOptions.layerType){var n=new p(i.url,i.options);void 0!==i.wimOptions.renderer&&n.setRenderer(i.wimOptions.renderer),i.wimOptions&&1==i.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),I(a.groupHeading,a.showGroupHeading,n,e,t,i.options,i.wimOptions)}else if("agisWMS"===i.wimOptions.layerType){var n=new m(i.url,{resourceInfo:i.options.resourceInfo,visibleLayers:i.options.visibleLayers},i.options);i.wimOptions&&1==i.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),I(a.groupHeading,a.showGroupHeading,n,e,t,i.options,i.wimOptions)}else if("agisDynamic"===i.wimOptions.layerType){var n=new l(i.url,i.options);if(i.visibleLayers&&n.setVisibleLayers(i.visibleLayers),i.wimOptions&&i.wimOptions.layerDefinitions){var r=[];$.each(i.wimOptions.layerDefinitions,function(e,a){r[e]=a}),n.setLayerDefinitions(r)}i.wimOptions&&1==i.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),I(a.groupHeading,a.showGroupHeading,n,e,t,i.options,i.wimOptions)}else if("agisImage"===i.wimOptions.layerType){var n=new d(i.url,i.options);i.wimOptions&&1==i.wimOptions.includeLegend&&legendLayers.unshift({layer:n,title:e}),i.visibleLayers&&n.setVisibleLayers(i.visibleLayers),I(a.groupHeading,a.showGroupHeading,n,e,t,i.options,i.wimOptions)}})})})}),$(".close-alert").click(function(){$(this).parent().slideUp(250)}),$(document).ready(function(){}); \ No newline at end of file diff --git a/src/scripts/core.js b/src/scripts/core.js index 012ce18..c462956 100644 --- a/src/scripts/core.js +++ b/src/scripts/core.js @@ -1375,7 +1375,8 @@ require([ }; var fwsTractsLabelClass = new LabelClass(json); - fwsTractsLabelClass.symbol = fwsTractsLabel; + fwsTractsLabelClass.symbol = fwsTractsLabel; + fwsTractsLabelClass.minScale = 175000; layer.setLabelingInfo([ fwsTractsLabelClass ]); } diff --git a/src/scripts/layers.js b/src/scripts/layers.js index b92c1a4..6e0d715 100644 --- a/src/scripts/layers.js +++ b/src/scripts/layers.js @@ -278,7 +278,7 @@ require([ 'includeInLayerList': true, 'zoomScale': 144448, 'hasOpacitySlider': true, - 'moreinfo': 'http://www.fws.gov/gis/data/CadastralDB/index_cadastral.html', + 'moreinfo': 'https://fws.maps.arcgis.com/home/item.html?id=745ed874c1394da3a9aae50267c9e049', 'otherLayersToggled': ['fwsCentroids'], 'includeLegend' : true, 'esriLegendLabel': false,