|
POST
|
Hi , I am trying to captures images with geotagged, so that i can convert them to GIS databse. the problem is the accuracy. the geotagged image position varies compared to the exact location. how can i resolve it.
... View more
11-09-2015
03:29 AM
|
0
|
1
|
4354
|
|
POST
|
Hi all how can i change the colorramp in smart mapping, as well as how to change the range values. Smart Mapping - Render class breaks with color | ArcGIS API for JavaScript
... View more
09-09-2015
11:27 PM
|
0
|
0
|
2901
|
|
POST
|
Hi all i too have same problem with colorramp in smart mapping, as well as how to change the range values.
... View more
09-09-2015
04:29 AM
|
0
|
1
|
1447
|
|
POST
|
Hi Herdis, Thank you Very Much, Regards, Satyanarayana
... View more
09-01-2015
12:51 AM
|
0
|
0
|
1774
|
|
POST
|
Hi Herdis, I am wondering how you get the info display. I am not good in programming. can You help me in solving this. Regards, Satyanarayana
... View more
09-01-2015
12:13 AM
|
0
|
2
|
1774
|
|
POST
|
Hi all, I am trying to implement attribute edit using attribute inspector, the service is displaying but pop up info not getting displayed. If the problem is with the proxy setting, can anybody help with it. i am using IIS server. here is the code <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices--> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>Editable FeatureLayer in Selection Only Mode with Attribute Inspector</title> <link rel="stylesheet" href="http://js.arcgis.com/3.14/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.14/esri/css/esri.css"> <style> html, body { height: 100%; width: 100%; margin: 0; padding: 0; overflow: hidden; } #mapDiv{ margin: 0; padding:0; } #detailPane{ height:20px; color:#570026; font-size:12pt; font-weight:600; overflow:hidden; } .dj_ie .infowindow .window .top .right .user .content { position: relative; } .dj_ie .simpleInfoWindow .content {position: relative;} .esriAttributeInspector {height:100px;} .esriAttributeInspector .atiLayerName {display:none;} .esriAttributeInspector .atiButton{ margin-top:1px; margin-right:45px; } </style> <script src="http://js.arcgis.com/3.14/"></script> <script> var map; var updateFeature; require([ "esri/map", "esri/layers/FeatureLayer", "esri/dijit/AttributeInspector", "esri/symbols/SimpleLineSymbol", "esri/symbols/SimpleFillSymbol", "esri/Color", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/config", "esri/tasks/query", "dojo/query", "dojo/parser", "dojo/dom-construct", "dijit/form/Button", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!" ], function( Map, FeatureLayer, AttributeInspector, SimpleLineSymbol, SimpleFillSymbol, Color, ArcGISDynamicMapServiceLayer, esriConfig, Query,dojoQuery, parser, domConstruct, Button ) { parser.parse(); // refer to "Using the Proxy Page" for more information: https://developers.arcgis.com/javascript/jshelp/ags_proxy.html // esriConfig.defaults.io.proxyUrl = "/proxy/"; map = new Map("mapDiv", { basemap: "streets", center: [78.20, 19.00], zoom: 11 }); map.on("layers-add-result", initSelectToolbar); var petroFieldsMSL = new ArcGISDynamicMapServiceLayer("http://gisserver.cgg.gov.in/arcgis/rest/services/IRR/srsp_canal_WRK1/MapServer"); petroFieldsMSL.setDisableClientCaching(true); map.addLayer(petroFieldsMSL); var petroFieldsFL = new FeatureLayer("http://gisserver.cgg.gov.in/arcgis/rest/services/IRR/srsp_canal_WRK1/FeatureServer/1", { mode: FeatureLayer.MODE_SELECTION, outFields: ["objectid","code", "codename", "length", "description", "status_work", "la_status", "ip_status"] }); var selectionSymbol = new SimpleFillSymbol( SimpleFillSymbol.STYLE_NULL, new SimpleLineSymbol( "solid", new Color("yellow"), 2 ), null ); petroFieldsFL.setSelectionSymbol(selectionSymbol); petroFieldsFL.on("edits-complete", function() { petroFieldsMSL.refresh(); }); map.addLayers([petroFieldsFL]); function initSelectToolbar(evt) { var petroFieldsFL = evt.layers[1].layer; var selectQuery = new Query(); map.on("click", function(evt) { selectQuery.geometry = evt.mapPoint; petroFieldsFL.selectFeatures(selectQuery, FeatureLayer.SELECTION_NEW, function(features) { if (features.length > 0) { //store the current feature updateFeature = features[0]; map.infoWindow.setTitle(features[0].getLayer().name); map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint)); } else { map.infoWindow.hide(); } }); }); map.infoWindow.on("hide", function() { petroFieldsFL.clearSelection(); }); var layerInfos = [ { 'featureLayer': petroFieldsFL, 'showAttachments': false, 'isEditable': true, 'fieldInfos': [ {'fieldName': 'objectid', 'isEditable': false, 'objectid': 'objectid:'}, {'fieldName': 'code', 'isEditable': false, 'CANAL CODE': 'Acreage:'}, {'fieldName': 'codename', 'isEditable': false, 'label': 'CANAL NAME:'}, {'fieldName': 'length', 'isEditable': false, 'label': 'LENGTH IN METERS:'}, {'fieldName': 'description', 'isEditable': false, 'label': 'CANAL DESCRIPTION:'}, {'fieldName': 'status_work', 'isEditable': true, 'tooltip': 'WORK PROGRESS', 'label': 'WORK PROGRESS STATUS:'}, {'fieldName': 'la_status', 'isEditable': true, 'tooltip': 'LAND AQUISITION', 'label': 'LAND AQUISITION STATUS:'}, {'fieldName': 'ip_status', 'isEditable': true, 'tooltip': 'IP CREATED', 'label': 'IP CREATED STATUS:'} ] } ]; var attInspector = new AttributeInspector({ layerInfos: layerInfos }, domConstruct.create("div")); //add a save button next to the delete button var saveButton = new Button({ label: "Save", "class": "saveButton"},domConstruct.create("div")); domConstruct.place(saveButton.domNode, attInspector.deleteBtn.domNode, "after"); saveButton.on("click", function() { updateFeature.getLayer().applyEdits(null, [updateFeature], null); }); attInspector.on("attribute-change", function(evt) { //store the updates to apply when the save button is clicked updateFeature.attributes[evt.fieldName] = evt.fieldValue; }); attInspector.on("next", function(evt) { updateFeature = evt.feature; console.log("Next " + updateFeature.attributes.objectid); }); attInspector.on("delete", function(evt) { evt.feature.getLayer().applyEdits(null, null, [evt.feature]); map.infoWindow.hide(); }); map.infoWindow.setContent(attInspector.domNode); map.infoWindow.resize(350, 240); } }); </script> </head> <body class="claro"> <div data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'headline', gutters:false" style="width:100%;height:100%;"> <div id="detailPane" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'"> Click a field to display the attribute inspector with customized fields. </div> <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'" id="mapDiv"></div> </div> </body> </html>
... View more
08-31-2015
03:08 AM
|
0
|
14
|
5133
|
|
POST
|
Hi all, I am trying to implement attribute edit using attribute inspector, the service is displaying but pop up info not getting displayed. If the problem is with the proxy setting, can anybody help with it. i am using IIS server. here is the code <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices--> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>Editable FeatureLayer in Selection Only Mode with Attribute Inspector</title> <link rel="stylesheet" href="http://js.arcgis.com/3.14/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.14/esri/css/esri.css"> <style> html, body { height: 100%; width: 100%; margin: 0; padding: 0; overflow: hidden; } #mapDiv{ margin: 0; padding:0; } #detailPane{ height:20px; color:#570026; font-size:12pt; font-weight:600; overflow:hidden; } .dj_ie .infowindow .window .top .right .user .content { position: relative; } .dj_ie .simpleInfoWindow .content {position: relative;} .esriAttributeInspector {height:100px;} .esriAttributeInspector .atiLayerName {display:none;} .esriAttributeInspector .atiButton{ margin-top:1px; margin-right:45px; } </style> <script src="http://js.arcgis.com/3.14/"></script> <script> var map; var updateFeature; require([ "esri/map", "esri/layers/FeatureLayer", "esri/dijit/AttributeInspector", "esri/symbols/SimpleLineSymbol", "esri/symbols/SimpleFillSymbol", "esri/Color", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/config", "esri/tasks/query", "dojo/query", "dojo/parser", "dojo/dom-construct", "dijit/form/Button", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!" ], function( Map, FeatureLayer, AttributeInspector, SimpleLineSymbol, SimpleFillSymbol, Color, ArcGISDynamicMapServiceLayer, esriConfig, Query,dojoQuery, parser, domConstruct, Button ) { parser.parse(); // refer to "Using the Proxy Page" for more information: https://developers.arcgis.com/javascript/jshelp/ags_proxy.html // esriConfig.defaults.io.proxyUrl = "/proxy/"; map = new Map("mapDiv", { basemap: "streets", center: [78.20, 19.00], zoom: 11 }); map.on("layers-add-result", initSelectToolbar); var petroFieldsMSL = new ArcGISDynamicMapServiceLayer("http://gisserver.cgg.gov.in/arcgis/rest/services/IRR/srsp_canal_WRK1/MapServer"); petroFieldsMSL.setDisableClientCaching(true); map.addLayer(petroFieldsMSL); var petroFieldsFL = new FeatureLayer("http://gisserver.cgg.gov.in/arcgis/rest/services/IRR/srsp_canal_WRK1/FeatureServer/1", { mode: FeatureLayer.MODE_SELECTION, outFields: ["objectid","code", "codename", "length", "description", "status_work", "la_status", "ip_status"] }); var selectionSymbol = new SimpleFillSymbol( SimpleFillSymbol.STYLE_NULL, new SimpleLineSymbol( "solid", new Color("yellow"), 2 ), null ); petroFieldsFL.setSelectionSymbol(selectionSymbol); petroFieldsFL.on("edits-complete", function() { petroFieldsMSL.refresh(); }); map.addLayers([petroFieldsFL]); function initSelectToolbar(evt) { var petroFieldsFL = evt.layers[1].layer; var selectQuery = new Query(); map.on("click", function(evt) { selectQuery.geometry = evt.mapPoint; petroFieldsFL.selectFeatures(selectQuery, FeatureLayer.SELECTION_NEW, function(features) { if (features.length > 0) { //store the current feature updateFeature = features[0]; map.infoWindow.setTitle(features[0].getLayer().name); map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint)); } else { map.infoWindow.hide(); } }); }); map.infoWindow.on("hide", function() { petroFieldsFL.clearSelection(); }); var layerInfos = [ { 'featureLayer': petroFieldsFL, 'showAttachments': false, 'isEditable': true, 'fieldInfos': [ {'fieldName': 'objectid', 'isEditable': false, 'objectid': 'objectid:'}, {'fieldName': 'code', 'isEditable': false, 'CANAL CODE': 'Acreage:'}, {'fieldName': 'codename', 'isEditable': false, 'label': 'CANAL NAME:'}, {'fieldName': 'length', 'isEditable': false, 'label': 'LENGTH IN METERS:'}, {'fieldName': 'description', 'isEditable': false, 'label': 'CANAL DESCRIPTION:'}, {'fieldName': 'status_work', 'isEditable': true, 'tooltip': 'WORK PROGRESS', 'label': 'WORK PROGRESS STATUS:'}, {'fieldName': 'la_status', 'isEditable': true, 'tooltip': 'LAND AQUISITION', 'label': 'LAND AQUISITION STATUS:'}, {'fieldName': 'ip_status', 'isEditable': true, 'tooltip': 'IP CREATED', 'label': 'IP CREATED STATUS:'} ] } ]; var attInspector = new AttributeInspector({ layerInfos: layerInfos }, domConstruct.create("div")); //add a save button next to the delete button var saveButton = new Button({ label: "Save", "class": "saveButton"},domConstruct.create("div")); domConstruct.place(saveButton.domNode, attInspector.deleteBtn.domNode, "after"); saveButton.on("click", function() { updateFeature.getLayer().applyEdits(null, [updateFeature], null); }); attInspector.on("attribute-change", function(evt) { //store the updates to apply when the save button is clicked updateFeature.attributes[evt.fieldName] = evt.fieldValue; }); attInspector.on("next", function(evt) { updateFeature = evt.feature; console.log("Next " + updateFeature.attributes.objectid); }); attInspector.on("delete", function(evt) { evt.feature.getLayer().applyEdits(null, null, [evt.feature]); map.infoWindow.hide(); }); map.infoWindow.setContent(attInspector.domNode); map.infoWindow.resize(350, 240); } }); </script> </head> <body class="claro"> <div data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'headline', gutters:false" style="width:100%;height:100%;"> <div id="detailPane" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'"> Click a field to display the attribute inspector with customized fields. </div> <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'" id="mapDiv"></div> </div> </body> </html>
... View more
08-31-2015
02:56 AM
|
0
|
1
|
3410
|
|
POST
|
Hi thejus kambi, I did get you. But my question is as in the example app.fields does not conatin "STATE_NAME", "NAME" but app.outFields does have "STATE_NAME", "NAME" which is used in layer def app.layerDef = "STATE_NAME = 'Washington'"; as well as pop up definition app.popupTemplate = new PopupTemplate({ title: "{NAME} County", which when i use app.outFields = ["sde.sde.CONST_WISE_HOUSING.total_bens", "sde.sde.CONST_WISE_HOUSING.sc", "sde.sde.CONST_WISE_HOUSING.st", "sde.sde.CONST_WISE_HOUSING.bc", "sde.sde.CONST_WISE_HOUSING.others", "sde.sde.CONST_WISE_HOUSING.bbl", "sde.sde.CONST_WISE_HOUSING.bl", "sde.sde.CONST_WISE_HOUSING.ll", "sde.sde.CONST_WISE_HOUSING.rl", "sde.sde.CONST_WISE_HOUSING.completion", "sde.sde.AP_Const.asmbname"]; is not working why so ? Generate renderer | ArcGIS API for JavaScript app.fields = { "POP2007": "Population(2007)", "POP07_SQMI": "Population/Square Mile(2007)", "WHITE": "White", "BLACK": "Black", "AMERI_ES": "Native Americans", "HISPANIC": "Hispanic", "ASIAN": "Asian", "HAWN_PI": "Native Hawaiian/Pacific Islander", "MULT_RACE": "Multiple Races", "OTHER": "Other" }; app.map = new Map("map", { center: [-123.113, 47.035], zoom: 7, slider: false }); var basemap = new ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer"); app.map.addLayer(basemap); var ref = new ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer"); app.map.addLayer(ref); // various info for the feature layer app.countiesUrl = "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/2"; app.layerDef = "STATE_NAME = 'Washington'"; app.outFields = ["POP2007", "POP07_SQMI", "WHITE", "BLACK", "AMERI_ES", "ASIAN", "HAWN_PI", "OTHER", "MULT_RACE", "HISPANIC", "STATE_NAME", "NAME"]; app.currentAttribute = "POP2007"; app.popupTemplate = new PopupTemplate({ title: "{NAME} County", fieldInfos: [{ "fieldName": app.currentAttribute, "label": app.fields[app.currentAttribute], "visible": true, "format": { places: 0, digitSeparator: true } }], showAttachments:true }); Thanks Satya.
... View more
07-23-2015
10:25 PM
|
0
|
2
|
1582
|
|
POST
|
Hi, When i add "sde.sde.AP_Const.asmbname" to out fields, drop down not working, It only showing the initialized field based rendering but showing an error with filtering Select in the console. its working quite well here Generate renderer | ArcGIS API for JavaScript app.outFields = ["POP2007", "POP07_SQMI", "WHITE", "BLACK", "AMERI_ES", "ASIAN", "HAWN_PI", "OTHER", "MULT_RACE", "HISPANIC", "STATE_NAME", "NAME"]; My version app.outFields = ["sde.sde.CONST_WISE_HOUSING.total_bens", "sde.sde.CONST_WISE_HOUSING.sc", "sde.sde.CONST_WISE_HOUSING.st", "sde.sde.CONST_WISE_HOUSING.bc", "sde.sde.CONST_WISE_HOUSING.others", "sde.sde.CONST_WISE_HOUSING.bbl", "sde.sde.CONST_WISE_HOUSING.bl", "sde.sde.CONST_WISE_HOUSING.ll", "sde.sde.CONST_WISE_HOUSING.rl", "sde.sde.CONST_WISE_HOUSING.completion", "sde.sde.AP_Const.asmbname"]; when i add this sde.sde.AP_Const.asmbname the dropdown list is almost disabled. when i remove the sde.sde.AP_Const.asmbname from outfields everything works fine but the identity does not reflect the sde.sde.AP_Const.asmbname name. Thanks, satya
... View more
07-22-2015
11:59 PM
|
0
|
4
|
1582
|
|
POST
|
Hi, When i add "sde.sde.AP_Const.asmbname" to out fields, drop down not working, It only showing the initialized field based rendering but showing an error with filtering Select in the console. the dropdown list is almost disabled. where am i going wrong. Thanks, satya
... View more
07-21-2015
10:22 PM
|
0
|
6
|
1582
|
|
POST
|
Hi i am using this example exactly to show renedering based on values. https://developers.arcgis.com/javascript/jssamples/renderer_generate_renderer.html app.fields = { "sde.sde.CONST_WISE_HOUSING.total_bens": "Total Beneficiaries", "sde.sde.CONST_WISE_HOUSING.sc": "SC Beneficiaries", "sde.sde.CONST_WISE_HOUSING.st": "ST Beneficiaries", "sde.sde.CONST_WISE_HOUSING.bc": "BC Beneficiaries", "sde.sde.CONST_WISE_HOUSING.others": "Others Beneficiaries" , "sde.sde.CONST_WISE_HOUSING.bbl": "Below Basement Level Stage", "sde.sde.CONST_WISE_HOUSING.bl": "Basement Level Stage", "sde.sde.CONST_WISE_HOUSING.ll": "Lentel Level Stage", "sde.sde.CONST_WISE_HOUSING.rl": "Roof Level Stage", "sde.sde.CONST_WISE_HOUSING.completion":"Completed Stage" }; app.outFields = ["sde.sde.CONST_WISE_HOUSING.total_bens", "sde.sde.CONST_WISE_HOUSING.sc", "sde.sde.CONST_WISE_HOUSING.st", "sde.sde.CONST_WISE_HOUSING.bc", "sde.sde.CONST_WISE_HOUSING.others", "sde.sde.CONST_WISE_HOUSING.bbl", "sde.sde.CONST_WISE_HOUSING.bl", "sde.sde.CONST_WISE_HOUSING.ll", "sde.sde.CONST_WISE_HOUSING.rl", "sde.sde.CONST_WISE_HOUSING.completion", "sde.sde.AP_Const.asmbname"]; When i add "sde.sde.AP_Const.asmbname" to out fields, drop down not working, showing an error with filtering Select where am i going wrong these are the fields sde.sde.AP_Const.objectid ( type: esriFieldTypeOID , alias: objectid ) sde.sde.AP_Const.dname ( type: esriFieldTypeString , alias: dname , length: 30 ) sde.sde.AP_Const.asmbname ( type: esriFieldTypeString , alias: asmbname , length: 30 ) sde.sde.AP_Const.cons_id ( type: esriFieldTypeSmallInteger , alias: cons_id ) sde.sde.AP_Const.shape ( type: esriFieldTypeGeometry , alias: shape ) sde.sde.AP_Const.st_area(shape) ( type: esriFieldTypeDouble , alias: st_area(shape) ) sde.sde.AP_Const.st_length(shape) ( type: esriFieldTypeDouble , alias: st_length(shape) ) sde.sde.CONST_WISE_HOUSING.objectid ( type: esriFieldTypeInteger , alias: objectid ) sde.sde.CONST_WISE_HOUSING.constcode ( type: esriFieldTypeInteger , alias: constcode ) sde.sde.CONST_WISE_HOUSING.total_bens ( type: esriFieldTypeInteger , alias: Total_bens ) sde.sde.CONST_WISE_HOUSING.sc ( type: esriFieldTypeInteger , alias: SC ) sde.sde.CONST_WISE_HOUSING.st ( type: esriFieldTypeInteger , alias: ST ) sde.sde.CONST_WISE_HOUSING.bc ( type: esriFieldTypeInteger , alias: BC ) sde.sde.CONST_WISE_HOUSING.others ( type: esriFieldTypeInteger , alias: others ) sde.sde.CONST_WISE_HOUSING.bbl ( type: esriFieldTypeInteger , alias: BBL ) sde.sde.CONST_WISE_HOUSING.bl ( type: esriFieldTypeInteger , alias: BL ) sde.sde.CONST_WISE_HOUSING.ll ( type: esriFieldTypeInteger , alias: LL ) sde.sde.CONST_WISE_HOUSING.rl ( type: esriFieldTypeInteger , alias: RL ) sde.sde.CONST_WISE_HOUSING.completion ( type: esriFieldTypeInteger , alias: Completion ) sde.sde.AP_Const.state ( type: esriFieldTypeString , alias: sde.sde.AP_Const.state , length: 20 )
... View more
07-20-2015
02:41 AM
|
0
|
8
|
4333
|
|
POST
|
HI Here is my code, where legend does not show anything <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/> <title> </title> <link rel="stylesheet" href="http://js.arcgis.com/3.10/js/dojo/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.10/js/esri/css/esri.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.13/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.13/esri/css/esri.css"> <style type="text/css">body,html,#main{margin:0;padding:0;height:100%;width:100%;}</style> <script src="http://js.arcgis.com/3.13/"></script> <script>dojoConfig = { parseOnLoad: true };</script> <style> html, body { height: 97%; width: 98%; margin: 1%; } #rightPane { width: 90%; } #legendPane { border: solid #97DCF2 1px; } </style> <style> html, body, #map { padding: 0; margin: 0; height: 100%; } /* Change color of icons to match bar chart and selection symbol */ .esriPopup.dark div.titleButton, .esriPopup.dark div.titlePane .title, .esriPopup.dark div.actionsPane .action { color: #000000; font-weight: bold; } /* Additional customizations */ .esriPopup.dark .esriPopupWrapper { border: none; } .esriPopup .contentPane { text-align: left; } .esriViewPopup .gallery { margin: 0 auto; } .title { padding:10px; background:#fafafa; } .title .logo img { float:left; margin-right:10px; } .title .logo h1{ color: #C9584F; padding: 0px; font-size: 30px; font-weight: bold; float:left; font-family:Arial, Helvetica, sans-serif; margin:0px; } .title .logo h1>span{ color: #111; padding: 0px; font-size: 20px; font-weight: bold; } .title .cm { float:right; text-align:center; color: #C9584F; font-size:15px; } .title .cm h2{ color: #C9584F; font-size:15px; font-family:Arial, Helvetica, sans-serif } </style> <script> var map; var veTileLayer; var findTask, findParams; var center, zoom; var grid, store, store3; var county; var resizeTimer; require([ "esri/map", "esri/tasks/query", "dojo/parser", "esri/dijit/Legend", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "esri/tasks/IdentifyTask", "esri/tasks/IdentifyParameters", "dojo/_base/array","dojo/DeferredList", "dijit/form/ComboBox", "dojo/data/ItemFileReadStore","dojo/store/Memory", "esri/virtualearth/VETiledLayer", "dijit/form/Button", "esri/tasks/FindTask", "esri/tasks/FindParameters", "esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleLineSymbol", "dijit/registry", "dojo/_base/connect", "dojox/grid/DataGrid", "esri/dijit/Popup", "esri/dijit/PopupTemplate", "esri/layers/FeatureLayer", "esri/symbols/SimpleFillSymbol", "esri/Color", "dojo/dom-class", "dojo/dom-construct", "dojox/charting/Chart", "dojox/charting/themes/Dollar", "dojo/on", "dijit/layout/AccordionContainer", "dojo/domReady!"], function(Map, query, parser, BorderContainer, ContentPane, Legend, IdentifyTask, IdentifyParameters,arrayUtils,DeferredList, ComboBox, ItemFileReadStore, Memory, VETiledLayer, Button, FindTask, FindParameters, SimpleMarkerSymbol, SimpleLineSymbol, registry, connect, DataGrid, Popup, PopupTemplate, FeatureLayer, SimpleFillSymbol, Color, domClass, domConstruct, Chart, theme, on, Scalebar) { parser.parse(); registry.byId("mySelect1").on("change", doFind); /* map = new Map("map"); function init() { //Creates the Virtual Earth layer to add to the map //Example for adding a Bing Maps key // bingMapsKey: "1B2C3OlkbxWHYa1b2c3qkPrO_Ou3nRrGtSa_5Op-xvPNya1b2c3", veTileLayer = new esri.virtualearth.VETiledLayer({ bingMapsKey:'Ame5R45lEOTdPXxlhxuAXN2sDT8vyEJcgXGeZpPOPHBLbg2XqkPMaL5OJHp0OlV0', mapStyle: esri.virtualearth.VETiledLayer.MAP_STYLE_AERIAL }); map.addLayer(veTileLayer); infoWindow: popup } dojo.ready(init);*/ var fill = new SimpleFillSymbol("solid", null, new Color("#A4CE67")); var popup = new Popup({ fillSymbol: fill, titleInBody: false }, domConstruct.create("div")); //Add the dark theme which is customized further in the <style> tag at the top of this page domClass.add(popup.domNode, "dark"); findTask = new FindTask("http://gisserver.cgg.gov.in/arcgis/rest/services/CDMA/swachhts/MapServer/"); map = new Map("map", { basemap: "satellite", /*center: [-122.45, 37.75], // longitude, latitude */ center : [79.2, 18.10], zoom: 6, infoWindow: popup }); var template = new PopupTemplate({ title: "SWACHH TELANGANA APPLICANTS <BR>", description: "<BR>BENEFICIARY ID: {beneficiary_id} <br> <br>BENEFICIARY NAME: {applicant_name} <br><br>FATHERS NAME: {fathername}<br><br> ADDRESS: {address} <br><br> CASTE: {caste} <br> <br> MOBILE: {mobile} <br><br> AADHAR NO:: {aadhar_number}<br><br> COMMUNICATION STATUS: {comm_status} <br><br> PHOTO: <a href=http://swachhts.cgg.gov.in/photos_uploaded/{applicant_photo} > <img src={applicant_photo} WIDTH=200 HEIGHT=200></a> <br><br> SITE PHOTO : <a href=http://swachhts.cgg.gov.in/photos_uploaded/{applicant_site_photo} > <img src={applicant_site_photo} WIDTH=200 HEIGHT=200></a> <br><br> STAGE : {stage}<br>", }); var featureLayer = new FeatureLayer("http://gisserver.cgg.gov.in/arcgis/rest/services/CDMA/swachhts/MapServer/0",{ mode: FeatureLayer.MODE_ONDEMAND, outFields: ["*"], infoTemplate: template }); var rivers = new FeatureLayer("http://gisserver.cgg.gov.in/arcgis/rest/services/CDMA/swachhts/MapServer/0", { mode: FeatureLayer.MODE_ONDEMAND, outFields:["*"] }); var waterbodies = new FeatureLayer("http://gisserver.cgg.gov.in/arcgis/rest/services/CDMA/swachhts/MapServer/2", { mode: FeatureLayer.MODE_ONDEMAND, outFields:["*"] }); veTileLayer = new VETiledLayer({ bingMapsKey:'Ame5R45lEOTdPXxlhxuAXN2sDT8vyEJcgXGeZpPOPHBLbg2XqkPMaL5OJHp0OlV0', mapStyle: esri.virtualearth.VETiledLayer.MAP_STYLE_AERIAL }); map.addLayer(veTileLayer); //map.addLayer(featureLayer); var polygonQuery = null; var polygonQueryTask = null; var polygonQuery1 = null; var polygonQueryTask1 = null; // RIYAS: Wait till map is loaded before firing query, needed for getting map spatial reference map.on("load", function () { var queryTask = new esri.tasks.QueryTask("http://gisserver.cgg.gov.in/arcgis/rest/services/CDMA/swachhts/MapServer/2"); highlightSymbol = new esri.symbol.SimpleMarkerSymbol().setColor(new dojo.Color([255,0,0])); symbol321 = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_SQUARE, 0.1, null, new Color([255, 255, 0, 0.5])); // var queryTask1 = new esri.tasks.QueryTask("http://gisserver.cgg.gov.in/arcgis/rest/services/sample/pattasample/MapServer/2"); //Define query parameters var query = new esri.tasks.Query(); query.outFields = ["dname"]; query.returnGeometry = true; query.outSpatialReference = map.spatialReference; // RIYAS: Set query to return shape in map's spatial reference query.where = "dname <> ''" queryTask.execute(query,populateList); //Define query parameters /*var query1 = new esri.tasks.Query(); query1.outFields = ["dname", "mname"]; query1.returnGeometry = true; query1.outSpatialReference = map.spatialReference; // RIYAS: Set query to return shape in map's spatial reference query1.where = "mname<> ''" queryTask1.execute(query1,populateList1);*/ // RIYAS: Setup query to behave as identify polygonQueryTask = new esri.tasks.QueryTask("http://gisserver.cgg.gov.in/arcgis/rest/services/CDMA/swachhts/MapServer/2"); polygonQuery = new esri.tasks.Query(); polygonQuery.returnGeometry = true; polygonQuery.outFields = ["dname"]; polygonQuery.spatialRelationship = esri.tasks.Query.SPATIAL_REL_INTERSECTS; polygonQuery.outSpatialReference = map.spatialReference; // RIYAS: Setup query to behave as identify polygonQueryTask1 = new esri.tasks.QueryTask("http://gisserver.cgg.gov.in/arcgis/rest/services/CDMA/swachhts/MapServer/1"); polygonQuery1 = new esri.tasks.Query(); polygonQuery1.returnGeometry = true; polygonQuery1.outFields = ["place", "name"]; polygonQuery1.spatialRelationship = esri.tasks.Query.SPATIAL_REL_INTERSECTS; polygonQuery1.outSpatialReference = map.spatialReference; // RIYAS: Setup query to behave as identify findParams = new FindParameters(); findParams.returnGeometry = true; findParams.layerIds = [0]; findParams.searchFields = ["town_city"]; findParams.outSpatialReference = map.spatialReference; console.log("find sr: ", findParams.outSpatialReference); }); var infoTemplate = new esri.InfoTemplate("District: ${dname}", "District : ${dname}<br/>"); var infoTemplate1 = new esri.InfoTemplate("DISTRICT: ${place}", "District : ${place}<br/> Mandal : ${name}<br/> "); var infoTemplates = [infoTemplate, infoTemplate1]; //map.on("click", executeIdentifyTask); // RIYAS: Execute query to behave as identify function executeIdentifyTask (where, pnt) { //polygonQuery.where = event.mapPoint; //polygonQuery1.where = event.mapPoint; polygonQuery.where = where; polygonQuery1.where = where; var deferred = polygonQueryTask .execute(polygonQuery); var deferred1 = polygonQueryTask1 .execute(polygonQuery1); // InfoWindow expects an array of features from each deferred // object that you pass. If the response from the task execution // above is not an array of features, then you need to add a callback // like the one above to post-process the response and return an // array of features. var defList = new DeferredList([deferred, deferred1]).then(function (results){ var features = []; arrayUtils.forEach(results,function(result, idx){ if (result[0] === true){ features = features.concat(arrayUtils.map(result[1].features, function (feature) { feature.setInfoTemplate(infoTemplates[idx]); return feature; })); } }); map.infoWindow.setFeatures(features); map.infoWindow.show(pnt); }); } //var initialExtent = new esri.geometry.Extent(-85.915,38.105,-85.52,38.33, // new esri.SpatialReference({wkid:4326}) ); // map = new esri.Map("map", {extent:initialExtent}); //Create tiled and dynamic map services and add to the map - for the dynamic service set the transparency //and provide an id so we can access it later // map.addLayer(new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer")); map.addLayer(new esri.layers.ArcGISDynamicMapServiceLayer("http://gisserver.cgg.gov.in/arcgis/rest/services/CDMA/swachhts/MapServer", {"opacity":1,"id":"dynamic"})); function populateList(results) { //initialize InfoTemplate //create symbol for selected features symbol = new esri.symbol.SimpleMarkerSymbol(); symbol.setStyle(esri.symbol.SimpleMarkerSymbol.STYLE_SQUARE); symbol.setSize(0.1); symbol.setColor(new dojo.Color([255, 255, 0, 0.5])); //Populate the dropdown list box with unique values // var county; var values = []; var testVals={}; //Add option to display all zoning types to the dropdown list values.push({name:""}) var features = results.features; dojo.forEach (features, function(feature) { county = feature.attributes.dname; if (!testVals[county]) { testVals[county] = true; values.push({name:county,shape:feature.geometry,centroid: feature.geometry.type === "point" ? feature.geometry : feature.geometry.getCentroid() }); // RIYAS: set shape to list store } }); var dataItems = { identifier: 'name', label: 'name', items: values }; var store = new dojo.store.Memory({data:dataItems}); dijit.byId("mySelect").store = store; //remove all graphics on the maps graphics layer map.graphics.clear(); //Performance enhancer - assign featureSet array to a single variable. var resultFeatures = results.features; //Loop through each feature returned for (var i = 0, il = resultFeatures.length; i < il; i++) { //Get the current feature from the featureSet. //Feature is a graphic var graphic = resultFeatures; graphic.setSymbol(symbol); //Set the infoTemplate. graphic.setInfoTemplate(infoTemplate); //Add graphic to the map graphics layer. map.graphics.add(graphic); // This takes the graphics array you get back from your query and // gets the overall extent for them. Make sure return geometry is set to // true in your query. var extent = esri.graphicsExtent(results.features); // Use that to set the extent, 1.5 is something I use in my app, but play with // it to find a setting you like, setting the second parameter to true will get you an extend // that is at the closest level of your cached service. map.setExtent(extent.expand(1.0), true); } } // this replaces your applyLayerDef() function dijit.byId("mySelect").on("change", function () { //Filter the layer to display only the selected zoning types var county = dijit.byId("mySelect").value; var centroid = dijit.byId("mySelect").item.centroid; if (county !== 'ALL') { var layerDefs = []; layerDefs[2] = "dname = " + "'" + county + "'"; layerDefs.visibleLayers = [2]; map.setExtent(dijit.byId("mySelect").item.shape.getExtent(infoTemplate).expand(1.7)); // RIYAS: Get shape from list store and zoom to its extent executeIdentifyTask("dname = '" + county + "'", centroid); // RIYAS: cannot set layer defintion for dynamic map service. //map.getLayer("dynamic").setLayerDefinitions(layerDefs); } else { // RIYAS: cannot set layer defintion for dynamic map service. //map.getLayer("dynamic").setDefaultLayerDefinitions(); } var queryTask1 = new esri.tasks.QueryTask("http://gisserver.cgg.gov.in/arcgis/rest/services/CDMA/swachhts/MapServer/1"); var query1 = new esri.tasks.Query(); query1.outFields = ["*"]; query1.returnGeometry = true; query1.outSpatialReference = map.spatialReference; // RIYAS: Set query to return shape in map's spatial reference query1.where = "name <> '' and place ='"+dijit.byId("mySelect").value+"'" queryTask1.execute(query1,populateList1); }); function populateList1(results1) { //initialize InfoTemplate /* alert(dijit.byId("mySelect").value) var query1 = new esri.tasks.Query(); query1.outFields = ["dname", "mname"]; query1.returnGeometry = true; query1.outSpatialReference = map.spatialReference; // RIYAS: Set query to return shape in map's spatial reference query1.where = "mname<> ''" queryTask1.execute(query1,populateList1); */ //create symbol for selected features symbol1 = new esri.symbol.SimpleMarkerSymbol(); symbol1.setStyle(esri.symbol.SimpleMarkerSymbol.STYLE_SQUARE); symbol1.setSize(0.1); symbol1.setColor(new dojo.Color([255, 255, 0, 0.5])); //Populate the dropdown list box with unique values var city; var values1 = []; var testVals1={}; //Add option to display all zoning types to the dropdown list values1.push({name:""}) var features1 = results1.features; dojo.forEach (features1, function(feature1) { city = feature1.attributes.name; if (!testVals1[city]) { testVals1[city] = true; values1.push({name:city,shape:feature1.geometry,centroid: feature1.geometry.type === "point" ? feature1.geometry : feature1.geometry.getCentroid()}); // RIYAS: set shape to list store } }); var dataItems1 = { identifier: 'name', label: 'name', items: values1 }; var store1 = new dojo.store.Memory({data:dataItems1}); dijit.byId("mySelect1").store = store1; //remove all graphics on the maps graphics layer map.graphics.clear(); //Performance enhancer - assign featureSet array to a single variable. var resultFeatures1 = results1.features; //Loop through each feature returned for (var i = 0, il = resultFeatures1.length; i < il; i++) { //Get the current feature from the featureSet. //Feature is a graphic var graphic1 = resultFeatures1; graphic1.setSymbol(symbol1); //Set the infoTemplate. graphic1.setInfoTemplate(infoTemplate1); //Add graphic to the map graphics layer. map.graphics.add(graphic1); // This takes the graphics array you get back from your query and // gets the overall extent for them. Make sure return geometry is set to // true in your query. var extent1 = esri.graphicsExtent(results1.features); // Use that to set the extent, 1.5 is something I use in my app, but play with // it to find a setting you like, setting the second parameter to true will get you an extend // that is at the closest level of your cached service. map.setExtent(extent1.expand(1.0), true); } } // this replaces your applyLayerDef() function dijit.byId("mySelect1").on("change", function () { //Filter the layer to display only the selected zoning types var city = dijit.byId("mySelect1").value; var centroid = dijit.byId("mySelect1").item.centroid; if (city !== 'ALL') { var layerDefs1 = []; layerDefs1[2] = "name = " + "'" + city + "'"; layerDefs1.visibleLayers = [2]; //alert(dijit.byId("mySelect1").value) map.setExtent(dijit.byId("mySelect1").item.shape.getExtent(infoTemplate1).expand(1.7)); // RIYAS: Get shape from list store and zoom to its extent executeIdentifyTask("name = '" + city + "'", centroid); // RIYAS: cannot set layer defintion for dynamic map service. //map.getLayer("dynamic").setLayerDefinitions(layerDefs); } else { // RIYAS: cannot set layer defintion for dynamic map service. //map.getLayer("dynamic").setDefaultLayerDefinitions(); } }); function doFind() { //Set the search text to the value in the box var house = dijit.byId("mySelect1").value; //alert(house) findParams.searchText = house; findTask.execute(findParams, showResults); } function showResults(results) { map.graphics.clear(); //This function works with an array of FindResult that the task returns symbol = new esri.symbol.SimpleMarkerSymbol(); symbol.setStyle(esri.symbol.SimpleMarkerSymbol.STYLE_SQUARE); symbol.setSize(1); symbol.setColor(new dojo.Color([255, 255, 0, 0.5])); // map.graphics.clear(); // var symbol = new SimpleFillSymbol( // SimpleFillSymbol.STYLE_SOLID, // new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([98, 194, 204]), 2), // new Color([98, 194, 204, 0.5]) // ); //create array of attributes var items = arrayUtils.map(results, function (result) { var graphic = result.feature; graphic.setSymbol(symbol); map.graphics.add(graphic); return result.feature.attributes; }); //Create data object to be used in store var data = { identifier : "beneficiary_id", //This field needs to have unique values label : "beneficiary_id", //Name field for display. Not pertinent to a grid but may be used elsewhere. items : items }; //Create data store and bind to grid. store = new ItemFileReadStore({ data : data }); var grid = registry.byId("grid"); grid.setStore(store); grid.on("rowclick", onRowClickHandler); //Zoom back to the initial map extent map.centerAndZoom(center, zoom); } /* function onRowClickHandler(evt) { map.graphics.clear(); var clickedTaxLotId = evt.grid.getItem(evt.rowIndex).benid; var selectedTaxLot = arrayUtils.filter(map.graphics.graphics, function (graphic) { return ((graphic.attributes) && graphic.attributes.benid === clickedTaxLotId[0]); }); if ( selectedTaxLot.length ) { map.setExtent(selectedTaxLot[0].geometry.getExtent(), true); } }*/ function onRowClickHandler(evt){ var FindDeceasedName = grid.getItem(evt.rowIndex).beneficiary_id; var SelectedFindDeceasedName; dojo.forEach(map.graphics.graphics,function(graphic){ graphic.setSymbol(symbol321); if((graphic.attributes) && graphic.attributes.beneficiary_id === FindDeceasedName){ SelectedFindDeceasedName = graphic; SelectedFindDeceasedName.setSymbol(highlightSymbol); return; } }); var FindDeceasedNameExtent = SelectedFindDeceasedName.geometry; var factor = -200; var extent; extent = new esri.geometry.Extent({ "xmin": FindDeceasedNameExtent.x - factor, "ymin": FindDeceasedNameExtent.y - factor, "xmax": FindDeceasedNameExtent.x + factor, "ymax": FindDeceasedNameExtent.y + factor, "spatialReference": { "wkid": 3857} }); map.setExtent(extent); } function resizeMap() { //Handle browser resize clearTimeout(resizeTimer); resizeTimer = setTimeout(function() { map.resize(); map.reposition(); }, 800); } map.on("layers-add-result", function (evt) { var layerInfo = arrayUtils.map(evt.layers, function (layer, index) { return {layer:layer.layer, title:layer.layer.name}; }); if (layerInfo.length > 0) { var legendDijit = new Legend({ map: map, layerInfos: layerInfo }, "legendDiv"); legendDijit.startup(); } }); map.addLayers([waterbodies, rivers]); // map.addLayer(featureLayer); }); </script> </head> <body class="claro" oncontextmenu="return false"> <div class="title"> <div class="logo"> <a href="http://swachhts.cgg.gov.in/Login.do"><img src="http://elandts.cgg.gov.in:80/website/images/TSlogo.png" width="80" height="80" alt="logo"/> <h1> Swachh Bharat - Swachh Telangana <br><span>Commissioner & Director of Municipal Administration, Government of Telangana </span> </h1> </a> </div> <div class="logo"> <a href="http://swachhts.cgg.gov.in/Login.do"><img src="http://swachhts.cgg.gov.in:80/images/SBM-Logo.png" width="100" height="80" alt="logo"/> </a> </div> <div class="logo"> <a href="http://swachhts.cgg.gov.in/Login.do"><img src="http://swachhts.cgg.gov.in:80/images/swts_logo.png" width="100" height="80" alt="logo"/> </a> </div> <div class="cm"> <div class="pull-right"> <img src="http://elandts.cgg.gov.in:80/website/images/cm.png" style="" class="img-responsive" alt="cm" width="50"/> <br> <h2> Sri K.Chandrasekhar Rao <br> <span> Hon'ble Chief Minister of Telangana</span> </h2> </div> </div> <br clear="all"> </div> <div id="main" style="width:2024px; height:800px; border:1px solid #000;" dojotype="dijit.layout.BorderContainer" design="headline" gutters="true"> <div id="header" dojotype="dijit.layout.ContentPane" region="left" style="height:25px;"> <select id="mySelect" dojotype="dijit.form.ComboBox" style="width:200px;font-size:18px;" autoComplete="true" forceValidOption="false" value="Select a District"></select> <BR> <BR> <select id="mySelect1" dojotype="dijit.form.ComboBox" style="width:200px;font-size:18px;" autoComplete="true" forceValidOption="false" value="Select a Town"></select> <BR> <BR> <button data-dojo-type="dijit.form.Button" onClick="veTileLayer.setMapStyle(esri.virtualearth.VETiledLayer.MAP_STYLE_AERIAL);">Aerial</button> <button data-dojo-type="dijit.form.Button" onClick="veTileLayer.setMapStyle(esri.virtualearth.VETiledLayer.MAP_STYLE_AERIAL_WITH_LABELS)">Aerial with labels</button><BR> <BR> <!--<button data-dojo-type="dijit.form.Button" onClick="veTileLayer.setMapStyle(esri.virtualearth.VETiledLayer.MAP_STYLE_ROAD)">Roads</button>--> <div id="content" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'headline', gutters:true" style="width: 100%; height: 50%; margin: 0;"> <div id="rightPane" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'right'"> <div data-dojo-type="dijit/layout/AccordionContainer"> <div data-dojo-type="dijit/layout/ContentPane" id="legendPane" data-dojo-props="title:'Legend', selected:true"> <div id="legendDiv"></div> </div> <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="title:'Pane 2'"> This pane could contain tools or additional content </div> </div> </div> </div> </div> <div id="map" dojotype="dijit.layout.ContentPane" region="center" style="border:1px solid #000;margin:5px"> </div> </div> <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'bottom'" style="height:150px;"> <table data-dojo-type="dojox/grid/DataGrid" data-dojo-id="grid" id="grid" data-dojo-props="rowsPerPage:'6', rowSelector:'10px'"> <thead> <tr> <th field="beneficiary_id" width="25%">BENEFICIARY ID</th> <th field="applicant_name" width="25%">APPLICANT NAME</th> <th field="fathername" width="25%">FATHERS NAME</th> <th field="aadhar_number" width="25%">AADHAR NO </th> <th field="stage" width="25%">STAGE</th> <th field="caste" width="25%">CASTE</th> </tr> </thead> </table> </div> </div> <div style="position:relative;"> </div> </body> </html>
... View more
07-08-2015
10:31 PM
|
0
|
3
|
3582
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-18-2016 11:19 PM | |
| 1 | 06-30-2015 01:49 AM | |
| 2 | 07-08-2015 11:38 PM |
| Online Status |
Offline
|
| Date Last Visited |
07-16-2025
02:21 AM
|