var m_map;var m_view;var m_sceneLayer;var m_zoom;var dyLayer;var m_drawtool;var m_printTool;var queryExtent;var xmlQueryExtend;var layerList;var symble=[];var initExtent;var FullExtent;var geometryService;var GraphicsLayer_labelLayer;var GraphicsLayer_myLayer;var GraphicsLayer_identityLayer;var GraphicsLayer_extendLayer;var GraphicsLayer_fickerLayer;var GraphicsLayer_DrawLayer;var GraphicsLayer_flyTipLayer;var lengthMeasureWidget;var groundColor=[0,0,0];var currentMapMode;var currentExtent;var currentScale;var highlightSelect;var highlightSelectExtra;var m_mapClickdraw=false;var m_mapAttribute='{ "ID": "1","名称": "测试点1" }';var m_mapToolTip="测试点1";var m_mapImgUrl="https://static.arcgis.com/images/Symbols/Shapes/BlackStarLargeB.png";var m_mapImgWidth="32px";var m_mapImgHeight="32px";var m_mapAddress;var m_maphitPoint;var spatialReferenceJson={wkt:'PROJCS["shanghaicity_chy",GEOGCS["GCS_Beijing_1954",DATUM["D_Beijing_1954",SPHEROID["Krasovsky_1940",6378245.0,298.3]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",-3457147.81],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",121.2751921],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]'};var isMapLoaded=false;var fe0;var fe1;var fe2;var fe3;var fe4;var fe5;var fe6;var fe7;var fe8;var fe9;var fe10;function init3DScene(){currentMapMode="3D";require(["esri/Map","esri/Graphic","esri/geometry/Extent","esri/geometry/Polygon","esri/geometry/Point","esri/views/MapView","esri/views/SceneView","esri/layers/MapImageLayer","esri/layers/TileLayer","esri/layers/VectorTileLayer","esri/layers/GraphicsLayer","esri/tasks/GeometryService","esri/portal/Portal","esri/WebScene","esri/widgets/LayerList","esri/config","esri/widgets/ScaleBar","esri/layers/FeatureLayer","esri/layers/SceneLayer","esri/layers/support/LabelClass","esri/widgets/NavigationToggle","esri/widgets/Zoom","esri/widgets/Compass","esri/Color","esri/core/watchUtils","esri/symbols/TextSymbol","esri/Camera","dojo/domReady!"],function(Map,Graphic,Extent,Polygon,Point,MapView,SceneView,MapImageLayer,TileLayer,VectorTileLayer,GraphicsLayer,GeometryService,Portal,WebScene,LayerList,esriConfig,ScaleBar,FeatureLayer,SceneLayer,LabelClass,NavigationToggle,Zoom,Compass,Color,watchUtils,TextSymbol,Camera){esriConfig.request.corsEnabledServers.push("http://10.101.35.46");m_map=new Map({ground:{surfaceColor:groundColor}});dyAddMapLayerByConfig();AddMapGraphicLayers();m_view=new SceneView({container:"mapDiv",constraints:{collision:{enabled:false},tilt:{max:179.99,min:0}},map:m_map,viewingMode:"local",alphaCompositingEnabled:true,environment:{background:{type:"color",color:[0,0,0,1]},starsEnabled:false,atmosphereEnabled:false},ui:{components:["attribution"]}});AddSceneViewWidget();m_view.when(function(){var centerPoint=new Point({x:43184,y:-37270,z:2e3,spatialReference:m_view.spatialReference});setCameraBypoint(0,centerPoint,45,45,currentScale);var displaynoneDiv1=document.getElementsByClassName("esri-attribution__powered-by");for(var i=0;i0){var number=parseInt(floorNumber.substr(0,floorNumber.length-1));if(number>7){number=Math.ceil(number/2)}openLayer(popupView.map,"F"+number)}}});return popupView.container}function openLayer(openMap,layerName){var layers=openMap.layers.items[0].allSublayers;if(layers.length>0){for(var i=0;i360){currentCircle=0}if(currentCircle<0){currentCircle=360}currentCircle-=1;console.log(currentCircle);beginCircle(pointX,pointY,pointZ,currentCircle,tiltValue)}})}function AddSceneViewWidget(){var viewTest=document.getElementById("viewTest");m_view.ui.add(viewTest,"bottom-right")}function dyAddMapLayerByConfig(){var serverUrl;var serverType;var serverLabel;var serverVisible;GetConfigData();var mapXml=xmlDoc.getElementsByTagName("map");var mapNodes=mapXml[0].childNodes;for(var i=0;i";return str}function setCamera(isAnimation,pointX,pointY,pointZ,headingValue,tiltValue,scaleValue){require(["esri/Camera","esri/geometry/Point"],function(Camera,Point){var pt=new Point({x:pointX,y:pointY,z:pointZ,spatialReference:m_view.spatialReference});if(isAnimation){m_view.goTo({target:pt,heading:headingValue,tilt:tiltValue,scale:scaleValue})}else{var cam=new Camera({heading:headingValue,tilt:tiltValue,position:pt});m_view.camera=cam}})}function setCameraBypoint(isAnimation,centerPoint,headingValue,tiltValue,scaleValue){require(["esri/Camera","esri/geometry/Point"],function(Camera,Point){var R=centerPoint.z*Math.tan(tiltValue*Math.PI/180);var viewX=centerPoint.x-R*Math.cos((90-headingValue)*Math.PI/180);var viewY=centerPoint.y-R*Math.sin((90-headingValue)*Math.PI/180);var viewZ=centerPoint.z;console.log("viewX:"+viewX+",viewY:"+viewY+",viewZ:"+viewZ);if(isAnimation){m_view.goTo({center:[viewX,viewY,viewZ,m_view.spatialReference],heading:headingValue,tilt:tiltValue})}else{var point=new Point({x:viewX,y:viewY,z:viewZ,spatialReference:m_view.spatialReference});var cam=new Camera({heading:headingValue,tilt:tiltValue,position:point});m_view.camera=cam}})}function switchTo2DMap(){currentExtent=m_view.extent;currentScale=m_view.scale;currentExtent.spatialReference=m_view.spatialReference;initMap()}function switchTo3DMap(){currentExtent=m_view.extent;currentScale=m_view.scale;currentExtent.spatialReference=m_view.spatialReference;init3DScene()}function getLayerByLayerId(layerID){for(var i=0;i0)window.parent.postMessage({method:"mapOnclickCallback",data:[JSON.stringify(result.graphic.attributes).replace(/\"/g,'"'),JSON.stringify(results1.features[0].attributes["网格编码"]).replace(/\"/g,'"')]},"*");else{window.parent.postMessage({method:"mapOnclickCallback",data:[JSON.stringify(result.graphic.attributes).replace(/\"/g,'"'),""]},"*")}});if(result.graphic.layer.id=="myGLayer"){var graphic;switch(result.graphic.geometry.type){case"point":{var point={type:"point",x:result.graphic.geometry.x,y:result.graphic.geometry.y,spatialReference:m_view.spatialReference};var markerSymbol={type:"simple-marker",color:[0,255,255,.5],style:"circle",size:26,outline:{width:.5,color:[0,255,255,.5]}};graphic=new Graphic({geometry:point,symbol:markerSymbol});break}}GraphicsLayer_flyTipLayer.removeAll()}break}default:{if(result.graphic.layer.declaredClass=="esri.layers.FeatureLayer"){var queryTask=new QueryTask({url:GetConfigDataByName("QueryLayer")+"/250"});var query=new Query;query.geometry=null;query.outFields=["*"];query.returnGeometry=true;query.spatialRelationship="intersects";query.where="1=1";query.geometry=result.graphic.geometry;queryTask.execute(query).then(function(results1){if(results1.features.length>0)window.parent.postMessage({method:"mapOnclickCallback",data:[JSON.stringify(result.graphic.attributes).replace(/\"/g,'"'),JSON.stringify(results1.features[0].attributes["网格编码"]).replace(/\"/g,'"')]},"*");else{window.parent.postMessage({method:"mapOnclickCallback",data:[JSON.stringify(result.graphic.attributes).replace(/\"/g,'"'),""]},"*")}})}break}}}}})})});var scaleBar=new ScaleBar({view:m_view});if(currentExtent!=null){m_view.extent=currentExtent}function dyAddMapLayerByConfig(){var serverUrl;var serverType;var serverLabel;var serverVisible;GetConfigData();var mapXml=xmlDoc.getElementsByTagName("map");var mapNodes=mapXml[0].childNodes;for(var i=0;i0){}}}};break}case"vector":{var vlayer=new VectorTileLayer({url:serverUrl,id:serverLabel});m_map.add(vlayer);break}}}function dynamicLayerLoaded(event){m_view.zoom=3}function AddMapGraphicLayers(){GraphicsLayer_labelLayer=new GraphicsLayer;GraphicsLayer_labelLayer.listMode="hide";GraphicsLayer_myLayer=new GraphicsLayer({id:"myGLayer"});GraphicsLayer_myLayer.listMode="hide";GraphicsLayer_identityLayer=new GraphicsLayer;GraphicsLayer_identityLayer.listMode="hide";GraphicsLayer_extendLayer=new GraphicsLayer;GraphicsLayer_extendLayer.listMode="hide";GraphicsLayer_fickerLayer=new GraphicsLayer;GraphicsLayer_fickerLayer.listMode="hide";GraphicsLayer_DrawLayer=new GraphicsLayer({id:"myDrawGLayer"});GraphicsLayer_DrawLayer.listMode="hide";GraphicsLayer_flyTipLayer=new GraphicsLayer;GraphicsLayer_flyTipLayer.listMode="hide";m_map.add(GraphicsLayer_labelLayer);m_map.add(GraphicsLayer_identityLayer);m_map.add(GraphicsLayer_extendLayer);m_map.add(GraphicsLayer_flyTipLayer);m_map.add(GraphicsLayer_myLayer);m_map.add(GraphicsLayer_fickerLayer);m_map.add(GraphicsLayer_DrawLayer)}function AddSceneViewWidget(){}watchUtils.whenTrue(m_view,"stationary",function(){if(m_view.center){var xmax=m_view.extent.xmax;var xmin=m_view.extent.xmin;var ymax=m_view.extent.ymax;var ymin=m_view.extent.ymin;var extent=m_view.extent;if(ecxtentChanged!==undefined&&ecxtentChanged.xmin===extent.xmin&&ecxtentChanged.ymin===extent.ymin&&ecxtentChanged.xmax===extent.xmax&&ecxtentChanged.ymax===extent.ymax)return;var precision=5e3;var diff=0;var hasChanged=false;if(isSetMapZoom){m_maxZoom=m_view.zoom;isSetMapZoom=false}if(viewxmin-xmin>precision){hasChanged=true;diff=viewxmin-xmin;xmin+=diff;xmax+=diff;if(xmax>viewxmax){diff=xmax-viewxmax;diff=(ymax-ymin)*diff/(xmax-xmin);xmax=viewxmax;ymin+=diff/2;ymax-=diff/2}}if(viewymin-ymin>precision){hasChanged=true;diff=viewymin-ymin;ymin+=diff;ymax+=diff;if(ymax>viewymax){diff=ymax-viewymax;diff=(xmax-xmin)*diff/(ymax-ymin);ymax=viewymax;xmin+=diff/2;xmax-=diff/2}}if(xmax-viewymax>precision){hasChanged=true;diff=xmax-viewymax;xmin-=diff;xmax-=diff;if(xminprecision){hasChanged=true;diff=ymax-viewymax;ymin-=diff;ymax-=diff;if(ymin=2){x=x-0;y=y-0;m_view.center=new Point({x:x-0,y:y-0,spatialReference:m_view.spatialReference})}});document.addEventListener("touchend",function(e){})}})})}var ecxtentChanged;function initMapEdit(){require(["esri/Map","esri/views/MapView","esri/widgets/Editor","esri/layers/FeatureLayer"],function(Map,MapView,Editor,FeatureLayer){var editConfigCrimeLayer,editConfigPoliceLayer;m_map=new Map({logo:false});m_view=new MapView({container:"viewDiv",map:m_map});var serverUrl=GetConfigDataByName("EditLayer");var xmlHttpRest=GetXmlHttpObject();xmlHttpRest.open("GET",serverUrl+"?f=pjson",true);xmlHttpRest.send();xmlHttpRest.onreadystatechange=function(){var responseText=xmlHttpRest.responseText;if(xmlHttpRest.readyState==4){var LayerJsonData=JSON.parse(responseText);if(LayerJsonData!=""){var layers=LayerJsonData.layers;if(layers.length>0){for(var i=0;i=80){tilt=0}else if(tilt>=40){tilt=80}else{tilt=40}m_view.goTo({tilt:tilt})}function GetLayerMainRestInfo2(restURL){var restUrl=restURL+"?f=pjson";var xmlHttpRest=GetXmlHttpObject();xmlHttpRest.open("GET",restUrl,true);xmlHttpRest.send();xmlHttpRest.onreadystatechange=function(){var responseText=xmlHttpRest.responseText;if(xmlHttpRest.readyState==4){GetLayerMainRestInfo_Complete2(restURL,responseText)}}}function GetLayerMainRestInfo_Complete2(restURL,data){extraLayerJsonData=JSON.parse(data);onMapLoadInfo()}function GetLayerMainRestInfo1(restURL){var restUrl=restURL+"?f=pjson";$.ajax({type:"get",url:restUrl,crossDomain:true,dataType:"jsonp",success:GetLayerMainRestInfo_Complete(restURL,data)})}function GetLayerMainRestInfo(restURL){var restUrl=restURL+"?f=pjson";var xmlHttpRest=GetXmlHttpObject();xmlHttpRest.open("GET",restUrl,true);xmlHttpRest.send();xmlHttpRest.onreadystatechange=function(){var responseText=xmlHttpRest.responseText;if(xmlHttpRest.readyState==4){GetLayerMainRestInfo_Complete(restURL,responseText)}}}var extraLayerJsonData;function GetLayerMainRestInfo_Complete(restURL,data){extraLayerJsonData=JSON.parse(data);var layers=extraLayerJsonData.layers;require(["esri/layers/FeatureLayer"],function(FeatureLayer){if(layers.length>0){for(var i=0;i详细信息";fl.popupTemplate={title:"一级医疗机构",content:content};break;case"二级医疗机构":url="";content="机构名称:{COMP_NAME}
卫生许可:{HEALTH_LIC}
地址:{BUS_ADDR}
电话:{TELPHONE}
详细信息";fl.popupTemplate={title:"二级医疗机构",content:content};break;case"三级医疗机构":url="http://10.101.35.25:8080/wjsite/a/tWd3MedicalLicense/medicalDtails?id=cb885991548744a7aa02febd425d977d";content="机构名称:{COMP_NAME}
卫生许可:{HEALTH_LIC}
地址:{BUS_ADDR}
电话:{TELPHONE}
档案信息";fl.popupTemplate={title:"三级医疗机构",content:content};break;case"空调机房":url="";content="描述:{描述}";fl.popupTemplate={title:"空调机房",content:content};break;case"宾馆":url="";content="名称:{COMP_NAME}
地址:{BUS_ADDR}
卫生许可:{HEALTH_LIC}
联系方式:{TELPHONE}
详细信息";fl.popupTemplate={title:"宾馆",content:content};break;case"重大活动保障医疗机构":url="";content="单位名称:{单位名称}
地址:{一户一档地址}
详细信息";fl.popupTemplate={title:"重大活动保障医疗机构",content:content};break;case"监督机构":url="";content="名称:{区县名称}
地址:{地址}
电话:{电话}
详细信息";fl.popupTemplate={title:"监督机构",content:content};break;case"水箱":url="http://10.101.35.25:8088/#/?isMap=true&type=testResultsTable&id={ID}";var url2="http://10.101.35.25:8088/#/?isMap=true&type=gzzxPointInfoTable&id={ID}";content="描述:{描述}
"+"监督员巡查";fl.popupTemplate={title:"水箱",content:content};break;case"饮水机":url="http://10.101.35.25:8088/#/?isMap=true&type=testResultsTable&id={ID}";var url2="http://10.101.35.25:8088/#/?isMap=true&type=gzzxPointInfoTable&id={ID}";content="描述:{描述}
"+"监督员巡查";fl.popupTemplate={title:"饮水机",content:content};break;case"保障活动饮用水":url="";content="单位名称:{单位名称}
地址:{地址}
"+"详细信息";fl.popupTemplate={title:"保障活动饮用水",content:content};break;case"管网水监测点":url="http://10.101.35.25:8088/#/?isMap=true&type=testResultsTable&id=60000000000";var url2="http://10.101.35.25:8088/#/?isMap=true&type=patrolRecordsTable&id=60000000000";content="监测点编号:{JCDCODE}
监测点位置:{JCDADDR}
"+"检验结果  "+"监督员巡查";fl.popupTemplate={title:"管网水监测点",content:content};break;case"水质在线点":url="http://10.101.35.25:8088/#/?isMap=true&type=monitoringDataTable&id=1";content="编号:{LOCATION_ID}
地址:{JCDADDR}
历史监测数据";fl.popupTemplate={title:"水质在线点",content:content};break;case"空气在线监测点":url="http://10.101.35.25:8088/#/?isMap=true&type=testResultsTable&id={ID}";var url2="http://10.101.35.25:8088/#/?isMap=true&type=gzzxPointInfoTable&id={ID}";content="描述 :{描述}
"+"监督员巡查";fl.popupTemplate={title:"空气在线监测点",content:content};break;case"主要接待场所":url="http://10.101.35.25:8080/wjsite/a/document/obj/publicPlaceDtails?id={ID}";var url2="http://10.101.35.25:8088/#/?isMap=true&type=ggcsWaterForm&id={ID}";var url3="http://10.101.35.25:8088/#/?isMap=true&type=ggcsSampingTable&id={ID}";var url4="http://10.101.35.25:8088/#/?isMap=true&type=waterSupplyCheckTable&code=00&id={ID}";content="名称:{COMP_NAME}
地址:{BUS_ADDR}
卫生许可:{HEALTH_LIC}
联系方式:{TELPHONE}
"+"档案信息  "+"饮用水档案";fl.popupTemplate={title:"主要接待场所",content:content};break;case"市级集中式供水":url="http://10.101.35.25:8080/wjsite/a/lic/tWd3CpSupply/supplyDtails?id=7d95c2bca36e43acaffba48bef4a535f";var url2="http://10.101.35.25:8088/#/?isMap=true&type=waterSupplyCheckTable&code=01&id=string";content="水厂名称:{水厂名称}
生产场所地址:{生产场所地址}
"+"档案信息  "+"出厂水抽检";fl.popupTemplate={title:"市级集中式供水",content:content};break;default:fl.popupTemplate={title:"详细信息",content:content};break}m_map.add(fl)}}})}function showDetail(type,url,id){if(!url){return}m_view.popup.close();var title="详细信息";switch(type){case"水箱":title="国家会展中心二次供水设施每日巡查录入表";break;case"空气在线监测点":title="国家会展中心空气在线监测每日巡查录入表";break;default:title="详细信息";break}var infoDiv=$("#infoDialog").dialog({width:620,height:550,modal:true,title:title});if(infoDiv.length>0){infoDiv.attr("style","width:600px;height:500px;");infoDiv.html(GetIFrameInfoWinContent(type,url));$(".ui-dialog-title").text(title)}else{alert("未发现详细信息")}}var isSetMapZoom=false;var m_maxZoom=1;function queryForExtent(Layername,where,precision){var layerId=GetFeatureLayerIdbyName(Layername);if(layerId==-1){alert("没有此图层");return}require(["esri/tasks/FindTask","esri/tasks/support/FindParameters","esri/tasks/IdentifyTask","esri/tasks/support/IdentifyParameters","esri/geometry/Point","esri/tasks/QueryTask","esri/tasks/support/Query","esri/geometry/Extent","esri/Graphic","esri/geometry/geometryEngine","dojo/on"],function(FindTask,FindParameters,IdentifyTask,IdentifyParameters,Point,QueryTask,Query,Extent,Graphic,geometryEngine,on){var queryTask=new QueryTask({url:GetConfigDataByName("QueryLayer")+"/"+layerId});var query=new Query;query.outFields=["*"];query.returnGeometry=true;query.where=where;queryTask.execute(query).then(function(results){if(results.features.length>0){viewxmax=results.features[0].geometry.extent.xmax+0;viewxmin=results.features[0].geometry.extent.xmin-0;viewymax=results.features[0].geometry.extent.ymax+0;viewymin=results.features[0].geometry.extent.ymin-0;var extent=new Extent({xmin:results.features[0].geometry.extent.xmin-0,ymin:results.features[0].geometry.extent.ymin-0,xmax:results.features[0].geometry.extent.xmax-0,ymax:results.features[0].geometry.extent.ymax-0,spatialReference:m_view.spatialReference});var point=new Point({x:results.features[0].geometry.extent.center.x-0,y:results.features[0].geometry.extent.center.y-0,spatialReference:m_view.spatialReference});m_view.goTo({target:point,zoom:8}).then(function(ani){});isSetMapZoom=true}})})}function getBufferByPoint(x,y,radius,layername,m_showGraphic,isGoTo){var buffer;require(["esri/geometry/Point","esri/geometry/geometryEngine","esri/geometry/Circle"],function(Point,geometryEngine,Circle){var point=new Point({x:x-0,y:y-0,spatialReference:m_view.spatialReference});buffer=new Circle({radius:radius,radiusUnit:"meters",center:{x:x-0,y:y-0,spatialReference:m_view.spatialReference}});newQuerybyWhereStr("",layername,GetConfigDataByName("MYQueryLayer"),buffer,m_showGraphic,isGoTo)})}function getGridGeometryByGridID(gridid,Layername){var gridgeo;require(["esri/tasks/FindTask","esri/tasks/support/FindParameters","esri/tasks/IdentifyTask","esri/tasks/support/IdentifyParameters","esri/geometry/Point","esri/tasks/QueryTask","esri/tasks/support/Query","esri/geometry/Extent","esri/Graphic","esri/geometry/geometryEngine","dojo/on"],function(FindTask,FindParameters,IdentifyTask,IdentifyParameters,Point,QueryTask,Query,Extent,Graphic,geometryEngine,on){var queryTask=new QueryTask({url:GetConfigDataByName("QueryLayer")+"/250"});var query=new Query;query.geometry=null;query.outFields=["*"];query.returnGeometry=true;query.spatialRelationship="intersects";query.where=" 网格编码='"+gridid+"'";queryTask.execute(query).then(function(results){if(results.features.length>0){gridgeo=results.features[0].geometry;newQuerybyWhereStr("",Layername,GetConfigDataByName("MYQueryLayer"),gridgeo)}})})}function identifyTask(point,callbackfun){require(["esri/tasks/FindTask","esri/tasks/support/FindParameters","esri/tasks/IdentifyTask","esri/tasks/support/IdentifyParameters","esri/geometry/Point","esri/tasks/QueryTask","esri/tasks/support/Query","esri/geometry/Extent","esri/Graphic","esri/geometry/geometryEngine","dojo/on"],function(FindTask,FindParameters,IdentifyTask,IdentifyParameters,Point,QueryTask,Query,Extent,Graphic,geometryEngine,on){var queryTask=new QueryTask({url:GetConfigDataByName("QueryLayer")+"/250"});var query=new Query;query.geometry=null;query.outFields=["*"];query.returnGeometry=true;query.spatialRelationship="intersects";query.where="1=1";query.geometry=new Point({x:point.split(",")[0]-0,y:point.split(",")[1]-0,spatialReference:m_view.spatialReference});queryTask.execute(query).then(function(results){if(results.features.length>0)callbackfun(results.features[0].attributes["网格编码"]);else{callbackfun("error")}})})}function showQueryResult(idResults){alert(2);if(idResults.length>0){var htmls='';htmls=htmls+'';for(var i=0;i"+""}else{htmls=htmls+""}map.graphics.add(graphic)}htmls=htmls+"
图层 名 称
'+result.layerName+"
"+result.layerName+""+namevalue+"
";document.getElementById("divShowResult").innerHTML=htmls;$("#divShowResult").show()}else{document.getElementById("divShowResult").innerHTML="";$("#divShowResult").show()}}var isNewDragHandle=false;function myNewDragHandle(){var draghandle;require(["esri/core/watchUtils"],function(watchUtils){draghandle=watchUtils.whenTrue(m_view,"drag",function(event){if(event.action=="end"){}else{var xmax=m_view.extent.xmax;var xmin=m_view.extent.xmin;var ymax=m_view.extent.ymax;var ymin=m_view.extent.ymin;var precision=70;var hasChanged=false;if(viewxmin-xmin>precision){hasChanged=true}if(viewymin-ymin>precision){hasChanged=true}if(xmax-viewymax>precision){hasChanged=true}if(ymax-viewymax>precision){hasChanged=true}if(hasChanged){event.stopPropagation();isNewDragHandle=true}}})});return draghandle}