diff --git a/client/eqwc.js b/client/eqwc.js index ae737262..9ba11e73 100644 --- a/client/eqwc.js +++ b/client/eqwc.js @@ -2,14 +2,14 @@ * * eqwc.js -- build of Extended QGIS Web Client * - * version: 1.8.2 - * buildDate: 2019-01-15 + * version: 1.8.3 + * buildDate: 2019-03-15 * * Copyright (2014-2019), Level2, All rights reserved. * More information at https://github.com/uprel/gisapp * */ -Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c,d;if(null==this)throw new TypeError("this is null or not defined");var e=Object(this),f=e.length>>>0;if("[object Function]"!=={}.toString.call(a))throw new TypeError(a+" is not a function");b&&(c=b);for(d=0;d>>0;if("[object Function]"!=={}.toString.call(a))throw new TypeError(a+" is not a function");b&&(c=b);for(d=0;d'+b+""));""'+b+"");return a}; Eqwc.common.manageFile=function(a,b){var c=!1;if(b){var d=a.split(".")[1].toLowerCase();if("jpg"==d||"jpeg"==d||"gif"==d||"png"==d)c=!0}d=window.location.origin;d=1==projectData.uploadDir.split(".").length?d+projectData.uploadDir:d+projectData.uploadDir.split(".")[1];return c?"":Eqwc.common.createHyperlink(d+a,a,null)}; Eqwc.common.getRasterFieldName=function(a,b){return Eqwc.settings.overWriteRasterFieldName&&Eqwc.settings.overWriteRasterFieldName[a]?Eqwc.settings.overWriteRasterFieldName[a][0]==b?Eqwc.settings.overWriteRasterFieldName[a][1]:b:b};Eqwc.common.layerFieldNameExists=function(a,b){for(var c=wmsLoader.layerProperties[a],d=0;dthis.getCount()&&(c=[].concat(this.data.items));this.fireEvent("datachanged",this)}this.fireEvent("load",this,c,b);b.callback&&b.callback.call(b.scope||this,c,b,!0)}else!1!==c&&this.fireEvent("load",this,[],b),b.callback&& b.callback.call(b.scope||this,[],b,!1,a)},loadData:function(a,b){this.isPaging(Ext.apply({},this.lastOptions?this.lastOptions.params:null,this.baseParams));var c=this.reader.readRecords(a);this.loadRecords(c,{add:b},!0)},getTotalCount:function(){return this.allData?this.allData.getCount():this.totalLength||0},sortData:function(){var a=this.hasMultiSort?this.multiSortInfo:this.sortInfo,b=a.direction||"ASC",c=a.sorters,d=[];this.hasMultiSort||(c=[{direction:b,field:a.field}]);for(var a=0,e=c.length;a< -e;a++)d.push(this.createSortFunction(c[a].field,c[a].direction));if(d.length){var f="DESC"==b.toUpperCase()?-1:1,c=function(a,b){var c=d[0].call(this,a,b);if(1');(a=Ext.get("legend_"+c))&&a.setVisibilityMode(Ext.Element.DISPLAY)}});d.send()}; -projectData.getProjectionsList=function(){var a=[];Proj4js.defs[projectData.crs]&&a.push([projectData.crs,projectData.crs_description,geoExtMap.map.getProjectionObject()]);for(var b=0;b');(c=Ext.get("legend_"+d))&&c.setVisibilityMode(Ext.Element.DISPLAY)}else{var f= +new XMLHttpRequest;f.open("GET",c,!0);f.responseType="arraybuffer";f.addEventListener("load",function(){if(200===f.status){var a=new Blob([f.response],{type:"image/png"}),a=window.URL.createObjectURL(a),b=Ext.urlDecode(f.responseURL).NODE,c=Ext.urlDecode(f.responseURL).LAYERS,b=layerTree.getNodeById(b),d=Eqwc.settings.layerLegendMaxHeightPx?Eqwc.settings.layerLegendMaxHeightPx:200;Ext.DomHelper.insertAfter(b.getUI().getAnchor(),"
');(a=Ext.get("legend_"+c))&&a.setVisibilityMode(Ext.Element.DISPLAY)}});f.send()}}; +projectData.getProjectionsList=function(){var a=[];Proj4js.defs[projectData.crs]&&a.push([projectData.crs,projectData.crs_description,new OpenLayers.Projection(projectData.crs)]);for(var b=0;b<%name%>"}}, mapSearchPanelOutputRegion="default",mapThemeSwitcherActive=!1,themeSwitcherTemplate=null,titleBarText=Ext.decode(Eqwc.settings.title),headerLogoImg=projectData.client_logo,headerLogoHeight=24,headerLogoLink=Eqwc.settings.useGisPortal?Eqwc.settings.gisPortalRoot:projectData.client_url,headerTermsOfUseText=TR.logoutLabel,headerTermsOfUseLink="./admin/login.php?action=logout",authid=projectData.crs,qgisLayerTransparency=null==projectData.baseLayers()&&null==projectData.extraLayers()?!1:!0,MapOptions= @@ -54,7 +56,8 @@ value:"15000000"},{name:"1:20'000'000",value:"20000000"},{name:"1:25'000'000",va var sketchSymbolizersMeasureControls={Point:{pointRadius:4,graphicName:"square",fillColor:"#FFFFFF",fillOpacity:1,strokeWidth:1,strokeOpacity:1,strokeColor:"#FF0000"},Line:{strokeWidth:3,strokeOpacity:1,strokeColor:"#FF0000",strokeDashstyle:"dash"},Polygon:{strokeWidth:2,strokeOpacity:1,strokeColor:"#FF0000",fillColor:"#FFFFFF",fillOpacity:0.3}},locationAccuracyStyle={fillColor:"#000",fillOpacity:0.1,strokeWidth:0},locationMarkerStyle={graphicName:"cross",strokeColor:"#f00",strokeWidth:2,fillOpacity:0, pointRadius:10};OpenLayers.Renderer.symbol.arrow=[0,4,2,0,4,4,2,3,0,4];var projDef=CustomProj[authid];void 0!==projDef&&(OpenLayers.Projection.defaults[authid]={maxExtent:projDef.extent,yx:void 0!==projDef.yx?projDef.yx:!1});function customInit(){} function customBeforeMapInit(){for(var a=projectData.tablesOnStart(),b=0;b
',this.indentMarkup,'',e?'':"",'',a.text,'
'].join("");var f;!0!==d&&a.nextSibling&&(f=a.nextSibling.ui.getEl())? this.wrap=Ext.DomHelper.insertHtml("beforeBegin",f,b):this.wrap=Ext.DomHelper.insertHtml("beforeEnd",c,b);this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];a=this.elNode.childNodes;this.indentNode=a[0];this.ecNode=a[1];this.iconNode=a[2];c=3;e&&(this.checkbox=a[3],c++);this.anchor=a[c];this.textNode=a[c].firstChild},isChecked:function(){return this.checkbox?Ext.fly(this.checkbox).hasClass("x-tree-node-checked")?!0:Ext.fly(this.checkbox).hasClass("x-tree-node-grayed")?this.grayedValue: @@ -88,28 +89,28 @@ MyViewportUi=Ext.extend(Ext.Viewport,{layout:"fit",initComponent:function(){this id:"mapThemeButton",tooltip:mapThemeButtonTooltipString[lang],enableToggle:!1,allowDepress:!1,flex:0.1,hidden:!0},{xtype:"panel",layout:"accordion",border:!1,frame:!1,id:"collapsiblePanels",flex:0.9,width:"100%",layoutConfig:{titleCollapse:!0,animate:!0,activeOnTop:!1},activeItem:2,items:[{id:"DescriptionPanel",xtype:"panel",title:TR.description,html:projectData.description,hidden:!0,padding:5,autoScroll:!0},{xtype:"panel",title:searchPanelTitleString[lang],id:"SearchPanel",border:!1,frame:!1,items:[{xtype:"tabpanel", enableTabScroll:!0,activeTab:0,id:"SearchTabPanel",items:[]}]},{xtype:"panel",title:layerTreeTitleString[lang],layout:"border",id:"leftPanelMap",border:!1,frame:!1,items:[{xtype:"treepanel",lines:!1,border:!1,frame:!1,title:"",height:159,split:!0,region:"center",collapsible:!1,rootVisible:!1,autoScroll:!0,cls:"x-tree-noicon",id:"LayerTree",root:{text:"Root",expanded:!0,singleClickExpand:!0},loader:{}}]}]}]},{xtype:"panel",border:!1,frame:!1,margins:"3 3 3 0",flex:1,region:"center",width:100,layout:"border", id:"CenterPanel",items:[{xtype:"panel",region:"center",tpl:"",layout:"fit",id:"MapPanel",tbar:{xtype:"toolbar",autoHeight:!0,id:"myTopToolbar",items:[{xtype:"tbseparator",id:"separator1"},{xtype:"button",tooltip:objIdentificationTooltipString[lang],toggleGroup:"mapTools",enableToggle:!0,icon:iconDirectory+"mActionIdentify.png",allowDepress:!0,tooltipType:"qtip",iconCls:"",scale:"medium",id:"IdentifyTool",hidden:!1},{xtype:"tbtext",text:objectIdentificationTextLabel[lang],id:"ObjectIdentificationText", -hidden:!projectData.identify_mode},{xtype:"combo",width:120,store:"objIdentificationModes",valueField:"value",mode:"local",displayField:"name",triggerAction:"all",id:"ObjectIdentificationModeCombo",hidden:!projectData.identify_mode},{xtype:"button",enableToggle:!0,allowDepress:!0,toggleGroup:"mapTools",icon:iconDirectory+"mActionMeasure.png",tooltip:measureDistanceTooltipString[lang],tooltipType:"qtip",scale:"medium",id:"measureDistance",hidden:!projectData.measurements},{xtype:"button",enableToggle:!0, -allowDepress:!0,toggleGroup:"mapTools",scale:"medium",icon:iconDirectory+"mActionMeasureArea.png",tooltipType:"qtip",tooltip:measureAreaTooltipString[lang],id:"measureArea",hidden:!projectData.measurements},{xtype:"tbseparator",id:"separator3"},{xtype:"button",enableToggle:!0,allowDepress:!0,toggleGroup:"mapTools",scale:"medium",icon:iconDirectory+"mActionFilePrint.png",tooltipType:"qtip",tooltip:printMapTooltipString[lang],id:"PrintMap",hidden:!projectData.print},{xtype:"button",enableToggle:!1, -allowDepress:!1,scale:"medium",icon:iconDirectory+"mActionPermalink.png",tooltipType:"qtip",tooltip:sendPermalinkTooltipString[lang],id:"SendPermalink",hidden:!projectData.permalink},{xtype:"tbseparator",id:"separator4"},{xtype:"button",enableToggle:!1,allowDepress:!1,scale:"medium",icon:iconDirectory+"mActionMailSend.png",tooltipType:"qtip",tooltip:TR.feedback,id:"ShowFeedback",handler:mapToolbarHandler,hidden:!projectData.userFeedback}]},bbar:{xtype:"toolbar",id:"myBottomToolbar",items:[{xtype:"tbtext", -text:mapAppLoadingString[lang],id:"mainStatusText"},{xtype:"tbfill"},{xtype:"tbtext",text:"",id:"rightStatusText"},{xtype:"tbtext",text:coordinateTextLabel[lang]},{xtype:"tbspacer"},{xtype:"textfield",width:120,regex:/^\d{6}\.?\d{0,2},\d{6}\.?\d{0,2}$/,enableKeyEvents:!0,id:"CoordinateTextField"},{xtype:"tbtext",text:"1:"},{xtype:"numberfield",minValue:1,allowNegative:!1,allowDecimals:!1,width:65,enableKeyEvents:!0,id:"ScaleNumberField"}]}}]},{xtype:"panel",id:"RightPanel",title:"",region:"east", -split:!0,collapsible:!0,collapsed:!0,hidden:!0,width:300},{xtype:"tabpanel",id:"BottomPanel",title:"",region:"south",split:!0,collapsible:!0,collapsed:!0,hidden:!1,height:300,listeners:{tabchange:function(){0==this.items.getCount()&&this.collapse()}}}]}];this.items[0].items[1].items[0].tbar.items=this.items[0].items[1].items[0].tbar.items.concat(customButtons);MyViewportUi.superclass.initComponent.call(this)}});MyViewport=Ext.extend(MyViewportUi,{initComponent:function(){MyViewport.superclass.initComponent.call(this)}}); -Ext.onReady(function(){Ext.QuickTips.init();(new MyViewport({renderTo:Ext.getBody()})).show()});window.QGIS||(window.QGIS={});QGIS.WMSCapabilitiesLoader=function(a){Ext.apply(this,a);QGIS.WMSCapabilitiesLoader.superclass.constructor.call(this,a)}; +hidden:!projectData.identify_mode},{xtype:"combo",width:120,store:"objIdentificationModes",valueField:"value",editable:!1,mode:"local",displayField:"name",triggerAction:"all",id:"ObjectIdentificationModeCombo",hidden:!projectData.identify_mode},{xtype:"button",enableToggle:!0,allowDepress:!0,toggleGroup:"mapTools",icon:iconDirectory+"mActionMeasure.png",tooltip:measureDistanceTooltipString[lang],tooltipType:"qtip",scale:"medium",id:"measureDistance",hidden:!projectData.measurements},{xtype:"button", +enableToggle:!0,allowDepress:!0,toggleGroup:"mapTools",scale:"medium",icon:iconDirectory+"mActionMeasureArea.png",tooltipType:"qtip",tooltip:measureAreaTooltipString[lang],id:"measureArea",hidden:!projectData.measurements},{xtype:"tbseparator",id:"separator3"},{xtype:"button",enableToggle:!0,allowDepress:!0,toggleGroup:"mapTools",scale:"medium",icon:iconDirectory+"mActionFilePrint.png",tooltipType:"qtip",tooltip:printMapTooltipString[lang],id:"PrintMap",hidden:!projectData.print},{xtype:"button", +enableToggle:!1,allowDepress:!1,scale:"medium",icon:iconDirectory+"mActionPermalink.png",tooltipType:"qtip",tooltip:sendPermalinkTooltipString[lang],id:"SendPermalink",hidden:!projectData.permalink},{xtype:"tbseparator",id:"separator4"},{xtype:"button",enableToggle:!1,allowDepress:!1,scale:"medium",icon:iconDirectory+"mActionMailSend.png",tooltipType:"qtip",tooltip:TR.feedback,id:"ShowFeedback",handler:mapToolbarHandler,hidden:!projectData.userFeedback}]},bbar:{xtype:"toolbar",id:"myBottomToolbar", +items:[{xtype:"tbtext",text:mapAppLoadingString[lang],id:"mainStatusText"},{xtype:"tbfill"},{xtype:"combo",id:"rightStatusText",valueField:"code",displayField:"description",hideLabel:!0,editable:!1,mode:"local",triggerAction:"all",width:160,valueField:"code",displayField:"description",store:{xtype:"arraystore",autoDestroy:!0,storeId:"crsStore",idIndex:0,fields:[{name:"code",mapping:0},{name:"description",mapping:1}]},listeners:{select:function(a,b,c){Eqwc.currentMapProjection=projectData.getProjectionsList().filter(function(a){return a[0]=== +b.data.code})[0]}}},{xtype:"tbtext",text:coordinateTextLabel[lang]},{xtype:"tbspacer"},{xtype:"textfield",width:120,maskRe:/[0-9]/,enableKeyEvents:!0,id:"CoordinateTextField"},{xtype:"tbtext",text:"1:"},{xtype:"numberfield",minValue:1,allowNegative:!1,allowDecimals:!1,width:65,enableKeyEvents:!0,id:"ScaleNumberField"}]}}]},{xtype:"panel",id:"RightPanel",title:"",region:"east",split:!0,collapsible:!0,collapsed:!0,hidden:!0,width:300},{xtype:"tabpanel",id:"BottomPanel",title:"",region:"south",split:!0, +collapsible:!0,collapsed:!0,hidden:!1,height:300,listeners:{tabchange:function(){0==this.items.getCount()&&this.collapse()}}}]}];this.items[0].items[1].items[0].tbar.items=this.items[0].items[1].items[0].tbar.items.concat(customButtons);MyViewportUi.superclass.initComponent.call(this)}});MyViewport=Ext.extend(MyViewportUi,{initComponent:function(){MyViewport.superclass.initComponent.call(this)}});Ext.onReady(function(){Ext.QuickTips.init();(new MyViewport({renderTo:Ext.getBody()})).show()});window.QGIS||(window.QGIS={});QGIS.WMSCapabilitiesLoader=function(a){Ext.apply(this,a);QGIS.WMSCapabilitiesLoader.superclass.constructor.call(this,a)}; Ext.extend(QGIS.WMSCapabilitiesLoader,GeoExt.tree.WMSCapabilitiesLoader,{useGetProjectSettings:!0,WMSCapabilities:null,projectSettings:null,layerProperties:[],layerTitleNameMapping:[],initialVisibleLayers:[],getParams:function(a){return{SERVICE:"WMS",VERSION:"1.3.0",REQUEST:this.useGetProjectSettings?"GetProjectSettings":"GetCapabilities"}},processResponse:function(a,b,c,d){a.responseXML?this.WMSCapabilities=a.responseXML:window.DOMParser?this.WMSCapabilities=(new DOMParser).parseFromString(a.responseText, "text/xml"):(this.WMSCapabilities=new ActiveXObject("Microsoft.XMLDOM"),this.WMSCapabilities.async="false",this.WMSCapabilities.loadXML(a.responseText));this.projectSettings=(new OpenLayers.Format.WMSCapabilities({readers:{wms:OpenLayers.Util.applyDefaults({ComposerTemplates:function(a,b){b.composerTemplates=[];this.readChildNodes(a,b.composerTemplates)},ComposerTemplate:function(a,b){var c={name:a.getAttribute("name"),width:parseInt(a.getAttribute("width")),height:parseInt(a.getAttribute("height"))}; this.readChildNodes(a,c);b.push(c)},ComposerMap:function(a,b){b.map={name:a.getAttribute("name"),width:parseInt(a.getAttribute("width")),height:parseInt(a.getAttribute("height"))}},ExclusiveLayerGroups:function(a,b){b.exclusiveLayerGroups=[];this.readChildNodes(a,b.exclusiveLayerGroups)},group:function(a,b){b.push(this.getChildValue(a).split(","))},LayerDrawingOrder:function(a,b){b.layerDrawingOrder=this.getChildValue(a).split(",")},Layer:function(a,b){var c,d;b.capability?(void 0==b.title&&(b.title= -projectData.project),void 0==b.name&&(b.name=projectData.project),d=b.capability,c=b):d=b;var e=a.getAttributeNode("queryable"),m=e&&e.specified?a.getAttribute("queryable"):null,q=(e=a.getAttributeNode("cascaded"))&&e.specified?a.getAttribute("cascaded"):null,p=(e=a.getAttributeNode("opaque"))&&e.specified?a.getAttribute("opaque"):null,l=(e=a.getAttributeNode("visible"))&&e.specified?a.getAttribute("visible"):null,t=a.getAttribute("displayField"),u=(e=a.getAttributeNode("checkbox"))&&e.specified? +projectData.project),void 0==b.name&&(b.name=projectData.project),d=b.capability,c=b):d=b;var e=a.getAttributeNode("queryable"),k=e&&e.specified?a.getAttribute("queryable"):null,q=(e=a.getAttributeNode("cascaded"))&&e.specified?a.getAttribute("cascaded"):null,p=(e=a.getAttributeNode("opaque"))&&e.specified?a.getAttribute("opaque"):null,l=(e=a.getAttributeNode("visible"))&&e.specified?a.getAttribute("visible"):null,t=a.getAttribute("displayField"),u=(e=a.getAttributeNode("checkbox"))&&e.specified? a.getAttribute("checkbox"):null,r=(e=a.getAttributeNode("legend"))&&e.specified?a.getAttribute("legend"):null,e=(e=a.getAttributeNode("metadata"))&&e.specified?a.getAttribute("metadata"):null,w=a.getAttribute("noSubsets"),x=a.getAttribute("fixedWidth"),y=a.getAttribute("fixedHeight"),s=c||{},v=OpenLayers.Util.extend;c={nestedLayers:[],styles:c?[].concat(c.styles):[],srs:c?v({},s.srs):{},metadataURLs:[],bbox:c?v({},s.bbox):{},llbbox:s.llbbox,dimensions:c?v({},s.dimensions):{},authorityURLs:c?v({}, -s.authorityURLs):{},identifiers:{},keywords:[],queryable:m&&""!==m?"1"===m||"true"===m:s.queryable||!1,cascaded:null!==q?parseInt(q):s.cascaded||0,opaque:p?"1"===p||"true"===p:s.opaque||!1,visible:l&&""!==l?"1"===l||"true"===l:!0,displayField:t,showCheckbox:u&&""!==u?"1"===u||"true"===u:!0,showLegend:r&&""!==r?"1"===r||"true"===r:!0,showMetadata:e&&""!==e?"1"===e||"true"===e:!0,noSubsets:null!==w?"1"===w||"true"===w:s.noSubsets||!1,fixedWidth:null!=x?parseInt(x):s.fixedWidth||0,fixedHeight:null!= -y?parseInt(y):s.fixedHeight||0,minScale:s.minScale,maxScale:s.maxScale,attribution:s.attribution};c.capability=d;this.readChildNodes(a,c);delete c.capability;b.nestedLayers.push(c);c.name&&(m=c.name.split(":"),q=d.request,p=q.getfeatureinfo,0=d?e=25:250=d?e=50:1E3=d?e=100:2500=d?e=250:5E3=d?e=500:12E3=d?e=1E3:25E3=d?e=2E3:5E4=d?e=5E3:1E5=d?e=1E4:5E5=d?e=5E4:1E6=d?e=1E5:5E6=d?e=25E4:1E7=d?e=25E5:5E7=d?e=5E6:1E8

