Hello all,
In a widget routine I want to perform a spatial query (intersect) with a negative distance buffer: create an effective search geometry that is smaller than the selected input.
Currently I am attempting to create a buffer using a geometry service with a negative distance:
<SPAN class="keyword token">var</SPAN> BP <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">BufferParameters</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> gsvc <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">GeometryService</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token"><SPAN>"</SPAN><A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Ftasks.arcgisonline.com%2FArcGIS%2Frest%2Fservices%2FGeometry%2FGeometryServer" target="_blank">http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer</A><SPAN>"</SPAN></SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
BP<SPAN class="punctuation token">.</SPAN>bufferSpatialReference <SPAN class="operator token">=</SPAN> featureSet<SPAN class="punctuation token">.</SPAN>features<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">.</SPAN>spatialReference<SPAN class="punctuation token">;</SPAN>
BP<SPAN class="punctuation token">.</SPAN>unit <SPAN class="operator token">=</SPAN> GeometryService<SPAN class="punctuation token">.</SPAN>UNIT_METER<SPAN class="punctuation token">;</SPAN>
BP<SPAN class="punctuation token">.</SPAN>distances <SPAN class="operator token">=</SPAN> <SPAN class="operator token">-</SPAN><SPAN class="number token">5</SPAN><SPAN class="punctuation token">;</SPAN>
BP<SPAN class="punctuation token">.</SPAN>geometries <SPAN class="operator token">=</SPAN> featureSet<SPAN class="punctuation token">.</SPAN>features<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN><SPAN