From: prashantgosai11 Date: Mon, 11 Jan 2021 16:45:47 +0530 Subject: filter --- filter --- --- /dev/null +++ b/src/main/resources/static/mis/js/customscripts/filter.js @@ -0,0 +1,229 @@ +function changeFunc() { +var selectBox = document.getElementById("selectnone"); +var selectedValue = selectBox.options[selectBox.selectedIndex].value; +if (selectedValue=="city"){ +$('#cityname').show(); +return false; +} +else { +alert("Error"); +$('#cityname').hide(); +} +} + +function resetForm() { + document.getElementById("filterform").reset(); +} + +function clearSearch() { + window.location = "[[@{/}]]"; +} + +function myFunction1() { + var x = document.getElementById("attribute_filter"); + if (x.style.display === "none") { + x.style.display = "block"; + } else { + x.style.display = "none"; + } + } + + function myFunction2() { + var x = document.getElementById("attribute_filter2"); + if (x.style.display === "none") { + x.style.display = "block"; + } else { + x.style.display = "none"; + } + } + + $("#attri2").click(function(){ + $("#attribute_filter").hide(); + }); + + $("#attri").click(function(){ + $("#attribute_filter2").hide(); + }); + + $(document).ready(function() { + + + var role='${role}'; + $("#roleType").val(role); + + $("#slidingDiv").hide(); + $('#show_hide').click(function () { + + $("#slidingDiv").toggle("'slide', {direction: 'right' }, 1000"); + }); + }); + + div = document.getElementById('attribute_filter2') + +//To hide + + + + + +//To hide + + + + +$('#filter').click(function(e){ + e.preventDefault(); + + + var code={}; + code.localIdFrom=document.getElementById('localIdFrom').value; + code.localIdTo=document.getElementById('localIdTo').value; + code.satelite=document.getElementById('satelite').value; + code.sensors=document.getElementById('sensors').value; + /* alert(document.getElementById('dateOfPassFrom').value + "datefrom"); */ + + if(document.getElementById('dateOfPassFrom').value=='') + { + code.dateOfPassFrom=null; + alert(code.dateOfPassFrom); + }else{ + code.dateOfPassFrom=document.getElementById('dateOfPassFrom').value; + } + if(document.getElementById('dateOfPassTo').value==''){ + + code.dateOfPassTo=null; + }else{ + code.dateOfPassTo=document.getElementById('dateOfPassTo').value; + } + + + code.pathFrom=document.getElementById('pathFrom').value; + code.pathTo=document.getElementById('pathTo').value; + code.rowFrom=document.getElementById('rowFrom').value; + code.rowTo=document.getElementById('rowTo').value; + var codobject=JSON.stringify(code); + //alert(codobject); + + + + console.log(codobject) + $.ajax({ + + url:"getData", + type:"POST", + data:codobject, + contentType:"application/json;charset=utf-8", + dataType: 'json', + success: function(data) { + loadtable(data); + + }, + error : function(request, status, error) { + alert(error.toString) + } + + }) + + })//close filter code + + + $(document).ready(function(){ + + $.ajax({ + url: "findAll", + type : 'GET', + success : function(data) { + loadtable(data); + }, + error : function(request, status, error) { + alert(error) + } + + }); + + + }) + + + function Myzoom(longlat) +{ + + + if(longlat!=null) + { + console.log(longlat); + var coordMin = ol.proj.fromLonLat(longlat,'EPSG:3857','EPSG:4326'); + var coordMax = ol.proj.fromLonLat(longlat,'EPSG:3857','EPSG:4326'); + + var extent=[coordMin[0],coordMin[1],coordMax[0],coordMax[1]]; + map.getView().fit(extent,map.getSize()); + const center = map.getView().getCenter(); + map.getView().setZoom(8.5); + + + + + } +} + + +var layerselected=[]; + $('#getASIReportList').on('change', 'input[type="checkbox"]', function(){ + + var lname=this.name.replace(/[\[\]']+/g,''); + + + var styleName='satellite_data_5'; + var whr="lllat='"+lname+"'"; + + + + + if(this.checked) + { + + + SectorLayer= new ol.layer.Tile({ + source : new ol.source.TileWMS({ + url : 'http://localhost:8080/geoserver/cite/wms', + //crossOrigin: 'anonymous', + params : { + 'LAYERS' : styleName, + CQL_FILTER: whr, + format_options:'dpi:180', + version : '1.1.1', + STYLES:'' + } + }), + showLegend: true, + //maxResolution : 256, + name :styleName, + //visible:false + }), + layerselected.push(SectorLayer); + map.addLayer(SectorLayer); + console.log(layerselected); + } + else + { + + console.log(layerselected); + for( var i =0; i
-
-

Browser Stats

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
logoGoogle Chrome23%
logoMozila Firefox15%
logoApple Safari07%
logoInternet Explorer09%
logoOpera mini23%
logoMicrosoft edge09%
+
+

Filter

+ +
+
+
+ +
+ +
+
+ +
+ + + + + + + Satellite + + +

+ Sensor + +

+ + Date : +
+ From + + + To + +

+ + Path + + + - + + + + +

+ + + + Row + + + + + + +

+ + + + + + +
+ +
+
+ +
+ +
+ +
Select Special Type
+ + + + + + +
+
+
+
+ + + + + +
+ +
+ +
+ + +
+
@@ -402,7 +518,7 @@
-
+
+ +