'+printingObjectDataAlternativeString1[lang]+a+printingObjectDataAlternativeString2[lang]})).show(),Ext.getBody().unmask());this.fireEvent("print",this,a)}}); +5E7>=d?e=25E5:5E7=d?e=5E6:1E8

'+printingObjectDataAlternativeString1[lang]+a+printingObjectDataAlternativeString2[lang]})).show(),Ext.getBody().unmask());this.fireEvent("print",this,a)}}); QGIS.SearchComboBox=Ext.extend(Ext.form.ComboBox,{map:null,highlightLayerName:null,highlightLayer:null,hasReverseAxisOrder:!1,url:null,geomUrl:null,hideTrigger:!1,minChars:2,queryDelay:50,displayField:"label",forceSelection:!0,searchtables:null,srs:null,initComponent:function(){this.emptyText=searchFieldDefaultTextString[lang];this.triggerConfig={tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger x-form-clear-trigger"};this.on("keyUp",this.keyUpHandler);this.on("afterrender",this.afterrenderHandler); this.on("beforeselect",this.beforeselectHandler);this.store=new Ext.data.JsonStore({proxy:new Ext.data.ScriptTagProxy({url:this.url,method:"GET",callbackParam:"cb",nocache:!1,autoAbort:!0}),baseParams:{searchtables:this.getSearchTables(),srs:this.srs},root:"results",fields:"searchtable searchtext displaytext bbox showlayer selectable".split(" ")});this.tpl=(new Ext.XTemplate('

