function toFullExtent(){m_view.zoom=0}function btFullExtent_Click(){toFullExtent()}function ZoomIn(e){e?m_view.goTo({zoom:e}):0==e?m_view.goTo({zoom:0}):m_zoom.zoomIn()}function btZoomIn_Click(){ZoomIn()}function btZoomOut_Click(){ZoomOut()}function ZoomOut(e){e?m_view.goTo({zoom:e}):0==e?m_view.goTo({zoom:0}):m_zoom.zoomOut()}function btDrawPolygon_Click(){measureSquare()}function measureSquare(){measurePolygon(m_drawtool,m_view)}function measureLength(){if("2D"==currentMapMode)measurePolyline(m_drawtool,m_view);else{if(lengthMeasureWidget&&!lengthMeasureWidget.destroyed)return void lengthMeasureWidget.destroy();createLengthMeasureWidget()}}function btDrawPolyline_Click(){measureLength()}function createLengthMeasureWidget(){require(["esri/widgets/DirectLineMeasurement3D","dojo/domReady!"],function(e){lengthMeasureWidget=new e({view:m_view}),m_view.ui.add(lengthMeasureWidget,"top-right")})}function measurePolylineByPoint(f,h,b,w){var v;return require(["esri/Map","esri/views/MapView","esri/layers/MapImageLayer","esri/layers/TileLayer","esri/geometry/Geometry","esri/geometry/Extent","esri/tasks/GeometryService","esri/layers/GraphicsLayer","esri/widgets/ScaleBar","esri/WebMap","esri/geometry/SpatialReference","esri/Graphic","esri/views/2d/draw/Draw","esri/geometry/Polyline","esri/geometry/geometryEngine"],function(e,t,r,a,o,i,s,n,l,y,u,c,m,p,d){var g=new p({paths:[[f,h],[b,w]],spatialReference:2379});v=d.planarLength(g,"kilometers")}),v}function measurePolyline(h,b){require(["esri/Map","esri/views/MapView","esri/layers/MapImageLayer","esri/layers/TileLayer","esri/geometry/Geometry","esri/geometry/Extent","esri/tasks/GeometryService","esri/layers/GraphicsLayer","esri/widgets/ScaleBar","esri/WebMap","esri/geometry/SpatialReference","esri/Graphic","esri/views/2d/draw/Draw","esri/geometry/Polyline","esri/geometry/geometryEngine"],function(e,t,r,a,o,i,s,n,l,y,u,c,m,p,d){var g=h.create("polyline");function f(e){var t=e.vertices;btClear_Click();var r=new p({paths:t,spatialReference:m_view.spatialReference}),a=(graphic=new c({geometry:r,symbol:{type:"simple-line",color:[178,102,234,.8],width:2}}),graphic);GraphicsLayer_DrawLayer.add(a);var o,i,s=d.planarLength(r,"kilometers");if(s<0){var n=d.simplify(r);n&&(s="2D"==currentMapMode?d.planarLength(n,"kilometers"):d.geodesicLength(n,"kilometers"))}o=s,i=new c({geometry:r.extent.center,symbol:{type:"text",color:"black",haloColor:"black",haloSize:"1px",text:o.toFixed(2)+" km",xoffset:3,yoffset:3,font:{size:14,family:"sans-serif"}}}),GraphicsLayer_DrawLayer.add(i)}b.focus(),g.on("vertex-add",f),g.on("cursor-update",f),g.on("vertex-remove",f),g.on("draw-complete",f)})}function measurePolygon(h,b){require(["esri/Map","esri/views/MapView","esri/layers/MapImageLayer","esri/layers/TileLayer","esri/geometry/Geometry","esri/geometry/Extent","esri/tasks/GeometryService","esri/layers/GraphicsLayer","esri/widgets/ScaleBar","esri/WebMap","esri/geometry/SpatialReference","esri/Graphic","esri/views/2d/draw/Draw","esri/geometry/Polygon","esri/geometry/geometryEngine"],function(e,t,r,a,o,i,s,n,l,y,u,c,m,p,d){var g=h.create("polygon");function f(e){var t=e.vertices;btClear_Click();var r=new p({rings:t,spatialReference:m_view.spatialReference}),a=(graphic=new c({geometry:r,symbol:{type:"simple-fill",color:[178,102,234,.8],style:"solid",outline:{color:[255,255,255],width:2}}}),graphic);GraphicsLayer_DrawLayer.add(a);var o,i,s=d.planarArea(r,"square-kilometers");if(s<0){var n=d.simplify(r);n&&(s="2D"==currentMapMode?d.planarArea(n,"square-kilometers"):d.geodesicArea(n,"square-kilometers"))}o=s,i=new c({geometry:r.centroid,symbol:{type:"text",color:"black",haloColor:"black",haloSize:"1px",text:o.toFixed(2)+" 平方千米",xoffset:3,yoffset:3,font:{size:14,family:"sans-serif"}}}),GraphicsLayer_DrawLayer.add(i)}b.focus(),g.on("vertex-add",f),g.on("cursor-update",f),g.on("vertex-remove",f),g.on("draw-complete",f)})}function btPrintPicture_Click(){downLoadPicture()}function downLoadPicture(){!m_printTool||m_printTool.destroyed?require(["esri/widgets/Print"],function(e){m_printTool=new e({view:m_view,printServiceUrl:GetConfigDataByName("PrintTaskURL")}),m_view.ui.add(m_printTool,"top-right")}):m_printTool.destroy()}function btPrintPicture_Click2(){require(["esri/tasks/PrintTask","esri/tasks/support/PrintParameters","esri/tasks/support/PrintTemplate"],function(e,t,r){var a=new e(GetConfigDataByName("PrintTaskURL")),o=new r;o.exportOptions={width:1200,height:700,dpi:96},o.format="JPG",o.layout="MAP_ONLY",o.preserveScale=!0;var i=new t;i.view=m_view,i.template=o,a.execute(i).then(function(e){window.open(e.url,"_blank")})})}function btGetGraphicByJson(){doGetGraphicByJson('{"ExChangeRoot": {"Features": [ { "type": "polygon", "featureName": "用地", "Feature":[ {"Geometry": { "Rings": [{ "Ring": "1000,-1000|0,-1500|-1000,-1000|-1000,1000|1000,1000|2000,0" } ]},"Attribute": { "ID": "1", "地块面积": "100", "建筑限高": "20" }, "ToolTip": "用地地块","Color": "yellow", "Style": "solid" } ] },{ "type": "polyline", "featureName": "道路", "Feature": [{"ShowInfo":"yes", "Geometry": {"Paths": [{ "Path": "3778,-2008|2777,-2816|3777,-3021|3777,-3529|3772,-3928|3774,-4405|3777,-5206" }] }, "Attribute": {"ID": "2","道路名": "人民大道", "道路长度": "10000", "道路宽度": "25" }, "ToolTip": "人民大道", "Color": [225,0,0,0.5], "Size": "5" }] },{ "type": "point", "featureName": "兴趣点", "Feature":[ { "Geometry": { "Points":[ { "Point": "2600,900" } ]},"Attribute": { "ID": "3","名称": "东方明珠" }, "ToolTip": "东方明珠","Color": "blue", "Size": "10", "Style": "square"}]}]}}')}function jsontagUndefined(e){return null!=e?e:null}function attributesToHTMLStr(e){var t="";for(var r in e)t+=r+":"+e[r]+"
";return t}function polygonxmlToArray(e){for(var t=[],r=e.split("|"),a=0;a"+t[a]+"";document.getElementById(l).innerHTML=r}).otherwise(function(e){console.error("错误信息: ",e.message)})})}function changeAreaNameSelect(){var e=areaName.value;-1==e?(GraphicsLayer_DrawLayer.removeAll(),queryExtent=null):queryGraphicBySelect(GetLayerIdbyName("特色街区"),e)}function changeStreetNameSelect(){var e=streetName.value;-1==e?(GraphicsLayer_DrawLayer.removeAll(),queryExtent=null):queryGraphicBySelect(GetLayerIdbyName("街道乡镇"),e)}function queryGraphicBySelect(l,y){require(["esri/tasks/QueryTask","esri/tasks/support/Query","esri/layers/FeatureLayer","dojo/_base/array","esri/Graphic","dojo/dom"],function(e,t,r,a,o,i){GraphicsLayer_DrawLayer.removeAll(),queryExtent=null;var s=new e({url:dyLayer.url+"/"+l}),n=new t({geometry:queryExtent,returnGeometry:!0,outFields:["*"]});n.where="名称 = '"+y+"'",s.execute(n).then(function(e){var t=a.map(e.features,function(e){if("2D"==currentMapMode)return e.symbol={type:"simple-fill",style:"none",color:null,outline:{style:"solid",color:"red",width:2}},e.geometry.spatialReference=m_view.spatialReference,queryExtent=e.geometry,e.geometry.spatialReference=m_view.spatialReference,e;for(var t=0;t"}function promiseRejected(e){console.error("错误信息: ",e.message)}params.where=whereStr,qTask.execute(params).then(getResults).otherwise(promiseRejected)})}function openResultTable(){document.getElementById("resultList").style.display="",dyCretateTableByArray("resultListTable",queryList,["名称"],["名称"],!1)}function closeResultList(){document.getElementById("resultList").style.display="none"}function openInfoWin(e){var t="";switch(select_zylx.value){case"CORP":case"ETPS":case"PE":t=quickQueryAttributesToHTMLStr(e);break;case"PARK":case"BUILDING":t=quickQueryIFrameToHTMLStr(e);break;case"YDYZ":t=quickQueryAttributesToHTMLStr(e)}return t}function quickQueryAttributesToHTMLStr(e){var t=[],r="";switch(select_zylx.value){case"CORP":t=[{cname:"CORP_NAME",showname:"组织名称"},{cname:"ADDRESS",showname:"地址"}],r="http://10.214.3.195:8001/coop/syn/detail_register_view_out?ifEncrypt=0&userName="+"wdzc"+"&passWord="+"68cf63c62bc68d71fc41c028375e2f6e"+"&entyId="+String(e.CORP_INFO_ID)+"&type=06";break;case"ETPS":t=[{cname:"UNISC_ID",showname:"统一社会信用代码"},{cname:"REG_NO",showname:"注册号"},{cname:"ETPS_NAME",showname:"企业名称"},{cname:"ADDRESS",showname:"住所"}],r="http://10.214.3.195:8001/coop/syn/detail_register_view_out?ifEncrypt=0&userName="+"wdzc"+"&passWord="+"68cf63c62bc68d71fc41c028375e2f6e"+"&entyId="+String(e.ETPS_ID)+"&type=02";break;case"PE":t=[{cname:"UNISC_ID",showname:"统一社会信用代码"},{cname:"REG_NO",showname:"注册号"},{cname:"NAME",showname:"个体名称"},{cname:"ADDRESS",showname:"地址"}],r="http://10.214.3.195:8001/coop/syn/detail_register_view_out?ifEncrypt=0&userName="+"wdzc"+"&passWord="+"68cf63c62bc68d71fc41c028375e2f6e"+"&entyId="+String(e.PE_ID)+"&type=05";break;case"YDYZ":t=[{cname:"MDNAME",showname:"门店名称"},{cname:"ADDRESS",showname:"详细地址"},{cname:"STREET",showname:"街道"},{cname:"ROAD",showname:"道路"},{cname:"JYZLENUMITEM",showname:"经营种类"},{cname:"JYZL",showname:"经营种类(其他)"},{cname:"FW_SX",showname:"房屋属性"},{cname:"MZDW_BZ",showname:"备注(基本信息)"},{cname:"ZZ_QK",showname:"证照情况"},{cname:"JYZ",showname:"经营者"},{cname:"JYZ_IDCARD",showname:"身份证(经营者)"},{cname:"JYZ_LXDZ",showname:"联系地址(经营者)"},{cname:"JYZ_JG",showname:"籍贯(经营者)"},{cname:"JYZ_ZZDZ",showname:"暂住地址(经营者)"},{cname:"ZZ_BZ",showname:"备注(证照情况)"},{cname:"FD_NAME",showname:"房东姓名/单位"},{cname:"FD_JG",showname:"籍贯(房东)"},{cname:"FD_LXDZ",showname:"联系地址(房东)"},{cname:"FD_LXFS",showname:"联系方式(房东)"},{cname:"FD_BZ",showname:"备注(房东)"},{cname:"JYZ_LXFS",showname:"联系方式(经营者)"},{cname:"FW_BZ",showname:"备注(房屋)"},{cname:"JYMJ",showname:"经营面积"},{cname:"QT_ZRDY",showname:"责任队员"},{cname:"ORGAN",showname:"部门"},{cname:"QT_SSGD",showname:"所属岗段"},{cname:"JW_LD",showname:"居委领导"},{cname:"ROADTYPE",showname:"道路类型"},{cname:"NUM",showname:"门牌号"},{cname:"GRIDCENTER",showname:"网格中心"},{cname:"QT_WG",showname:"网格"},{cname:"ZZ_SX",showname:"证照属性"},{cname:"JW_NAME",showname:"居委名称"},{cname:"JW_LXDH",showname:"联系电话(居委)"},{cname:"ZXZTSJ",showname:"注销状态时间"},{cname:"CFAJH",showname:"曾经是否处罚过"},{cname:"JE",showname:"金额(处罚)"},{cname:"OPTIME",showname:"操作时间"},{cname:"ISZY",showname:"是否重要"},{cname:"QT_LXFS",showname:"联系方式"},{cname:"OPUSER",showname:"操作人"},{cname:"JYZ_BZ",showname:"备注"},{cname:"ZXZT",showname:"注销状态"},{cname:"BZ",showname:"备注"},{cname:"LONG1",showname:"经度gps"},{cname:"LAT",showname:"纬度gps"}],r="http://10.214.3.195:8001/coop/syn/detail_register_view_out?ifEncrypt=0&userName="+"wdzc"+"&passWord="+"68cf63c62bc68d71fc41c028375e2f6e"+"&entyId="+String(e.ROWGUID)+"&type=05"}var a="";for(var o in e)for(var i=0;i");return a+="
[点击详情信息]"}function quickQueryIFrameToHTMLStr(e){var t=String(e.主键),r="";switch(select_zylx.value){case"PARK":r="http://10.214.4.162:8080/parkms/tj/parksysSuperviseCD_SSLDL.action?systemsign=408080a758f26bb00158f26f13f30001&is_Park=1&buildingInfosId="+t;break;case"BUILDING":r="http://10.214.4.162:8080/parkms/tj/parksysSuperviseCD_SSLDL.action?systemsign=408080a758f26bb00158f26f13f30001&is_Park=2&buildingInfosId="+t}return"
"}function openQuery(){document.getElementById("query").style.display="",document.getElementById("queryReult1").style.display="",document.getElementById("queryReult2").style.display="none",document.getElementById("return").style.display="none",document.getElementById("barcon1").style.display="",document.getElementById("barcon2").style.display="none",document.getElementById("name").value="",document.getElementById("queryTable1").innerHTML="",document.getElementById("barcon1").innerHTML="",createLayerSelect("quertLayerSelect")}function closeQuery(){document.getElementById("query").style.display="none"}function returnQueryList(){document.getElementById("queryReult1").style.display="",document.getElementById("queryReult2").style.display="none",document.getElementById("return").style.display="none",document.getElementById("barcon1").style.display="",document.getElementById("barcon2").style.display="none"}function queryByWhere(){document.getElementById("queryReult1").style.display="",document.getElementById("queryReult2").style.display="none",""!=document.getElementById("name").value?(queryExtent=null,btClear_Click(),queryAll()):alert("请输入查询内容")}function newOpenLayer(l,e,t,y,u){if(1==e)e="街道乡镇";else{if(2!=e)return;e="区县边界"}var c=GetFeatureLayerIdbyName(e),m="",p="",d="";d="街道乡镇"==e?(m="街道名称 = '"+t+"'",p="街道代码"):(m="区县名称 = '"+t+"'",p="区县代码","区代码"),-1==c?window.parent.postMessage({method:"newOpenLayer",data:["参数type填写错误"]},"*"):require(["esri/tasks/QueryTask","esri/tasks/support/Query","esri/layers/FeatureLayer","dojo/_base/array","dojo/dom"],function(a,o,e,t,r){var i=dyLayer.url+"/"+c,s=i+"?f=pjson",n=GetXmlHttpObject();n.open("GET",s,!0),n.send(),n.onreadystatechange=function(){if(4==n.readyState){var e=n.responseText,t=(JSON.parse(e),new a({url:i})),r=new o({geometry:queryExtent,returnGeometry:!0,outFields:["*"]});r.where=m,t.execute(r).then(function(e){if(0==e.features.length)return void window.parent.postMessage({method:"newOpenLayer",data:["参数name填写错误"]},"*");var t=e.features[0],r=e.features[0].attributes[p];newOpenLayerbyWhere(l,u,d,r),y&&m_view.goTo(t.geometry)}).otherwise(function(e){})}}})}function newOpenLayerbyWhere(r,m,p,d){if(m)require(["esri/layers/FeatureLayer","dojo/on"],function(y,e){var u=GetFeatureLayerIdbyName(r),t=dyLayer.url+"/"+u+"?f=pjson",c=GetXmlHttpObject();c.open("GET",t,!0),c.send(),c.onreadystatechange=function(){if(4==c.readyState){var e,t=c.responseText,r=JSON.parse(t),a=(r.drawingInfo.renderer,r.drawingInfo.renderer.symbol);r&&("esriSFS"==a.type?e={type:"simple-fill",style:changeStyle(a.style),color:a.color,outline:{style:changeStyle(a.outline.style),color:a.outline.color,width:a.outline.width}}:"esriPMS"==a.type?e={type:"picture-marker",url:"data:image/png;base64,"+a.imageData,width:a.width,height:a.height}:"esriSMS"==a.type&&(e={type:"simple-marker",size:a.size,color:a.color,outline:a.outline}));for(var o={type:"unique-value",field:p,uniqueValueInfos:[{value:d,symbol:e}]},i=GetConfigDataByName("MYFeatureLayerLayer"),s=!0,n=0;n=layerInfo.length&&progress("100%"));var name=document.getElementById("name").value;if(j==layerInfo.length)return 0==queryList.length?void alert("没有结果"):(m_view.goTo(GraphicsLayer_myLayer.graphics),dyCretateTableByArray("queryTable1",queryList,["名称","图层名"],["名称","图层名"],!1,!0),void goPage(1,"queryTable1"));for(var layerField="",xmlDoc1=xmlUtil.loadXmlFromFile("config/layerQueryName.xml"),layerXml=xmlDoc1.getElementsByTagName(GetLayerNamebyId(j)),mapNodes=layerXml[0].childNodes,i=0;i"+attributesToHTMLStr(feature.attributes)};feature.popupTemplate=popupTemplate;var attInfo=[];for(var name in feature.attributes)attInfo.push({"属性":name,"值":feature.attributes[name]});var list={"名称":feature.attributes[layerField],"图层名":GetLayerNamebyId(j),"详情":attInfo,"几何":feature};return queryList.push(list),"3D"==currentMapMode&&"esriSFS"==symbolJson.type?(polygonGraphic.geometry.spatialReference=m_view.spatialReference,polygonGraphic.popupTemplate=popupTemplate,polygonGraphic):feature});if(GraphicsLayer_myLayer.addMany(peakResults),"3D"==currentMapMode){if(0==queryList.length)return void alert("没有结果");m_view.goTo(GraphicsLayer_myLayer.graphics),dyCretateTableByArray("queryTable1",queryList,["名称","图层名"],["名称","图层名"],!1,!0),goPage(1,"queryTable1")}else queryRecursive(j+1)}function promiseRejected(e){console.error("图层:"+j+"错误信息: ",e.message)}where=null==name||""==name?"1=1":layerField+" like '%"+name+"%' ",params.where=where,qTask.execute(params).then(getResults).otherwise(promiseRejected)})}function queryBySquare(){queryExtent=null,require(["esri/Map","esri/views/MapView","esri/layers/MapImageLayer","esri/layers/TileLayer","esri/geometry/Geometry","esri/geometry/Extent","esri/tasks/GeometryService","esri/layers/GraphicsLayer","esri/widgets/ScaleBar","esri/WebMap","esri/geometry/SpatialReference","esri/Graphic","esri/views/2d/draw/Draw","esri/geometry/Polygon","esri/geometry/geometryEngine"],function(e,t,r,a,o,i,s,n,l,y,u,c,m,p,d){var g=m_drawtool.create("polygon");function f(e){var t=e.vertices;btClear_Click();var r=new p({rings:t,spatialReference:m_view.spatialReference}),a=(graphic=new c({geometry:r,symbol:{type:"simple-fill",color:[178,102,234,.8],style:"solid",outline:{color:[255,255,255],width:2}}}),graphic);GraphicsLayer_DrawLayer.add(a),queryExtent=r}m_view.focus(),g.on("vertex-add",f),g.on("cursor-update",f),g.on("vertex-remove",f),g.on("draw-complete",function(e){f(e),queryAll()})})}function queryByStreet(){document.getElementById("name").value="",queryExtent=null,btClear_Click(),m_drawtool.create("point").on("draw-complete",function(e){createPointGraphic(e.coordinates,"街道乡镇")})}function queryByCommittees(){document.getElementById("name").value="",queryExtent=null,btClear_Click(),m_drawtool.create("point").on("draw-complete",function(e){createPointGraphic(e.coordinates,"村居委会")})}function createPointGraphic(r,a){require(["esri/geometry/Point"],function(e){m_view.graphics.removeAll();var t=new e({x:r[0],y:r[1],spatialReference:m_view.spatialReference});queryExtent=t,queryExtentByPoint(a)})}function queryExtentByPoint(n){var l=GetLayerIdbyName(n);require(["esri/tasks/QueryTask","esri/tasks/support/Query","esri/layers/FeatureLayer","dojo/_base/array","dojo/dom"],function(e,t,r,a,o){var i=new e({url:dyLayer.url+"/"+l}),s=new t({geometry:queryExtent,returnGeometry:!0,outFields:["*"]});s.where="1=1",i.execute(s).then(function(e){0==a.map(e.features,function(e){return e.geometry.spatialReference=m_view.spatialReference,queryExtent=null,queryExtent=e.geometry,e}).length?alert("无此范围"+n):queryAll()}).otherwise(function(e){console.error("错误信息: ",e.message)})})}function createLayerSelect(e){var t,r=document.getElementById(e);if(r.innerHTML="",null!=(t=GetDynamicServiceLayer()))for(var a=t.length;0