|
POST
|
In the eSearch by Value configuration, is it possible to configure a "No Selection" in the Combobox as a default. Furthermore, if there is a no selection, then it is possible to have it disregarded in the query? For example, in the selection below, if the user wants to select "CVT" and "Nbrhd" only, the query also includes "SCHOOLDESCRIPTION". SCHOOLDESCRIPTION = 'ROCHESTER COMM SCHLS' AND CVTTAXDESCRIPTION = 'CITY OF ROCHESTER HILLS' AND NEIGHBORHOODCODE = 'CME'
... View more
02-11-2016
10:52 AM
|
0
|
1
|
1979
|
|
POST
|
Can eSearch be configured to search on multiple fields from the same layer? For example, in the configuration, can it search on both parcel number (PIN) and school? I tried this but eSearch just hangs when I add the School Expression. "expressions": { "expression": [ { "alias": "PIN", "textsearchlabel": "Search by PIN", "values": { "value": [ { "fieldObj": { "name": "PIN", "label": "PIN", "shortType": "string", "type": "esriFieldTypeString" }, "valueObj": { "value": "" }, "prompt": "PIN is", "textsearchhint": "enter PIN number here.", "sqltext": "Upper(PIN) = Upper('[value]') OR Upper(KEYPIN) = Upper('[value]')", "operation": "stringOperatorIs" } ] } }, "alias": "SCHOOLDESCRIPTION", "textsearchlabel": "Search by CVT", "values": { "value": [ { "fieldObj": { "name": "SCHOOLDESCRIPTION", "label": "SCHOOLDESCRIPTION", "shortType": "string", "type": "esriFieldTypeString" }, "valueObj": { "value": "" }, "prompt": "SCHOOLDESCRIPTION is", "textsearchhint": "enter SCHOOLDESCRIPTION number here.", "sqltext": "Upper(SCHOOLDESCRIPTION) like Upper('[value]')", "operation": "stringOperatorIs" } ] } } ] },
... View more
02-10-2016
10:59 AM
|
0
|
3
|
2475
|
|
POST
|
Kelly & Tim, Thanks for your responses. Both helped get me on the right track. It ended up that my problem was how I was stepping through the selected features. It wasn't getting to the callback until it had stepped through all the features. Not working: Working: for (var i = 0; i < numSelected; i++) { feature = features; self.printSoilErosionFeature(feature, function() { //nothing }); } callback(); count = 0; function processFeatures() { if (features.length > count) { var feature = features[count]; self.printSingleParcelFeature(feature, processFeatures) count++; } else { callback(); } } processFeatures();
... View more
02-10-2016
06:06 AM
|
0
|
0
|
881
|
|
POST
|
I am trying to step through a set of selected features, zoom to the extent of the feature, do something with it and then go to the next feature and do the same. I can't seem to trap the end of the zoom no matter what I do. Does anybody have code that does this successfully. It works fine for one. It just doesn't work when I loop through a set of features. Here's what I've tried: printSingleParcelFeature: function (feature, callback) { var self = this; self.zoomSelectedOne(feature, function() { callback(); }); }, zoomSelectedOne: function(feature, callback) { var gExt; var selectedExt; //Also tried 'zoom-end'. That never works. var mapZoomChange = this.map.on('extent-change', zoomHandler); function zoomHandler() { console.info("Extent Change"); setTimeout(lang.hitch(this, function () { mapZoomChange.remove(); callback(); }), 1000); } gExt = feature.geometry.getExtent(); if (gExt) { selectedExt = gExt.expand(this.zoomSelectExpand,true); this.map.setExtent(selectedExt); console.info("Set Extent: " + feature.attributes["PIN"]); } }, My console results are basically this: I also tried this, but again the extent only changes for the last one: zoomSelectedOne: function (feature, callback) { var gExt; var selectedExt; gExt = feature.geometry.getExtent(); if (gExt) { selectedExt = gExt.expand(this.zoomSelectExpand,true); this.map.setExtent(selectedExt).then(callback()); } },
... View more
02-08-2016
06:58 AM
|
0
|
3
|
2420
|
|
POST
|
Robert, Thanks. I can't see that there's any problem with the AttributeTable results, so I'm just going to disregard or turn of the console warnings in the AttributeTable widget. Thanks again for your help! Tom
... View more
02-02-2016
02:06 PM
|
0
|
0
|
1459
|
|
POST
|
I'm using WAB 1.3 with the eSearch and AttributeTable widgets loaded. When I select features using the eSearch selection, I always get a series of "Request canceled" errors: The url in the error will be something like: "//xxx/proxy.ashx?https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer/relation?f=json&geometries1=%7B%22geometryType%22%3A%22esriGeometryPolygon%22%2C%22..... This is followed by an error saying, "Observable store detected, but no sort order specified. you may experience quirks when adding/updating items. These can be resolved by setting a sort order on the list or grid. This appears to be an AttributeTable error. It doesn't seem to affect performance, but hundreds of errors are being created. Does anyone have any ideas on how to avoid these errors?
... View more
02-01-2016
11:00 AM
|
0
|
3
|
3245
|
|
POST
|
I should have been more clear. I tried that and none of the 3 properties were changed: resultLayer = new FeatureLayer(featureCollection, { name: "xyz", htmlPopupType: FeatureLayer.POPUP_NONE, outFields: ["PIN"] }); At least when I used the following the name got changed so I think I'm on the right track: resultLayer.name = "xxxxxxxxxx"; resultLayer.htmlPopupType = "esriServerHTMLPopupTypeNone";
... View more
01-21-2016
03:14 PM
|
0
|
1
|
992
|
|
POST
|
I changed the code as follows: resultLayer.name = "xxxxxxxxxx"; resultLayer.htmlPopupType = "esriServerHTMLPopupTypeNone"; I also tried resultLayer.htmlPopupType = 0; The name takes affect as you can see in the Legend: But the popup is still popping up. Any ideas?
... View more
01-21-2016
01:37 PM
|
0
|
0
|
992
|
|
POST
|
This code is cloning an existing featurelayer and using the layerinfo to a create a new featurelayer. I'm trying to turn off the popup for the new featurelayer. How can I do this? The code below does not work. I get the resultLayer, but the popup remains. var layerInfo = lang.clone(this.resultLayers[layerIndex]); var featureCollection = { layerDefinition: layerInfo, featureSet: null }; resultLayer = new FeatureLayer(featureCollection, { mode: FEATURELAYER.MODE_SELECTION, popup: FeatureLayer.POPUP_NONE, outFields: ["PIN"] });
... View more
01-21-2016
08:38 AM
|
0
|
6
|
2909
|
|
POST
|
Thanks Robert! I just wanted to make sure it wasn't currently an easy configuration item. It may be a nice option in the future.
... View more
01-21-2016
06:17 AM
|
0
|
0
|
713
|
|
POST
|
In the WAB, I use the eSearch widget to select features. I use the map Identify to identify features. The problem is that now selected features always get identified twice. Is there any way to limit the Identify popup for any feature in the Selected layer. No features selected: Select a feature:
... View more
01-20-2016
07:45 AM
|
0
|
3
|
2515
|
|
POST
|
Girish, Hmmm...I select 2 parcels and push the statements to the promises array. The alert on the promises length is 2. When the "all(promises).then" it just executes the statements (zoom to parcel, print, zoom to buffer, print) for the second selected parcel. It's doing everything correctly except chaining the two promises together. Any ideas? Am I missing something? //Push the statements to promises var promises = []; var features = this.selValueShapeFeatures; for (var i = 0; i < numSelected; i++) { this.gFeature = features; alert(features.attributes["PIN"]); promises.push(this.zoomToFeature(this.gFeature) .then(lang.hitch(this, this.sendToPrinter_SoilErosion)) .then(lang.hitch(this, this.zoombuffer)) .then(lang.hitch(this, this.sendToPrinter_SoilErosion)) ); } //Number of records in promises alert(promises.length); //Execute promises all(promises).then(function(results){ console.log("all features printed"); }); Thanks. Tom
... View more
01-14-2016
01:53 PM
|
0
|
0
|
903
|
|
POST
|
Girish, The code you gave me works great for chaining functions together. However, in the code below, I'm trying to step through each of the selected features and perform a set of functions. If there is only one selected feature, it works fine. If there are two selected features, then it only performs the zoom/print functions for the second selected feature. That makes sense since the first chain doesn't complete it's execution before the loop steps through to the second feature. Is there an easy way of chaining these statements inside a loop? for (var i = 0; i < features.length; i++) { gFeature = features; //Zoom to selected and print this.zoomselected() .then(lang.hitch(this, this.sendToPrinter_SoilErosion)) .then(lang.hitch(this, this.zoombuffer)) .then(lang.hitch(this, this.sendToPrinter_SoilErosion)); } Thanks. Tom
... View more
01-13-2016
12:33 PM
|
0
|
2
|
903
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-10-2016 08:38 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|