','',"","","{displaytext}",'', "","","
")).compile();QGIS.SearchComboBox.superclass.initComponent.call(this);this.highlightLayerName&&(this.highlightLayer=this.map.getLayersByName(this.highlightLayerName)[0]);this.on("select",this.recordSelected,this)},afterrenderHandler:function(){this.trigger.hide()},beforeselectHandler:function(a,b,c){"1"==b.get("selectable")&&this.collapse()},keyUpHandler:function(a,b){this.checkTrigger();Ext.isEmpty(this.getValue())&&this.resetSearch();this.getValue().length";f={layer:"contour",fields:"ele",points:this.locationToWgs().toShortString(),access_token:a.key};break;case "mapzen":b="https://elevation.mapzen.com/height",c="",d="height",e="{height}m "+TR.fiElevation+"",f={json:Ext.util.JSON.encode({range:!1,shape:[{lat:this.locationToWgs().lat, -lon:this.locationToWgs().lon}]}),api_key:a.key}}break;case "address":switch(a.provider.toLowerCase()){case "mapzen":b="https://search.mapzen.com/v1/reverse";c="features";d="properties";e="{label} ("+measureDistanceResultPrefixString[lang].toLowerCase()+" {distance}m)";g="{region}, {country}";h=1E3;f={layers:"address","point.lat":this.locationToWgs().lat,"point.lon":this.locationToWgs().lon,api_key:a.key,size:1};break;case "mapbox":b="https://api.mapbox.com/geocoding/v5/mapbox.places/"+ -this.locationToWgs().lon+","+this.locationToWgs().lat+".json",c="features",d="",e="{place_name}",g="",h=1,f={access_token:a.key,types:"address,neighborhood,place",language:this.language}}}Ext.Ajax.request({url:b,params:f,method:"GET",scope:this,success:function(b){b=Ext.util.JSON.decode(b.responseText);0this.tolerance||Math.abs(d[1]-c[1])>this.tolerance)this.triggerStart(a);else return;this.fireEvent("mousemove",this,a);this.onDrag(a);this.fireEvent("drag",this,a)}}});Ext.namespace("GeoExt.ux"); +QGIS.LocationService=Ext.extend(Ext.util.Observable,{constructor:function(a){this.location=a.location;this.language=a.language;this.projection=a.projection;this.addEvents(["elevation","address"]);this.listeners=a.listeners;QGIS.LocationService.superclass.constructor.call(this,a)},locationToString:function(){var a=this.location;this.projection&&(a=a.clone().transform(authid,this.projection));return a.lon.toFixed(coordinatePrecision)+", "+a.lat.toFixed(coordinatePrecision)},locationToWgs:function(){return this.location.clone().transform(authid, +new OpenLayers.Projection("EPSG:4326"))},getService:function(a){var b,c,d,e,f,g,h;switch(a.name){case "elevation":switch(a.provider.toLowerCase()){case "mapbox":b="https://api.mapbox.com/v4/surface/mapbox.mapbox-terrain-v1.json";c="results";d="ele";e="{ele}m "+TR.fiElevation+"";f={layer:"contour",fields:"ele",points:this.locationToWgs().toShortString(),access_token:a.key};break;case "mapzen":b="https://elevation.mapzen.com/height",c="",d="height",e="{height}m "+TR.fiElevation+ +"",f={json:Ext.util.JSON.encode({range:!1,shape:[{lat:this.locationToWgs().lat,lon:this.locationToWgs().lon}]}),api_key:a.key}}break;case "address":switch(a.provider.toLowerCase()){case "mapzen":b="https://search.mapzen.com/v1/reverse";c="features";d="properties";e="{label} ("+measureDistanceResultPrefixString[lang].toLowerCase()+" {distance}m)";g="{region}, {country}";h=1E3;f={layers:"address","point.lat":this.locationToWgs().lat,"point.lon":this.locationToWgs().lon, +api_key:a.key,size:1};break;case "mapbox":b="https://api.mapbox.com/geocoding/v5/mapbox.places/"+this.locationToWgs().lon+","+this.locationToWgs().lat+".json",c="features",d="",e="{place_name}",g="",h=1,f={access_token:a.key,types:"address,neighborhood,place",language:this.language}}}Ext.Ajax.request({url:b,params:f,method:"GET",scope:this,success:function(b){b=Ext.util.JSON.decode(b.responseText);0this.tolerance||Math.abs(d[1]-c[1])>this.tolerance)this.triggerStart(a);else return;this.fireEvent("mousemove",this,a);this.onDrag(a);this.fireEvent("drag",this,a)}}});Ext.namespace("GeoExt.ux"); GeoExt.ux.GeocodingSearchCombo=Ext.extend(Ext.form.ComboBox,{map:null,highlightLayerName:null,highlightLayer:null,width:350,listWidth:350,zoom:8,minChars:1,queryDelay:50,maxRows:"20",tpl:'
{'+this.displayField+"}
",country:"",layers:"",hideTrigger:!1,displayField:"name",forceSelection:!0,queryParam:"query",url:"admin/proxy.php",provider:"",initComponent:function(){this.triggerConfig={tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger x-form-clear-trigger"}; this.on("keyUp",this.keyUpHandler);this.on("afterrender",this.afterrenderHandler);this.on("beforeselect",this.beforeselectHandler);GeoExt.ux.GeocodingSearchCombo.superclass.initComponent.apply(this,arguments);this.highlightLayerName&&(this.highlightLayer=this.map.getLayersByName(this.highlightLayerName)[0]);var a={country:this.country,limit:this.maxRows,types:this.layers,language:this.lang,provider:this.provider};"undefined"!==typeof this.countryString&&(a.country=this.countryString);this.store=new Ext.data.JsonStore({nocache:!1, autoAbort:!0,proxy:new Ext.data.HttpProxy({url:this.url,method:"GET",scope:this,listeners:{beforeload:function(a,c){var d=geoExtMap.map.getCenter().transform(authid,new OpenLayers.Projection("EPSG:4326"));c.proximity=d.lon+","+d.lat}}}),baseParams:a,root:"features",fields:[{name:"id",mapping:"id"},{name:"relevance",mapping:"relevance"},{name:"lng",mapping:"geometry.coordinates[0]"},{name:"lat",mapping:"geometry.coordinates[1]"},{name:"place_name",mapping:"place_name"},{name:"text",mapping:"text"}]}); if(0";a=b.getLonLatFromPixel(a.xy);var e=new QGIS.LocationService({location:a,language:projectData.lang}),f=[];Eqwc.settings.showCoordinatesIdentify&&(c="
",f.push({xtype:"box", -html:d},{id:"fi_location",xtype:"box",html:""+e.locationToString()+""}));if(null!=projectData.locationServices)for(c="
",d=0;d"});e.on("elevation",updateElevation);e.on("address",updateAddress);featureInfoResultLayers= -[];highLightGeometry=[];parseFIResult(xmlDoc);featureInfoResultLayers.reverse();if(0a&&this.setHeight(a)}}});0";a=b.getLonLatFromPixel(a.xy);var e=new QGIS.LocationService({location:a,language:projectData.lang,projection:projectData.crs==Eqwc.currentMapProjection[0]?null:Eqwc.currentMapProjection[2]}), +f=[];Eqwc.settings.showCoordinatesIdentify&&(c="
",f.push({xtype:"box",html:d},{id:"fi_location",xtype:"box",html:""+e.locationToString()+""}));if(null!=projectData.locationServices)for(c="
",d=0;d"});e.on("elevation", +updateElevation);e.on("address",updateAddress);featureInfoResultLayers=[];highLightGeometry=[];parseFIResult(xmlDoc);featureInfoResultLayers.reverse();if(0a&&this.setHeight(a)}}});0'+wmsLoader.layerProperties[c[g].getAttribute("name")].title+""),e=!0);for(var m=h[k].getElementsByTagName("Attribute"),q={},p=0;p"+ +g;--g){for(var h=c[g].getElementsByTagName("Feature"),n=wmsLoader.layerProperties[c[g].getAttribute("name")].displayField||"tooltip",m=0;m'+wmsLoader.layerProperties[c[g].getAttribute("name")].title+""),e=!0);for(var k=h[m].getElementsByTagName("Attribute"),q={},p=0;p"+ p.replace(/\n/,"
"),attribText=attribText.replace("\n","
"),d+=attribText+"

"),d+='
';else if(tooltipTemplates&&tooltipTemplates.hasOwnProperty(c[g].getAttribute("name")))templateText=tooltipTemplates[c[g].getAttribute("name")].template,p=templateText.replace(/<%(\w*)%>/g,function(a,b){return(q.hasOwnProperty(b)?q[b]:"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}),d+=p+"
";else if(-1!==n.indexOf("[%")){for(var p= -n,l=RegExp(/\[%[^"]*"(.*?)"[^"]*%\]/g),t;t=l.exec(n);)var u=t[1],u=q.hasOwnProperty(u)?q[u]:"",p=p.replace(t[0],u);d+=p+"
"}m&&(m=new OpenLayers.Feature.Vector(OpenLayers.Geometry.fromWKT(q.geometry)),featureInfoHighlightLayer.addFeatures([m]))}h=[];for(k=c[g].firstChild;k;)"Attribute"==k.nodeName&&h.push(k),k=k.nextSibling;for(k=0;k'+wmsLoader.layerProperties[c[g].getAttribute("name")].title+""),e=!0),d+="

"+h[k].getAttribute("name")+ -": "+h[k].getAttribute("value")+"

",d+='
';if("topMostHit"==identificationMode&&e)break}e?(changeCursorInMap("pointer"),clickPopup||(d=d.replace(/
$/,""),hoverPopup=new OpenLayers.Popup.FramedCloud(null,b.getLonLatFromPixel(a.xy),null,d,null,!1,null),hoverPopup.autoSize=!0,hoverPopup.keepInMap=!0,hoverPopup.panMapIfOutOfView=!1,hoverPopup.events.on({click:onHoverPopupClick}),b.addPopup(hoverPopup))):changeCursorInMap("default")}} +n,l=RegExp(/\[%[^"]*"(.*?)"[^"]*%\]/g),t;t=l.exec(n);)var u=t[1],u=q.hasOwnProperty(u)?q[u]:"",p=p.replace(t[0],u);d+=p+"
"}k&&(k=new OpenLayers.Feature.Vector(OpenLayers.Geometry.fromWKT(q.geometry)),featureInfoHighlightLayer.addFeatures([k]))}h=[];for(m=c[g].firstChild;m;)"Attribute"==m.nodeName&&h.push(m),m=m.nextSibling;for(m=0;m'+wmsLoader.layerProperties[c[g].getAttribute("name")].title+""),e=!0),d+="

