POST
|
Ahhhh.... Thanks Robert. Sometimes an extra set of eyes always helps. Thanks again for ALL your help!!!
... View more
09-24-2019
08:43 AM
|
1
|
0
|
444
|
POST
|
Ok, that makes sense. If there are multiple selected results, the buffer geometries returns only the first item. I thought the ".then" of the geometryService.buffer acts like a promise and should wait until all geometries are returned. How can I send both buffered results to the _doSpatialQuery function? var unit = "UNIT_FOOT"; var dist = [parseFloat(-15)]; var bufferParameters = new BufferParameters(); var resultEvent; var geoms = array.map(this.currentLayerAdded.graphics, function (gra) { //** 2 Results return gra.geometry; }); bufferParameters.geometries = geoms; bufferParameters.bufferSpatialReference = this.map.spatialReference; bufferParameters.unit = GeometryService[unit]; bufferParameters.distances = dist; bufferParameters.unionResults = true; bufferParameters.geodesic = true; bufferParameters.outSpatialReference = this.map.spatialReference; esriConfig.defaults.geometryService.buffer(bufferParameters) .then(lang.hitch(this, this._doSpatialQuery)); _doSpatialQuery: function(buffGeometries){ //** only 1 result in buffGeometries // Replace original selected poly geometry with buffered geometry for (b = 0; b < buffGeometries.length; b++){ for (q = 0; q < this.queryResultsArray.length; q++){ this.queryResultsArray .geometry = buffGeometries; } } continue with function......
... View more
09-24-2019
08:24 AM
|
0
|
1
|
444
|
POST
|
So, something like this... this.buffArray = buffGeometries; for (b = 0; b < this.buffArray.length; b++){ for (q = 0; q < this.qResults.length; q++){ this.qResults .geometry.rings = this.buffArray.rings; } }
... View more
09-24-2019
07:54 AM
|
0
|
1
|
444
|
POST
|
I think I might have a resolution but I need to pass each original search results data (qResult data) into each of the selection buffered polygons. Once I have that, I should be able to loop through each buffered poly and intersection that with my quarter quarter section layer to build the link url. Any thoughts on how to pass the qResults into the buffered poly?
... View more
09-24-2019
06:54 AM
|
0
|
1
|
444
|
POST
|
I'm using a custom basemap where the data is in Nebraska State Plane NAD83 and the service is published in Web Mercator. So, the map spatial reference WKID should be 102100.
... View more
09-24-2019
06:48 AM
|
0
|
0
|
796
|
POST
|
Hi Robert, Not sure if you're still following this thread but I thought I had things worked out, turned out I was wrong. What I'm trying to do is within the _onSearchFinish function, instead of calling the _drawResults function, I'm calling a custom _doSpatialQuery function. Within this function I'm looping through the selection results (parcels) and it's here where I need get the buffer (negative distance) of each result and then use that buffer geometry as the input to perform the spatial query (intersection) with another layer to build some links within each result. I've attached my modified eSearch widget for reference. I've just been spinning my wheels with this so any help/input would be GREATLY appreciated!
... View more
09-23-2019
03:10 PM
|
0
|
1
|
796
|
POST
|
Robert. I'm having an issue when calling the _bufferGeometries function. I need it to complete the geometryService buffer event before continuing through the rest of my code because I need the buffered graphic geometry. How can I force the esriConfig.defaults.geometryService.buffer() event to complete before moving on through the rest of my function?
... View more
09-20-2019
07:28 AM
|
0
|
1
|
796
|
POST
|
Thanks for the reply Robert. However, I need to perform this intersection right after the parcel selection takes places and before the results are displayed. So, are you saying I can apply a negative buffer and use that as the intersection with another layer? I'll take a look at your Spatial tab code and see if I can call that before the results are displayed. Do you have some thoughts or suggestions on how to accomplish this?
... View more
09-19-2019
09:56 AM
|
0
|
1
|
796
|
POST
|
I'm using Robert's eSearch widget and I'm trying to use a selected polygon to intersect another layer; however, I need to "shrink" the original polygon so the new polygon used to perform the intersection is fully contained within the original selected polygon. I've tried to take the original selected polygon rings and subtract a value of 50 from each x,y pair, however, that just resulted in shifting the temp polygon and not actually "shrinking" it. Any suggestions or help would be greatly appreciated!
... View more
09-19-2019
09:06 AM
|
0
|
16
|
1318
|
POST
|
Robert, I actually figured it out. It does exactly as you describe but what I wanted it to do was not show the selection, just zoom to the parcel. All I had to do was not add the graphic to the map! Ugh... Thanks for the response.
... View more
03-30-2018
07:49 AM
|
0
|
0
|
310
|
POST
|
I would like to remove the default symbology of the polygon selection result of the Search widget. I'm doing this within some custom code utilizing the aspect.around module accessing the _onSearchResults function of the Search widget.js file; however, I'm unable to get this to fully work. Below is my aspect.around module which is within a function where the widget gets passed in. Any help or thoughts would be appreciated. aspect.around(widget, '_onSearchResults', lang.hitch(this, function(originalMethod) { return lang.hitch(this, function() { var features, feature, layer, queryLayer, queryLayerUrl, queryTask, query, pt; features = []; feature = null; if (arguments) { features = arguments[0].results[0]; array.forEach(features, function (feature){ // Search for Intersection if (feature.feature.attributes.Loc_name === 'Streets' && feature.feature.attributes.Addr_type === 'StreetInt'){ originalMethod.apply(widget, arguments); }else{ // Search for Owner, Address, PID, or S-T-R if (feature.feature.attributes.Loc_name === "Parcels" || feature.feature.attributes.Loc_name === "Owner" || feature.feature.attributes.Loc_name === "AddressPoints" || feature.feature.attributes.Loc_name === "PID") { queryLayerUrl = this.queryParcelUrl; layer = this.qlayer; } else if (feature.feature.attributes.Loc_name === 'STR') { queryLayerUrl = this.querySectionUrl; layer = this.qlayer; } query = new EsriQuery(); query.outSpatialReference = this.map.spatialReference; query.returnGeometry = true; query.outFields = this.queryLayerOutFields; pt = feature.feature.geometry; query.geometry = pt; // parcel selection symbol - only for Search tool this.parcelSelSymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_NULL, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_NULL)); queryTask = new QueryTask(queryLayerUrl); queryTask.execute(query, lang.hitch(this, function(result) { this.map.graphics.clear(); var selfeature, graphic, poly, point; if (result.features.length > 0){ selfeature = result.features[0]; graphic = selfeature; poly = selfeature.geometry.getExtent(); point = selfeature.geometry.getCentroid(); graphic.setSymbol(this.parcelSelSymbol); this.map.graphics.add(graphic); this.map.setExtent(poly.expand(2)); this.map.infoWindow.hide(); this.map.infoWindow.clearFeatures(); this.map.infoWindow.setFeatures([selfeature]); } })); } }, this);
... View more
03-29-2018
03:07 PM
|
0
|
2
|
545
|
POST
|
Yue, thanks for the reply. I've looked at the API reference and the sample you provided; however, my rendering is not on an entire feature layer. I'm creating a selection set and rendering the results as a graphics layer. Is there a way to set the legend layer to a graphics layer instead of a feature layer?
... View more
02-23-2016
09:56 AM
|
0
|
1
|
541
|
POST
|
I have a custom widget that allows the user to enter a query string and select a field to symbolize the selection set by unique value. I want to pass the unique field values/symbolization to the legend of a custom print layout template. The attached image represents an example of a selected field, unique values and their symbolization (This is what I'd like the legend to look like). This is what I would like to pass to a Legend element I have in my custom print layout template. I can pass text elements with no problem, just can't figure out how to pass a legend item. I'm using the print dijit and set the "templates" param to a variable that contains info pertaining to that specific layout. I see there is a "legendLayers": [], param within the layoutOptions; however, I can't seem to get this to work. As I mentioned, I'd like the legend to look like the attached image. Does anyone know if this is possible? Any help/suggestions would be greatly appreciated. Thanks, Doug
... View more
02-22-2016
02:47 PM
|
0
|
3
|
2801
|
Title | Kudos | Posted |
---|---|---|
1 | 05-13-2015 08:42 AM | |
1 | 09-24-2019 08:43 AM | |
1 | 05-14-2015 08:02 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|