|
POST
|
Dear Robert domconstruct.create("rd"+(n-1), {innerHTML:"<input type=radio name=AndOR"+(n-1)+" "+"id="+"radioAnd"+(n-1)+" "+"Checked value=And/> <label for=radioAnd>And</label>" +"<input type=radio name=AndOR"+(n-1)+" "+"id="+"radioOr"+(n-1)+"value=OR/> <label for=radioOr>OR</label>" +"<select id=cmbSelect"+(n-1) + "data-dojo-type=dijit/form/Select style=width:310px;height:25px;margin-top:10px;margin-left:10px;>" +"<option value=TN>Tennessee</option>" +"<option value=VA selected=selected>Virginia</option>" +"<option value=WA>Washington</option>" +"<option value=FL>Florida</option>" +"<option value=CA>California</option>" +"</select>" +"<input data-dojo-type=dijit/form/TextBox id=txtDistance"+(n-1)+" "+"style=width:55px;height:25px;margin-left5px;border:solid;visibility:hidden;/>" + "\n" the above code i am calling on button click event.some time user click once some time 5 and some time more than 10.how to call this event this.SourceCombo.watch('displayedValue', lang.hitch(this, this.cbChangedHandler, "SourceCombo"));. what will be the source combo.i think i should first get the dijit/form/Select from the widget in an array.then i get one by one in var and then apply the change event.,
... View more
02-12-2019
07:36 AM
|
0
|
3
|
2792
|
|
POST
|
Dear Robert this.SourceCombo.watch('displayedValue', lang.hitch(this, this.cbChangedHandler, "SourceCombo")); I have 20 digit.form.select. All of them i create at runtime.the above line i have to write 20 times.in jquery i just call change event with some class name once.Any of combobox i change select value this event call.this i get the id of combobox and after this i call my buissness function.In this function my user create comboboxes runtime some time 2 some time 5 and some more than 10.here sourcecombo is the id of combo.but i want some generalise way.i dont want to put the name of combo everytime.i want some help like i explain to you.
... View more
02-12-2019
07:08 AM
|
0
|
5
|
2792
|
|
POST
|
Dear All, i have more than 20 dijit/form/Select on my widget.some time user select only 2 and some time 5 and some time all 20.All are dynamically created.i dont want to write the change event for all dijit/form/Select controls one by one.I want there should be one change event that should i call for all and after this i check the ID of the dijit/form/Select control and call the proper function according to ID.in jquery i have performed this.But in dojo and custom widget in web app builder,i dont know how to acheive this task.if this is possible how to to perform.Thanks in advance.
... View more
02-12-2019
04:03 AM
|
0
|
7
|
3983
|
|
POST
|
i have two user defined functions.When i declare and call them i get this error.i dont know why it is happening .please help or suggest me how to declare function inside a web app builder widget. Thanks. startup: function() { this.inherited(arguments); var panel = this.getPanel(); panel.position.width = 260; panel.position.height = 300; panel.setPosition(panel.position); panel.panelManager.normalizePanel(panel); this.FieldsCombo.watch('displayedValue', lang.hitch(this, function(property, oldValue, newValue) { alert(oldValue+"_________"+newValue); this.getDistinctValues("https://localhost:6443/arcgis/rest/services/BaseMap/MapServer/"+_strSourceLayer,newValue);---------------------->Error on this line })); }, getDistinctValues: function (strURL,strFieldName){ this.getFeatuers(strURL,"1=1", [strFieldName],function(_target){------> Error on this line for(var i = 0; i < _target.features.length; i++){ var feat=_target.features; alert(feat[strFieldName]); } }); }, getFeatuers: function (URL,where,OUTFields,callback ){ var query = new _Query(); var queryTask = new _QueryTask( URL); query.where = where; query.outSpatialReference = _map.spatialReference; query.returnGeometry = true; query.outFields = OUTFields; queryTask.execute(query, callback); }, }); return clazz; });
... View more
02-11-2019
05:42 AM
|
0
|
1
|
2232
|
|
POST
|
<div> <div > <label class="width70" for="SourceCombo" style="margin-top:-20px">Source Layer:</label> <div data-dojo-attach-point="SourceCombo" data-dojo-type="dijit/form/FilteringSelect" data-dojo-props="searchAttr:'Title',intermediateChanges:true,placeHolder: 'Select Source Layer'" class="dijit-form-FilteringSelect" style="width: 360px;height:30px;margin-Left: 10px;margin-top:-10px;"></div> </div> <div> <label class="width70" for="TargetCombo">Target Layer:</label> <div data-dojo-attach-point="TargetCombo" data-dojo-type="dijit/form/FilteringSelect" data-dojo-props="searchAttr:'Title',intermediateChanges:true,placeHolder: 'Select target Layer'" class="dijit-form-FilteringSelect" style="width: 360px;height:30px;margin-Left: 14px;margin-top:1px;"></div> </div> <div> <label class="width70" for="FieldsCombo">Fields:</label> <div data-dojo-attach-point="FieldsCombo" data-dojo-type="dijit/form/FilteringSelect" data-dojo-props="searchAttr:'name',intermediateChanges:true,placeHolder: 'Select Field'" class="dijit-form-FilteringSelect" style="width: 200px;height:30px;margin-Left: 51px;margin-top:5px;"></div> </div> </div>
... View more
02-09-2019
09:23 AM
|
0
|
1
|
2396
|
|
POST
|
var _map, _FeatureLayer, _graphicsUtils, _Draw, _Graphic,_StatisticDefinition, _SimpleMarkerSymbol, _Color, _FindTask,_FindParameters,_SimpleLineSymbol,_geometryEngine, _Query, _QueryTask, _SimpleFillSymbol, _SimpleRenderer,_Point,selectedRegionCode; var URLs = { "RegionServiceUrl":"https://localhost:6443/arcgis/rest/services/BaseMap/MapServer/2", "GovServiceUrl":"https://localhost:6443/arcgis/rest/services/BaseMap/MapServer/1", "CentersServiceUrl":"https://localhost:6443/arcgis/rest/services/BaseMap/MapServer/0", "LocalitiesCentroidUrl": "https://localhost:6443/arcgis/rest/services/MOI/Tables/MapServer/" } var mapLayers = {RegionLayer:[],GovLayer:[],CentersLayer:[]},autoCompleteDataResult=[]; var selectedSymbol,slelctedPolygon,symbolRegion,symbolGov; define(['dojo/_base/declare', 'jimu/BaseWidget','dojo/query',"dijit/form/Select", "esri/layers/FeatureLayer","esri/graphicsUtils", "esri/toolbars/draw", "esri/graphic","esri/tasks/StatisticDefinition","esri/symbols/SimpleMarkerSymbol", "esri/Color","esri/tasks/FindTask", "esri/tasks/FindParameters","esri/symbols/SimpleLineSymbol", "esri/geometry/geometryEngine","esri/tasks/query",'jimu/LayerInfos/LayerInfos',"esri/tasks/QueryTask", "esri/symbols/SimpleFillSymbol","esri/renderers/SimpleRenderer", "esri/geometry/Point",'dojo/store/Memory', "dijit/_WidgetsInTemplateMixin",'dojo/_base/lang',"dojo/data/ObjectStore","esri/request", "dojo/_base/json",'dojo/on',"dojo/dom", "dijit/form/FilteringSelect", 'jimu/loaderplugins/jquery-loader!./JS/jquery.min.js,./JS/jquery-ui.min.js,./JS/bootstrap.min.js,./JS/jsgrid.js,./JS/jsgrid.min.js' ], function(declare,BaseWidget,query,Select,FeatureLayer,graphicsUtils,Draw,Graphic,StatisticDefinition,SimpleMarkerSymbol, Color,FindTask,FindParameters, SimpleLineSymbol,geometryEngine,Query,LayerInfos ,QueryTask,SimpleFillSymbol, SimpleRenderer,Point,Memory,_WidgetsInTemplateMixin,lang,ObjectStore,esriRequest,dojoJson,on,dom) { //To create a widget, you need to derive from BaseWidget. return declare([BaseWidget, _WidgetsInTemplateMixin], { // Custom widget code goes here name: 'SpatialSearchQuery', baseClass: 'jimu-widget-SpatialSearchQuery', postCreate: function() { this.inherited(arguments); console.log('postCreate'); }, startup: function() { this.inherited(arguments); var panel = this.getPanel(); panel.position.width = 260; panel.position.height = 300; panel.setPosition(panel.position); panel.panelManager.normalizePanel(panel); _map = this.map; _FeatureLayer = FeatureLayer; _graphicsUtils = graphicsUtils; _Draw = Draw; _Graphic = Graphic; _StatisticDefinition = StatisticDefinition; _SimpleMarkerSymbol = SimpleMarkerSymbol; _Color = Color; _FindTask = FindTask; _FindParameters = FindParameters; _SimpleLineSymbol = SimpleLineSymbol; _geometryEngine = geometryEngine; _Query = Query; _QueryTask = QueryTask; _SimpleFillSymbol = SimpleFillSymbol; _SimpleRenderer = SimpleRenderer; _Point = Point; var layerInfoArray=[]; var lyrArray=[]; if (this.map.itemId) { LayerInfos.getInstance(this.map, this.map.itemInfo) .then(lang.hitch(this, function(operLayerInfos) { this.operLayerInfos = operLayerInfos; })); } this.operLayerInfos.traversal(lang.hitch(this, function(layerInfo) { layerInfoArray.push(layerInfo); })); for(var k=1;k<layerInfoArray.length;k++) { lyrArray.push({"ID":layerInfoArray .id,"Title":layerInfoArray .title}); } var myStore = new Memory({data: lyrArray}); this.SourceCombo.set('store', myStore); this.TargetCombo.set('store', myStore); //this.SourceCombo.on('change', lang.hitch(this, function(){ // console.log("Hello"); // alert("ffff"); //_getAllFields("Hello"); // })); this.SourceCombo.watch('displayedValue', function(property, oldValue, newValue) { for(var k=0;k<layerInfoArray.length;k++) { if(layerInfoArray .title==newValue) break; } var requestHandle = esriRequest({ "url": "https://localhost:6443/arcgis/rest/services/BaseMap/MapServer/"+k+"?f=pjson", "content": { "tags": "dog,us", "tagmode": "all", "format": "json" }, "handeAs": "json", "callbackParamName": "jsoncallback" }); requestHandle.then(lang.hitch(this, requestSucceeded), requestFailed); function requestSucceeded(response, io){ var fields=(response["fields"]); var FieldStore = new Memory({data: fields}); //var os = new ObjectStore({ objectStore: FieldStore }); this.FieldsCombo.set('store', FieldStore); } function requestFailed(error, io){ alert(dojoJson.toJson(error, true)); } }); }, _getAllFields:function (strLayerName,lyrInfoArray){ alert("In side"+strLayerName); for(var k=1;k<layerInfoArray.length;k++) { if(layerInfoArray .title==strLayerName) { break; } } }, onOpen: function(){ console.log('onOpen'); }, onClose: function(){ console.log('onClose'); }, // onMinimize: function(){ // console.log('onMinimize'); // }, // onMaximize: function(){ // console.log('onMaximize'); // }, // onSignIn: function(credential){ // /* jshint unused:false*/ // console.log('onSignIn'); // }, // onSignOut: function(){ // console.log('onSignOut'); // } // onPositionChange: function(){ // console.log('onPositionChange'); // }, // resize: function(){ // console.log('resize'); // } //methods to communication between widgets: }); });
... View more
02-09-2019
09:21 AM
|
0
|
2
|
2396
|
|
POST
|
Dear Robert, I update the code as per your instructions but same error on same line.i use fieldsCombo with and without this key word.But same error on same place.
... View more
02-09-2019
06:58 AM
|
0
|
4
|
2396
|
|
POST
|
<div> <label class="width70" for="FieldsCombo">Fields:</label> <div data-dojo-attach-point="FieldsCombo" data-dojo-type="dijit/form/FilteringSelect" data-dojo-props="searchAttr:'name',intermediateChanges:true,placeHolder: 'Select Field'" class="dijit-form-FilteringSelect" style="width: 200px;height:30px;margin-Left: 51px;margin-top:5px;"></div> </div> this.SourceCombo.watch('displayedValue', function(property, oldValue, newValue) { for(var k=0;k<layerInfoArray.length;k++) { if(layerInfoArray .title==newValue) { break; } } var requestHandle = esriRequest({ "url": "https://localhost:6443/arcgis/rest/services/BaseMap/MapServer/"+k+"?f=pjson", "content": { "tags": "dog,us", "tagmode": "all", "format": "json" }, "handeAs": "json", "callbackParamName": "jsoncallback" }); requestHandle.then(requestSucceeded, requestFailed); function requestSucceeded(response, io){ var fields=(response["fields"]); var FieldStore = new Memory({data: fields}); this.FieldsCombo.set('store', FieldStore);--------->this line produces errors } function requestFailed(error, io){ alert(dojoJson.toJson(error, true)); } }); 'cannot populate filteringselect Resultent data from rest end point 1: {name: "REGIONCODE", type: "esriFieldTypeString", alias: "كود المنطقة", length: 2, domain: {…}} 2: {name: "GOVCODE", type: "esriFieldTypeString", alias: "كود المحافظة", length: 5, domain: {…}} 3: {name: "CENTERCODE", type: "esriFieldTypeString", alias: "كود المركز", length: 9, domain: null} 4: {name: "NAMEAR", type: "esriFieldTypeString", alias: "الاسم بالعربية", length: 50, domain: null} 5: {name: "NAMEEN", type: "esriFieldTypeString", alias: "الاسم بالإنجليزية", length: 50, domain: null}
... View more
02-09-2019
02:58 AM
|
0
|
7
|
3461
|
|
POST
|
Dear Robert As per your suggestion i changed the code from jquery to dojo.But still drop down change event not working. <div > <label class="width70" for="SourceCombo" style="margin-top:-20px">Source Layer:</label> <div data-dojo-attach-point="SourceCombo" data-dojo-type="dijit/form/FilteringSelect" data-dojo-props="searchAttr:'Title',intermediateChanges:true,placeHolder: 'Select Source Layer'" class="dijit-form-FilteringSelect" style="width: 360px;height:30x;margin-Left: 10px;margin-top:-10px"></div> </div> var layerInfoArray=[]; var lyrArray=[]; if (this.map.itemId) { LayerInfos.getInstance(this.map, this.map.itemInfo) .then(lang.hitch(this, function(operLayerInfos) { this.operLayerInfos = operLayerInfos; })); } this.operLayerInfos.traversal(lang.hitch(this, function(layerInfo) { layerInfoArray.push(layerInfo); })); for(var k=1;k<layerInfoArray.length;k++) { lyrArray.push({"ID":layerInfoArray .id,"Title":layerInfoArray .title}); } var myStore = new Memory({data: lyrArray}); this.SourceCombo.set('store', myStore); this.SourceCombo.on('change', lang.hitch(this, function(){ ----->function change event not working and there is no error on console console.log("Hello");- })); All the code is in startup function.please help.
... View more
02-08-2019
04:33 PM
|
0
|
1
|
4691
|
|
POST
|
Dear All i am calling the function _getAllFields().In startup it works but if i call this function on change event of selection box this through fallowing error.please help. TypeError: this._getAllFields is not a function at HTMLSelectElement.<anonymous> startup: function() { this.inherited(arguments); this._getAllFields("Hello");------>this line function calling works. $(document).on('change', '.form-control', function() { if(this.id=="lyrSource"){ this._getAllFields(this.id);--------------------->through Error TypeError: this._getAllFields is not a function at HTMLSelectElement.<anonymous> }//end of if },//End of startup _getAllFields:function(strLayerName){ alert(strLayerName); },
... View more
02-07-2019
03:41 AM
|
0
|
3
|
5623
|
|
POST
|
Dear All i want to create checkboxes in my widget.i get the layers array from map and next each layer name i want to create checkboxes on widget with on off event listener. Thanks in advance.
... View more
01-30-2019
12:44 AM
|
0
|
1
|
518
|
|
POST
|
Dear All below is he code for settings widget html file.when i execute the code i just see the label.checkboxes not visible.pls help. <div> <table class="show-legend-checkbox"> <tbody> <tr> <td data-dojo-type="jimu/dijit/CheckBox" data-dojo-attach-point="showTitle"> </td> <td class="label">${nls.showTitle}</td> </tr> <tr> <td data-dojo-type="jimu/dijit/CheckBox" data-dojo-attach-point="showBasemap"> </td> <td class="label">${nls.showBaseMap}</td> </tr> <tr> <td data-dojo-type="jimu/dijit/CheckBox" data-dojo-attach-point="showLegend"> </td> <td class="label">${nls.showLegend}</td> </tr> <tr> <td data-dojo-type="jimu/dijit/CheckBox" data-dojo-attach-point="expandAllLayersByDefault"> </td> <td class="label">${nls.expandAllLayersByDefault}</td> </tr> </tbody> </table> </div>
... View more
01-18-2019
05:47 AM
|
0
|
1
|
709
|
|
POST
|
Dear Robert, My widget name id TestWidget and folder name is same TestWidget.Last night i read documentation and solve the problem. Again thanks for your help.
... View more
01-10-2019
07:06 AM
|
0
|
0
|
580
|
|
POST
|
Dear Robert, { "name": "TestWidget", "2D": true, "3D": false, "platform": "HTML", "version": "2.10", "wabVersion": "2.10", "author": "@SpatialAgent", "description": "", "copyright": "", "license": "http://www.apache.org/licenses/LICENSE-2.0" "properties": { "keepConfigAfterMapSwitched": false } } this is my manifest file.
... View more
01-10-2019
01:56 AM
|
0
|
2
|
580
|
|
POST
|
Dear All i create a custom in-panel widget.but when i click action in response it shows only text not the complete panel.i attached the image.the out is shown in the red circle.what can be the reason for not showing complete panel.thanks in advance
... View more
01-09-2019
10:17 AM
|
0
|
4
|
640
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-04-2020 12:17 PM |
| Online Status |
Offline
|
| Date Last Visited |
05-30-2023
10:23 PM
|