"+h[m].getAttribute("name")+ +": "+h[m].getAttribute("value")+"

",d+='
';if("topMostHit"==identificationMode&&e)break}e?(changeCursorInMap("pointer"),clickPopup||(d=d.replace(/
$/,""),hoverPopup=new OpenLayers.Popup.FramedCloud(null,b.getLonLatFromPixel(a.xy),null,d,null,!1,null),hoverPopup.autoSize=!0,hoverPopup.keepInMap=!0,hoverPopup.panMapIfOutOfView=!1,hoverPopup.events.on({click:onHoverPopupClick}),b.addPopup(hoverPopup))):changeCursorInMap("default")}} function onBeforeGetFeatureInfoClick(a){a.object.layers[0].setVisibility(thematicLayer.getVisibility());activateGetFeatureInfo(!1)}function noFeatureInfoClick(a){activateGetFeatureInfo(!0)}function onHoverPopupClick(a){hoverPopup&&removeHoverPopup();var b=geoExtMap.map;a.xy=b.events.getMousePosition(a);b.events.triggerEvent("click",a)} function onClickPopupClosed(a){removeClickPopup();Eqwc.settings.enableHoverPopup&&WMSGetFInfoHover.activate();var b=geoExtMap.map;a.xy=b.events.getMousePosition(a);b.events.triggerEvent("mousemove",a)}function removeClickPopup(){clickPopup&&clickPopup.destroy();clickPopup=null}function removeHoverPopup(){geoExtMap.map.removePopup(hoverPopup);hoverPopup.destroy();hoverPopup=null;featureInfoHighlightLayer.removeAllFeatures()} function showFeatureSelected(a){null==a.layer&&a.fid.split(".");featureInfoHighlightLayer.removeAllFeatures();featureInfoHighlightLayer.addFeatures([a]);geoExtMap.map.zoomToExtent(a.geometry.bounds)}function clearFeatureSelected(){void 0!=thematicLayer.params.SELECTION&&thematicLayer.mergeNewParams({SELECTION:null});featureInfoHighlightLayer.removeAllFeatures()} -function parseFIResult(a){if(a.hasChildNodes()){var b=showFeatureInfoLayerTitle;mapThemeSwitcher&&void 0!=mapThemeSwitcher.activeProjectData&&(b=mapThemeSwitcher.activeProjectData.showFeatureInfoLayerTitle);if(a.hasChildNodes()&&"Layer"==a.nodeName){var c=!1,d=!1,e="",f=a.firstChild,g=a.getAttribute("name"),g=Eqwc.common.getIdentifyLayerNameRevert(wmsLoader.layerProperties[g].title),g=wmsLoader.layerTitleNameMapping[g],h=wmsLoader.layerProperties[g].title;b&&(e+="

"+h+"

");for(a=h+"."+a.firstElementChild.getAttribute("id");f;){if(f.hasChildNodes()&& -"Feature"===f.nodeName){var b=f.firstChild,e=e+"",n=projectData.use_ids?projectData.layers[g].wfs||projectData.add_geom:!1;"guest"==projectData.user&&(n=!1);if(n){var n='",k="";void 0!==Eqwc.plugins.editing&&(k='");e+="'}for(;b;){if("Attribute"== -b.nodeName&&(n=b.getAttribute("name"),k=b.getAttribute("value").replace(/null/ig,Eqwc.settings.noDataValue),n!==mapInfoFieldName&&(!0==suppressEmptyValues&&""!==k.replace(/^\s\s*/,"").replace(/\s\s*$/,"")||!1==suppressEmptyValues)))if("geometry"===n){var m=new OpenLayers.Feature.Vector(OpenLayers.Geometry.fromWKT(k));m.fid=a;highLightGeometry.push(m);suppressInfoGeometry||(e+="\n ",showFieldNamesInClickPopup&&(e+=""),e+="",c=!0)}else c=Eqwc.settings.qgisFilesFieldAlias? -Eqwc.settings.qgisFilesFieldAlias:"files",e+="\n ",showFieldNamesInClickPopup&&"maptip"!==n&&n!==c&&(e+=""),n==c?""")):k=Eqwc.common.createHyperlink(k,null,mediaurl),e="maptip"==n||n==c?e+(""):e+(""),c=!0;b=b.nextSibling}e+="\n \n
"+n+k+'
"+n+":"+k+"
"+n+":"+k+"
"+k+"

"}else"Attribute"===f.nodeName&&(!1==d&&(e+="\n

\n \n "), -e+="\n",d=c=!0);f=f.nextSibling}c&&(d&&(e+="\n \n
"+Eqwc.common.getRasterFieldName(h,f.getAttribute("name"))+""+f.getAttribute("value")+"

"),featureInfoResultLayers.push(e))}else for(d=a.firstChild;d;)parseFIResult(d),d=d.nextSibling}}function listLayersWithFeatures(a){if(a.hasChildNodes())if("Layer"==a.nodeName)featureInfoResultLayers.push(a.getAttribute("name"));else for(a=a.firstChild;a;)listLayersWithFeatures(a),a=a.nextSibling} -function getFeatures(a,b){if(b.hasChildNodes()){if("Layer"==b.nodeName&&b.getAttribute("name")==a)return b.firstChild;for(var c=b.firstChild;c;)getFeatures(a,c),c=c.nextSibling}}function updateElevation(a,b,c,d){b=Ext.getCmp("fi_elevation");void 0!=b&&(d=new Ext.Template(d),void 0===a||isNaN(a[c])||null===a[c]||(a[c]!==parseInt(a[c])&&(a[c]=a[c].toFixed(elevationPrecision)),a=d.apply(a),b.update(a)))} -function updateAddress(a,b,c,d,e,f){b=Ext.getCmp("fi_address");if(void 0!=b){var g=0;a=""==c||null==c?a:a[c];null!=a.distance&&(g=a.distance,a.distance=g*f);tem=g*f>minimumAddressRange?new Ext.Template(e):new Ext.Template(d);d=tem.apply(a);b.update(d)}} +function parseFIResult(a){if(a.hasChildNodes()){var b=showFeatureInfoLayerTitle;mapThemeSwitcher&&void 0!=mapThemeSwitcher.activeProjectData&&(b=mapThemeSwitcher.activeProjectData.showFeatureInfoLayerTitle);if(a.hasChildNodes()&&"Layer"==a.nodeName){var c=!1,d=!1,e="",f=a.firstChild;a=a.getAttribute("name");a=Eqwc.common.getIdentifyLayerNameRevert(wmsLoader.layerProperties[a].title);a=wmsLoader.layerTitleNameMapping[a];var g=wmsLoader.layerProperties[a].title;for(b&&(e+="

"+g+"

");f;){b=g+ +"."+f.id;if(f.hasChildNodes()&&"Feature"===f.nodeName){var h=f.firstChild,e=e+"",n=projectData.use_ids?projectData.layers[a].wfs||projectData.add_geom:!1;"guest"==projectData.user&&(n=!1);if(n){var n='",m="";void 0!==Eqwc.plugins.editing&&(m='");e+="'}for(;h;){if("Attribute"== +h.nodeName){var m=h.getAttribute("name"),n=m.toUpperCase(),k=h.getAttribute("value").replace(/null/ig,Eqwc.settings.noDataValue);m!==mapInfoFieldName&&(!0==suppressEmptyValues&&""!==k.replace(/^\s\s*/,"").replace(/\s\s*$/,"")||!1==suppressEmptyValues)&&("GEOMETRY"===n?(n=new OpenLayers.Feature.Vector(OpenLayers.Geometry.fromWKT(k)),n.fid=b,highLightGeometry.push(n),suppressInfoGeometry||(e+="\n ",showFieldNamesInClickPopup&&(e+=""),e+="",c=!0)):(c=Eqwc.settings.qgisFilesFieldAlias? +Eqwc.settings.qgisFilesFieldAlias:"files",c=c.toUpperCase(),e+="\n ",showFieldNamesInClickPopup&&"MAPTIP"!==n&&n!==c&&(e+=""),n==c?""")):k=Eqwc.common.createHyperlink(k,null,mediaurl),e="MAPTIP"==n||n==c?e+(""):e+(""),c=!0))}h=h.nextSibling}e+="\n \n
"+n+m+'
"+m+":"+k+"
"+m+":"+k+"
"+k+"

"}else"Attribute"===f.nodeName&&(!1== +d&&(e+="\n

\n \n "),e+="\n",d=c=!0);f=f.nextSibling}c&&(d&&(e+="\n \n
"+Eqwc.common.getRasterFieldName(g,f.getAttribute("name"))+""+f.getAttribute("value")+"

"),featureInfoResultLayers.push(e))}else for(d=a.firstChild;d;)parseFIResult(d),d=d.nextSibling}} +function listLayersWithFeatures(a){if(a.hasChildNodes())if("Layer"==a.nodeName)featureInfoResultLayers.push(a.getAttribute("name"));else for(a=a.firstChild;a;)listLayersWithFeatures(a),a=a.nextSibling}function getFeatures(a,b){if(b.hasChildNodes()){if("Layer"==b.nodeName&&b.getAttribute("name")==a)return b.firstChild;for(var c=b.firstChild;c;)getFeatures(a,c),c=c.nextSibling}} +function updateElevation(a,b,c,d){b=Ext.getCmp("fi_elevation");void 0!=b&&(d=new Ext.Template(d),void 0===a||isNaN(a[c])||null===a[c]||(a[c]!==parseInt(a[c])&&(a[c]=a[c].toFixed(elevationPrecision)),a=d.apply(a),b.update(a)))}function updateAddress(a,b,c,d,e,f){b=Ext.getCmp("fi_address");if(void 0!=b){var g=0;a=""==c||null==c?a:a[c];null!=a.distance&&(g=a.distance,a.distance=g*f);tem=g*f>minimumAddressRange?new Ext.Template(e):new Ext.Template(d);d=tem.apply(a);b.update(d)}} function identifyAction(a,b){var c=b.split(".")[0];if("undefined"!=b.split(".")[1]){var d=wmsLoader.layerTitleNameMapping[c];switch(a){case "clear":clearFeatureSelected();break;case "edit":checkEditorState(d)&&prepareEdit(projectData.layers[d])&&editor.attributesForm.requestAndLoadFeature(b);break;case "select":var e=!1;Ext.each(highLightGeometry,function(a,b,c){a.fid===this[1]&&(showFeatureSelected(a),e=!0)},arguments);e||(d=new OpenLayers.Filter.FeatureId({fids:[b]}),(new OpenLayers.Protocol.WFS({version:"1.0.0", url:wmsURI,headers:{"Content-Type":"text/xml; charset=utf-8"},featureType:c,geometryName:"geometry",filter:d})).read({maxFeatures:1,callback:function(a){if(200==a.priv.status){if(1==a.features.length){a=a.features[0];var b=a.fid.split(".")[0];a.geometry.transform(projectData.layers[wmsLoader.layerTitleNameMapping[b]].crs,projectData.crs);highLightGeometry.push(a);showFeatureSelected(a)}}else Ext.Msg.alert("Get feature error",a.priv.status+" "+a.priv.statusText+"

"+a.priv.responseText)},scope:this}))}}} -;function showLegendAndMetadata(a){var b=wmsLoader.layerTitleNameMapping[a];void 0==legendMetadataWindow&&setupLegendAndMetadataWindow();legendMetadataWindow.setTitle(legendMetadataWindowTitleString[lang]+' "'+a+'"');!1==legendMetadataWindow_active&&legendMetadataWindow.show();var c=projectData.layers[b],d={};c&&(d=wmsURI+Ext.urlEncode({SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetLegendGraphics",FORMAT:"image/png",EXCEPTIONS:"application/vnd.ogc.se_inimage",BOXSPACE:1,LAYERSPACE:2,SYMBOLSPACE:1,SYMBOLHEIGHT:2, -LAYERFONTSIZE:8,ITEMFONTSIZE:8,LAYERS:b,DPI:screenDpi}),legendMetaTabPanel=Ext.getCmp("legendMetaTabPanel"),legendMetaTabPanel.activate(legendTab),legendTab.update(''),d=c.geom_type,""!=d||"ogr"!=c.provider&&"spatialite"!=c.provider||(d="vector"),""!=d||"gdal"!=c.provider&&"wms"!=c.provider||(d="raster"),d={TYPE:d,PROVIDER:c.provider,CRS:c.crs,IDENTIFY:wmsLoader.layerProperties[b].queryable,EDITABLE:c.wfs,ID:c.id});legendMetaTabPanel.activate(metadataTab);a=''+ -('

'+metadataSectionTitleString[lang]+' "'+a+'"

');wmsLoader.layerProperties[b]["abstract"]&&(a+="

"+abstractString[lang]+"

"+wmsLoader.layerProperties[b]["abstract"]+"

");a+='

'+geographicExtentString[lang]+"

    ";a+='";a+='";a+="
    '+westString[lang]+''+ -southString[lang]+''+eastString[lang]+''+northString[lang]+"
    '+wmsLoader.layerProperties[b].bbox[0]+''+wmsLoader.layerProperties[b].bbox[1]+''+wmsLoader.layerProperties[b].bbox[2]+''+wmsLoader.layerProperties[b].bbox[3]+"
    ";if(wmsLoader.layerProperties[b].attributes){a+='

    '+attributesString[lang]+ -'

    ";for(var c=1,e=0;e':a+"",a+='",c++;a+="
    '+attributeNameString[lang]+''+attributeTypeString[lang]+''+attributeCommentString[lang]+''+attributeLengthString[lang]+''+attributePrecisionString[lang]+"
    '+attribute.name+''+attribute.type+''+attribute.comment+''+attribute.length+''+attribute.precision+"
    "}a+="
";metadataTab.getComponent("propertyText").update(a);metadataTab.getComponent("propertyGrid").setSource(d);showMetaDataInLegend||legendMetaTabPanel.remove("metadataTab",!0)} +;function showLegendAndMetadata(a){var b=wmsLoader.layerTitleNameMapping[a];void 0==legendMetadataWindow&&setupLegendAndMetadataWindow();legendMetadataWindow.setTitle(legendMetadataWindowTitleString[lang]+' "'+a+'"');!1==legendMetadataWindow_active&&legendMetadataWindow.show();var c=projectData.layers[b],d={},e=wmsURI+Ext.urlEncode({SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetLegendGraphics",FORMAT:"image/png",EXCEPTIONS:"application/vnd.ogc.se_inimage",BOXSPACE:1,LAYERSPACE:2,SYMBOLSPACE:1,SYMBOLHEIGHT:2, +LAYERFONTSIZE:8,ITEMFONTSIZE:8,LAYERS:b,DPI:screenDpi});legendMetaTabPanel=Ext.getCmp("legendMetaTabPanel");legendMetaTabPanel.activate(legendTab);legendTab.update('');if(c){var f='DescribeFeatureType',d=c.geom_type;""!=d||"ogr"!=c.provider&&"spatialite"!=c.provider||(d="vector");""!=d||"gdal"!=c.provider&&"wms"!=c.provider||(d="raster");d={TYPE:d,PROVIDER:c.provider, +CRS:c.crs,IDENTIFY:wmsLoader.layerProperties[b].queryable?Ext.MessageBox.buttonText.yes:Ext.MessageBox.buttonText.no,EDITABLE:c.wfs?Ext.MessageBox.buttonText.yes:Ext.MessageBox.buttonText.no,ID:c.id}}legendMetaTabPanel.activate(metadataTab);a=''+('

'+metadataSectionTitleString[lang]+ +' "'+a+'"

');wmsLoader.layerProperties[b]["abstract"]&&(a+="

"+abstractString[lang]+"

"+wmsLoader.layerProperties[b]["abstract"]+"

");c&&c.wfs&&(a+="

"+f+"

");a+='

'+geographicExtentString[lang]+"

    ";a+='";a+='";a+="
    '+westString[lang]+''+southString[lang]+''+ +eastString[lang]+''+northString[lang]+"
    '+wmsLoader.layerProperties[b].bbox[0]+''+wmsLoader.layerProperties[b].bbox[1]+''+wmsLoader.layerProperties[b].bbox[2]+''+wmsLoader.layerProperties[b].bbox[3]+"
    ";if(wmsLoader.layerProperties[b].attributes){a+='

    '+attributesString[lang]+'

    ";c=1;for(f=0;f':a+"",a+='",c++;a+="
    '+ +attributeNameString[lang]+''+attributeTypeString[lang]+''+attributeCommentString[lang]+''+attributeLengthString[lang]+''+attributePrecisionString[lang]+"
    '+attribute.name+''+attribute.type+ +''+attribute.comment+''+attribute.length+''+attribute.precision+"
    "}a+="
";metadataTab.getComponent("propertyText").update(a);metadataTab.getComponent("propertyGrid").setSource(d);showMetaDataInLegend||legendMetaTabPanel.remove("metadataTab",!0)} function setupLegendAndMetadataWindow(){legendMetadataWindow=new Ext.Window({title:legendMetadataWindowTitleString[lang],width:400,height:300,autoScroll:!0,maximizable:!0,layout:"fit",shadow:!1,items:[{xtype:"tabpanel",activeTab:0,defaults:{autoScroll:!0},id:"legendMetaTabPanel",items:[{title:metadataTabTitleString[lang],id:"metadataTab",items:[new Ext.grid.PropertyGrid({itemId:"propertyGrid",autoHeight:!0,stripeRows:!1,hideHeaders:!0,viewConfig:{forceFit:!0,scrollOffset:2,templates:{cell:new Ext.Template('', '
{value}
',"")}},listeners:{beforeedit:function(a){return!1}}}),new Ext.Container({itemId:"propertyText"})]},{title:legendTabTitleString[lang],id:"legendTab"}]}],listeners:{show:function(){legendMetadataWindow_active=!0},hide:function(){legendMetadataWindow_active=!1},close:function(){legendMetadataWindow=void 0}}});legendMetaTabPanel=Ext.getCmp("legendMetaTabPanel");legendTab=Ext.getCmp("legendTab");metadataTab=Ext.getCmp("metadataTab")} ;function buildGroupContextMenu(a){var b=[];b.push({text:contextZoomLayerExtent[lang],iconCls:"x-zoom-icon",handler:zoomToLayerExtent});b.push({text:TR.properties,handler:layerProperties});a.menu=new Ext.menu.Menu({items:b})} function buildLayerContextMenu(a){var b=wmsLoader.layerTitleNameMapping[a.attributes.text],c=wmsLoader.layerProperties[b],b=projectData.layers[b],d=[];d.push({text:contextZoomLayerExtent[lang],iconCls:"x-zoom-icon",handler:zoomToLayerExtent});c.queryable&&"undefined"!==typeof c.attributes&&d.push({text:contextOpenTable[lang],iconCls:"x-table-icon",handler:openAttTable});void 0!=b&&"gdal"!==b.provider&&"wms"!==b.provider&&d.push({itemId:"contextExport",text:contextDataExport[lang],iconCls:"x-export-icon", menu:[{itemId:"SHP",text:"ESRI Shapefile",handler:exportHandler},{itemId:"DXF",text:"AutoCAD DXF",handler:exportHandler},{itemId:"XLSX",text:"MS Office Open XLSX",handler:exportHandler},{itemId:"CSV",text:"Text CSV (semicolon)",handler:exportHandler},{itemId:"TSV",text:"Text TSV (tab)",handler:exportHandler},{itemId:"KML",text:"Keyhole Markup Language KML",handler:exportHandler},{itemId:"GeoJSON",text:"GeoJSON",handler:exportHandler},"-",{itemId:"currentExtent",text:contextUseExtent[lang],checked:!0, -hideOnClick:!1},{itemId:"useMapCRS",text:TR.exportUseMapCrs+" ("+projectData.crs+")",checked:!0,hideOnClick:!1}]});d.push({text:TR.properties,handler:layerProperties});a.menu=new Ext.menu.Menu({items:d});a.filter=[]}function zoomToLayerExtent(a){a=layerTree.getSelectionModel().getSelectedNode().text;a=(new OpenLayers.Bounds(wmsLoader.layerProperties[wmsLoader.layerTitleNameMapping[a]].bbox)).transform("EPSG:4326",geoExtMap.map.projection);geoExtMap.map.zoomToExtent(a)} -function exportHandler(a){var b=layerTree.getSelectionModel().getSelectedNode().text,c=wmsLoader.layerTitleNameMapping[b],b=Eqwc.common.getIdentifyLayerName(c),d=a.container.menuItemId,e=a.ownerCt.getComponent("currentExtent");a=a.ownerCt.getComponent("useMapCRS").checked?projectData.crs:projectData.layers[c].crs;exportData(b,d,e.checked,a)}function layerProperties(a){a=layerTree.getSelectionModel().getSelectedNode().text;showLegendAndMetadata(a)} +hideOnClick:!1},{itemId:"useMapCRS",text:TR.exportUseMapCrs,checked:!0,hideOnClick:!1}]});d.push({text:TR.properties,handler:layerProperties});a.menu=new Ext.menu.Menu({items:d});a.filter=[]}function zoomToLayerExtent(a){a=layerTree.getSelectionModel().getSelectedNode().text;a=(new OpenLayers.Bounds(wmsLoader.layerProperties[wmsLoader.layerTitleNameMapping[a]].bbox)).transform("EPSG:4326",geoExtMap.map.projection);geoExtMap.map.zoomToExtent(a)} +function exportHandler(a){var b=layerTree.getSelectionModel().getSelectedNode().text,c=wmsLoader.layerTitleNameMapping[b],b=Eqwc.common.getIdentifyLayerName(c),d=a.container.menuItemId,e=a.ownerCt.getComponent("currentExtent");a=a.ownerCt.getComponent("useMapCRS").checked?Eqwc.currentMapProjection[0]:projectData.layers[c].crs;exportData(b,d,e.checked,a)}function layerProperties(a){a=layerTree.getSelectionModel().getSelectedNode().text;showLegendAndMetadata(a)} function contextMenuHandler(a){var b=a.menu.getComponent("contextExport");void 0!=b&&("guest"==projectData.user?b.setDisabled(!0):b.setDisabled(!1));a.select();a.menu.show(a.ui.getAnchor())} function zoomHandler(a,b,c,d,e){c=a.getStore().getAt(b);d=c.id;e=a.itemId;a.getSelectionModel().selectRow(b);c.data.layer=e;c.data.doZoomToExtent=!0;c.data.id=d;a=c.data.bbox;c.data.bbox instanceof OpenLayers.Bounds||(a=OpenLayers.Bounds.fromArray([a.minx,a.miny,a.maxx,a.maxy]),d=a.getWidth(),b=a.getHeight(),50>d?(d=a.left+0.5*d,a.left=d-25,a.right=d+25):(a.left-=0.05*d,a.right+=0.05*d),50>b?(b=a.bottom+0.5*b,a.bottom=b-25,a.top=b+25):(a.bottom-=0.05,a.top+=0.05),c.data.bbox=a);showRecordSelected(c.data)} function showRecordSelected(a){a.doZoomToExtent?geoExtMap.map.zoomToExtent(a.bbox):geoExtMap.map.setCenter(new OpenLayers.LonLat(a.x,a.y),a.zoom)} -function exportData(a,b,c,d){var e=wmsLoader.layerTitleNameMapping[a],f=projectData.layers[e].crs,g=function(a,b){for(var c=[],d=0;db.getKey()&&b.stopPropagation()}),l="m",h="km","english"==Eqwc.settings.measurementsUnitSystem&&(l="ft",h="mi"),geoExtMap.map.addControl(new OpenLayers.Control.KeyboardDefaults),geoExtMap.map.addControl(new OpenLayers.Control.Navigation),geoExtMap.map.addControl(new OpenLayers.Control.Attribution),geoExtMap.map.addControl(new OpenLayers.Control.ScaleLine({geodesic:!0, -topInUnits:l,topOutUnits:h})),geoExtMap.map.addControl(new OpenLayers.Control.Zoom),coordinateTextField=Ext.getCmp("CoordinateTextField"),geoExtMap.map.events.register("mousemove",this,function(a){a=geoExtMap.map.events.getMousePosition(a);a=geoExtMap.map.getLonLatFromPixel(a);var b=0,c=geoExtMap.map.getScale();400>=c&&(b=1,100>=c&&(b=2));coordinateTextField.setRawValue(a.lon.toFixed(b)+","+a.lat.toFixed(b))}),coordinateTextField.on("specialkey",function(a,b){if(b.getKey()==b.ENTER){var c=a.getValue().split(","), -c=new OpenLayers.LonLat(parseFloat(c[0]),parseFloat(c[1]));geoExtMap.map.setCenter(c)}36b.getKey()&&b.stopPropagation()}),coordinateTextField.on("change",function(a,b,c){a=b.split(",");a=new OpenLayers.LonLat(parseFloat(a[0]),parseFloat(a[1]));geoExtMap.map.setCenter(a)}),navHistoryCtrl=new OpenLayers.Control.NavigationHistory,geoExtMap.map.addControl(navHistoryCtrl));selectedQueryableLayers=a(selectedQueryableLayers);initialLoadDone&&(Eqwc.settings.enableHoverPopup&&geoExtMap.map.removeControl(WMSGetFInfoHover), -geoExtMap.map.removeControl(WMSGetFInfo));WMSGetFInfo=new OpenLayers.Control.WMSGetFeatureInfo({layers:[thematicLayer],infoFormat:"text/xml",queryVisible:!0,maxFeatures:Eqwc.settings.limitSearchMaxResults,vendorParams:{QUERY_LAYERS:selectedQueryableLayers.join(","),WITH_MAPTIP:!0}});WMSGetFInfo.events.register("getfeatureinfo",this,showFeatureInfo);WMSGetFInfo.events.register("beforegetfeatureinfo",this,onBeforeGetFeatureInfoClick);WMSGetFInfo.events.register("nogetfeatureinfo",this,noFeatureInfoClick); -geoExtMap.map.addControl(WMSGetFInfo);Eqwc.settings.enableHoverPopup&&(WMSGetFInfoHover=new OpenLayers.Control.WMSGetFeatureInfo({layers:[thematicLayer],infoFormat:"text/xml",queryVisible:!0,hover:!0,vendorParams:{QUERY_LAYERS:selectedQueryableLayers.join(",")}}),WMSGetFInfoHover.events.register("getfeatureinfo",this,showFeatureInfoHover),geoExtMap.map.addControl(WMSGetFInfoHover));initialLoadDone||null==g||(OverviewMapOptions.maxExtent=maxExtent,geoExtMap.map.addControl(new OpenLayers.Control.OverviewMap({size:OverviewMapSize, -minRatio:16,maxRatio:64,mapOptions:OverviewMapOptions,maximized:OverviewMapMaximized,layers:[g]})));if(!initialLoadDone){Ext.getCmp("IdentifyTool").toggle(!0);identifyToolActive=!0;activateGetFeatureInfo(!0);g=Ext.getCmp("myTopToolbar");l=new Ext.Button({icon:iconDirectory+"mActionZoomFullExtent.png",id:"navZoomFullExtent",scale:"medium",map:geoExtMap.map,tooltip:zoomFullViewTooltipString[lang],tooltipType:"qtip",handler:mapToolbarHandler});g.insert(0,l);l=new GeoExt.Action({icon:iconDirectory+"mActionZoomBox.png", -id:"navZoomBoxButton",scale:"medium",control:new OpenLayers.Control.ZoomBox({out:!1}),map:geoExtMap.map,tooltip:zoomRectangleTooltipString[lang],tooltipType:"qtip",toggleGroup:"mapTools",enableToggle:!0,allowDepress:!0});g.insert(1,l);geoExtMap.map.zoomBoxActive=!1;Ext.getCmp("navZoomBoxButton").on("toggle",mapToolbarHandler);l=new GeoExt.Action({icon:iconDirectory+"mActionZoomLast.png",scale:"medium",control:navHistoryCtrl.previous,disabled:!0,tooltip:navigationHistoryBackwardTooltipString[lang], -tooltipType:"qtip",id:"zoomLast",hidden:!projectData.zoom_back_forward});g.insert(2,l);l=new GeoExt.Action({icon:iconDirectory+"mActionZoomNext.png",scale:"medium",control:navHistoryCtrl.next,disabled:!0,tooltip:navigationHistoryForwardTooltipString[lang],tooltipType:"qtip",id:"zoomNext",hidden:!projectData.zoom_back_forward});g.insert(3,l);if(projectData.geolocation){var t=new GeoExt.Action({icon:iconDirectory+"mActionLocate.png",id:"geoLocate",scale:"medium",control:new OpenLayers.Control.Geolocate({bind:!1, -geolocationOptions:{enableHighAccuracy:!0,maximumAge:0,timeout:7E3}}),map:geoExtMap.map,tooltip:showLocationTooltipString[lang],tooltipType:"qtip",enableToggle:!1,allowDepress:!0,handler:mapToolbarHandler});g.insert(13,t);var u=function(a){var b=a.geometry.getCentroid(),c=a.geometry.getBounds(),d=Math.abs((c.right-c.left)/2),e=0,f="up";window.resizeInterval=window.setInterval(function(){16

{text}

{place_name}
',layers:projectData.geoCode.layers,provider:projectData.geoCode.provider,displayField:"text",maxRows:10}):new QGIS.SearchComboBox({map:geoExtMap.map,highlightLayerName:"attribHighLight",hasReverseAxisOrder:!1,width:300,searchtables:searchtables, -url:searchBoxQueryURL,geomUrl:searchBoxGetGeomURL,srs:projectData.crs.split(":")[1]}),g.insert(g.items.length,qgisSearchCombo);g.doLayout();!0==mapThemeSwitcherActive&&(mapThemeSwitcher=new ThemeSwitcher(Ext.getCmp("MapPanel")),Ext.getCmp("mapThemeButton").show());g=function(a){if("query"in urlParams){for(var b=null,c=0;ca&&(a=500),geoExtMap.map.zoomToScale(a))}})}};l=projectData.search;if(null!=l&&02";return[d,c]}})};for(var r in measureControls)g=measureControls[r],g.events.on({measure:handleMeasurements,measurepartial:handleMeasurements}),g.setImmediate(!0),g.geodesic=useGeodesicMeasurement,g.displaySystem=Eqwc.settings.measurementsUnitSystem?Eqwc.settings.measurementsUnitSystem:"metric",geoExtMap.map.addControl(g)}if(enableExtraLayers&&0b.getKey()&&b.stopPropagation()}),l="m",h="km","english"==Eqwc.settings.measurementsUnitSystem&&(l= +"ft",h="mi"),geoExtMap.map.addControl(new OpenLayers.Control.KeyboardDefaults),geoExtMap.map.addControl(new OpenLayers.Control.Navigation),geoExtMap.map.addControl(new OpenLayers.Control.Attribution),geoExtMap.map.addControl(new OpenLayers.Control.ScaleLine({geodesic:!0,topInUnits:l,topOutUnits:h})),geoExtMap.map.addControl(new OpenLayers.Control.Zoom),coordinateTextField=Ext.getCmp("CoordinateTextField"),geoExtMap.map.events.register("mousemove",this,function(a){var b=projectData.crs,c=rightStatusText.getValue(), +d=Eqwc.currentMapProjection[2].proj.units;a=geoExtMap.map.events.getMousePosition(a);a=geoExtMap.map.getLonLatFromPixel(a);var e=0;"degrees"==d&&(e=4);d=geoExtMap.map.getScale();400>=d&&(e+=1,100>=d&&(e+=2));b!=c&&a.transform(geoExtMap.map.getProjectionObject(),Eqwc.currentMapProjection[2]);coordinateTextField.setRawValue(a.lon.toFixed(e)+","+a.lat.toFixed(e))}),coordinateTextField.on("specialkey",function(a,b){if(b.getKey()==b.ENTER){var c=projectData.crs,d=rightStatusText.getValue(),e=a.getValue().split(","), +e=new OpenLayers.LonLat(parseFloat(e[0]),parseFloat(e[1]));c!=d&&e.transform(Eqwc.currentMapProjection[2],geoExtMap.map.getProjectionObject());geoExtMap.map.setCenter(e)}36b.getKey()&&b.stopPropagation()}),coordinateTextField.on("change",function(a,b,c){a=projectData.crs;c=rightStatusText.getValue();b=b.split(",");b=new OpenLayers.LonLat(parseFloat(b[0]),parseFloat(b[1]));a!=c&&b.transform(Eqwc.currentMapProjection[2],geoExtMap.map.getProjectionObject());geoExtMap.map.setCenter(b)}), +navHistoryCtrl=new OpenLayers.Control.NavigationHistory,geoExtMap.map.addControl(navHistoryCtrl));selectedQueryableLayers=a(selectedQueryableLayers);initialLoadDone&&(Eqwc.settings.enableHoverPopup&&geoExtMap.map.removeControl(WMSGetFInfoHover),geoExtMap.map.removeControl(WMSGetFInfo));WMSGetFInfo=new OpenLayers.Control.WMSGetFeatureInfo({layers:[thematicLayer],infoFormat:"text/xml",queryVisible:!0,maxFeatures:Eqwc.settings.limitSearchMaxResults,vendorParams:{QUERY_LAYERS:selectedQueryableLayers.join(","), +WITH_MAPTIP:!0}});WMSGetFInfo.events.register("getfeatureinfo",this,showFeatureInfo);WMSGetFInfo.events.register("beforegetfeatureinfo",this,onBeforeGetFeatureInfoClick);WMSGetFInfo.events.register("nogetfeatureinfo",this,noFeatureInfoClick);geoExtMap.map.addControl(WMSGetFInfo);Eqwc.settings.enableHoverPopup&&(WMSGetFInfoHover=new OpenLayers.Control.WMSGetFeatureInfo({layers:[thematicLayer],infoFormat:"text/xml",queryVisible:!0,hover:!0,vendorParams:{QUERY_LAYERS:selectedQueryableLayers.join(",")}}), +WMSGetFInfoHover.events.register("getfeatureinfo",this,showFeatureInfoHover),geoExtMap.map.addControl(WMSGetFInfoHover));initialLoadDone||null==g||(OverviewMapOptions.maxExtent=maxExtent,geoExtMap.map.addControl(new OpenLayers.Control.OverviewMap({size:OverviewMapSize,minRatio:16,maxRatio:64,mapOptions:OverviewMapOptions,maximized:OverviewMapMaximized,layers:[g]})));if(!initialLoadDone){Ext.getCmp("IdentifyTool").toggle(!0);identifyToolActive=!0;activateGetFeatureInfo(!0);g=Ext.getCmp("myTopToolbar"); +l=new Ext.Button({icon:iconDirectory+"mActionZoomFullExtent.png",id:"navZoomFullExtent",scale:"medium",map:geoExtMap.map,tooltip:zoomFullViewTooltipString[lang],tooltipType:"qtip",handler:mapToolbarHandler});g.insert(0,l);l=new GeoExt.Action({icon:iconDirectory+"mActionZoomBox.png",id:"navZoomBoxButton",scale:"medium",control:new OpenLayers.Control.ZoomBox({out:!1}),map:geoExtMap.map,tooltip:zoomRectangleTooltipString[lang],tooltipType:"qtip",toggleGroup:"mapTools",enableToggle:!0,allowDepress:!0}); +g.insert(1,l);geoExtMap.map.zoomBoxActive=!1;Ext.getCmp("navZoomBoxButton").on("toggle",mapToolbarHandler);l=new GeoExt.Action({icon:iconDirectory+"mActionZoomLast.png",scale:"medium",control:navHistoryCtrl.previous,disabled:!0,tooltip:navigationHistoryBackwardTooltipString[lang],tooltipType:"qtip",id:"zoomLast",hidden:!projectData.zoom_back_forward});g.insert(2,l);l=new GeoExt.Action({icon:iconDirectory+"mActionZoomNext.png",scale:"medium",control:navHistoryCtrl.next,disabled:!0,tooltip:navigationHistoryForwardTooltipString[lang], +tooltipType:"qtip",id:"zoomNext",hidden:!projectData.zoom_back_forward});g.insert(3,l);if(projectData.geolocation){var t=new GeoExt.Action({icon:iconDirectory+"mActionLocate.png",id:"geoLocate",scale:"medium",control:new OpenLayers.Control.Geolocate({bind:!1,geolocationOptions:{enableHighAccuracy:!0,maximumAge:0,timeout:7E3}}),map:geoExtMap.map,tooltip:showLocationTooltipString[lang],tooltipType:"qtip",enableToggle:!1,allowDepress:!0,handler:mapToolbarHandler});g.insert(13,t);var u=function(a){var b= +a.geometry.getCentroid(),c=a.geometry.getBounds(),d=Math.abs((c.right-c.left)/2),e=0,f="up";window.resizeInterval=window.setInterval(function(){16

{text}

{place_name}
',layers:projectData.geoCode.layers,provider:projectData.geoCode.provider, +displayField:"text",maxRows:10}):new QGIS.SearchComboBox({map:geoExtMap.map,highlightLayerName:"attribHighLight",hasReverseAxisOrder:!1,width:300,searchtables:searchtables,url:searchBoxQueryURL,geomUrl:searchBoxGetGeomURL,srs:projectData.crs.split(":")[1]}),g.insert(g.items.length,qgisSearchCombo);g.doLayout();!0==mapThemeSwitcherActive&&(mapThemeSwitcher=new ThemeSwitcher(Ext.getCmp("MapPanel")),Ext.getCmp("mapThemeButton").show());g=function(a){if("query"in urlParams){for(var b=null,c=0;ca&&(a=500),geoExtMap.map.zoomToScale(a))}})}};l=projectData.search;if(null!=l&&02";return[d,c]}})};for(var r in measureControls)g=measureControls[r],g.events.on({measure:handleMeasurements,measurepartial:handleMeasurements}),g.setImmediate(!0),g.geodesic=useGeodesicMeasurement,g.displaySystem=Eqwc.settings.measurementsUnitSystem?Eqwc.settings.measurementsUnitSystem: +"metric",geoExtMap.map.addControl(g)}if(enableExtraLayers&&0a.gridResultsPageSize&&(g=new Ext.ux.PagingToolbar({pageSize:a.gridResultsPageSize,store:a.store,displayInfo:!1,grid:a,doRefresh:function(){this.grid.onSubmit(!0)}}));var h=!1;5>a.gridColumns.length&&(h=!0);if(!a.resultsGrid){var n=new Ext.ux.grid.GridFilters({encode:!1,local:!0,menuFilterText:TR.menuFilterText});a.resultsGrid=new Ext.grid.GridPanel({id:f,panel:a,title:a.gridTitle,itemId:a.gridTitle,closable:a.tabClosable,collapsible:d, collapsed:!1,store:a.store,columns:a.gridColumns,plugins:[n],sm:new Ext.grid.RowSelectionModel({singleSelect:!0}),autoHeight:e,viewConfig:{forceFit:h,templates:{cell:new Ext.Template('','
{value}
',"")}},bbar:g,listeners:{render:function(a){a.store.on("load",function(c,d,e){1==b.length&&(a.getSelectionModel().selectFirstRow(), diff --git a/client_mobile/eqwc_mobile.js b/client_mobile/eqwc_mobile.js index 360e20fc..3348fcf6 100644 --- a/client_mobile/eqwc_mobile.js +++ b/client_mobile/eqwc_mobile.js @@ -2,14 +2,14 @@ * * eqwc.js -- build of Extended QGIS Web Client * - * version: 1.8.2 - * buildDate: 2019-01-15 + * version: 1.8.3 + * buildDate: 2019-03-15 * * Copyright (2014-2019), Level2, All rights reserved. * More information at https://github.com/uprel/gisapp * */ -Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var d,c;if(null==this)throw new TypeError("this is null or not defined");var e=Object(this),f=e.length>>>0;if("[object Function]"!=={}.toString.call(a))throw new TypeError(a+" is not a function");b&&(d=b);for(c=0;c>>0;if("[object Function]"!=={}.toString.call(a))throw new TypeError(a+" is not a function");b&&(d=b);for(c=0;c'+b+""));""'+b+"");return a}; Eqwc.common.manageFile=function(a,b){var d=!1;if(b){var c=a.split(".")[1].toLowerCase();if("jpg"==c||"jpeg"==c||"gif"==c||"png"==c)d=!0}c=window.location.origin;c=1==projectData.uploadDir.split(".").length?c+projectData.uploadDir:c+projectData.uploadDir.split(".")[1];return d?"":Eqwc.common.createHyperlink(c+a,a,null)}; Eqwc.common.getRasterFieldName=function(a,b){return Eqwc.settings.overWriteRasterFieldName&&Eqwc.settings.overWriteRasterFieldName[a]?Eqwc.settings.overWriteRasterFieldName[a][0]==b?Eqwc.settings.overWriteRasterFieldName[a][1]:b:b};Eqwc.common.layerFieldNameExists=function(a,b){for(var d=wmsLoader.layerProperties[a],c=0;c'+I18n.geolocation.accuracy+": "+a.toPrecision(3)+" m "):b.push(I18n.geolocation.accuracy+": "+a.toPrecision(3)+" m"));d&&(b.push(I18n.geolocation.altitude+": "+d.toFixed(2)+" m"),0"));$("#locationPanel").show()}else $("#locationPanel").hide(),"function"==typeof Editor&&mobGoto&&mobGoto.showGotoPanel(!1)},loadTopics:function(a){var b="",d="";Map.topics={};for(var c=0;c');Map.topics[g.name]={title:g.title,wms_url:g.wms_url,background_layer:g.background_layer,overlay_layer:g.overlay_layer,minscale:g.minscale,bg_topic:g.bg_topic,overlay_topics:g.overlay_topics}}d+='
';d+="

"+g.title+"

";d+="

"+projectData.project+"

";d+="

"+projectData.crs+ -"

";"{}"!=projectData.description&&(d+="

"+projectData.description+"

");d+="
"}a=$("#topicMain");a.prepend(d);a.prepend(b);a.find("div[data-role=collapsible]").collapsible({theme:"c",refresh:!0});Gui.selectTopic(Config.permalink.initialTopic||Config.data.initialTopic)},selectTopic:function(a){Map.clearLayers();Map.topic=a;Map.setMinScaleDenom(Map.topics[Map.topic].minscale||Config.map.minScaleDenom.map);Map.backgroundTopic=Map.topics[Map.topic].bg_topic||null;Gui.initialLoad&&Config.permalink.initialBackgroundTopic&& -(Map.backgroundTopic=Config.permalink.initialBackgroundTopic);void 0!=Map.topics[Map.backgroundTopic]&&Map.topics[Map.backgroundTopic].background_layer||(Map.backgroundTopic=null);Layers.loadLayers(null,Gui.loadLayers);Gui.loadExtraLayers();Gui.loadBackgroundLayers()},loadLayers:function(a){function b(d,f,g,h){if(0";else{var p=f|| -Layers.markerPrefix+d.name,k=$.grep(a.groups,function(a){return a.title===p})[0];if(void 0!=k){k=$.grep(k.layers,function(a){return a.layername===d.name})[0];if(-1";c+='")}function d(){var a=$(this).children(".ui-collapsible-content").children("label");a.find(':checkbox[data-role="none"]').attr("data-role",null);a.trigger("create");$(this).unbind("expand",d)}for(var c= -"",e=[],f=0;f'+ -("

"+I18n.layers.background+"

");for(var b=0;b"+d.title+"";Map.setBackgroundLayer(d.name,b,!0)}a+="";$("#panelLayerAll").append(a);$("#panelLayerAll").trigger("create");$("#panelLayerAll :checkbox[data-background=true]").on("change",function(a){a= -$(this).attr("id");var b=Map.backgroundLayers[a],c=$(this).is(":checked");b.setVisible(c);$("#panelLayerAll :checkbox[data-background=true]").not($(this)).prop("checked",!1).checkboxradio("refresh");for(b=0;b'+("

"+I18n.layers.overlays+"

");for(var b=0;b"+d.title+"";Map.setBackgroundLayer(d.name,b,!1)}a+="";$("#panelLayerAll").append(a);$("#panelLayerAll").trigger("create");$("#panelLayerAll :checkbox[data-extra=true]").bind("change",function(a){a=$(this).attr("id");a=Map.backgroundLayers[a];var b=$(this).is(":checked");a.setVisible(b)})}},setupOverlayTopics:function(a){a= -$.grep(a,function(a,b){return void 0!=Map.topics[a]&&Map.topics[a].overlay_layer});Map.clearOverlayLayers();$("#overlayTopics").remove();if(0"+I18n.layers.overlays+"");for(var d=a.length-1;0<=d;d--){var c=a[d];b+="";Map.setBackgroundLayer(d.name,b,!0)}a+="";$("#panelLayerAll").append(a); +$("#panelLayerAll").trigger("create");$("#panelLayerAll :checkbox[data-background=true]").on("change",function(a){a=$(this).attr("id");var b=Map.backgroundLayers[a],c=$(this).is(":checked");b.setVisible(c);$("#panelLayerAll :checkbox[data-background=true]").not($(this)).prop("checked",!1).checkboxradio("refresh");for(b=0;b'+("

"+I18n.layers.overlays+"

");for(var b=0;b"+d.title+"";Map.setBackgroundLayer(d.name,b,!1)}a+="";$("#panelLayerAll").append(a);$("#panelLayerAll").trigger("create");$("#panelLayerAll :checkbox[data-extra=true]").bind("change", +function(a){a=$(this).attr("id");a=Map.backgroundLayers[a];var b=$(this).is(":checked");a.setVisible(b)})}},setupOverlayTopics:function(a){a=$.grep(a,function(a,b){return void 0!=Map.topics[a]&&Map.topics[a].overlay_layer});Map.clearOverlayLayers();$("#overlayTopics").remove();if(0"+I18n.layers.overlays+"");for(var d=a.length-1;0<=d;d--){var c=a[d];b+="