<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to create buffer over feature layer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-create-buffer-over-feature-layer/m-p/697731#M64945</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Engr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There were a few problems with your script. &amp;nbsp;The query task was not querying a feature layer, so no features were being returned. &amp;nbsp;The SimpleFillSymbol was not defined so it was not able to construct the graphic. &amp;nbsp;I put together a working demo for you. &amp;nbsp;You can view it at:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://gis.yakimawa.gov/demo/bufferfl.html" title="https://gis.yakimawa.gov/demo/bufferfl.html"&gt;Quetta Locations&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please view the source to see the modifications I made to your code. &amp;nbsp;I hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 May 2017 18:40:32 GMT</pubDate>
    <dc:creator>TomSellsted</dc:creator>
    <dc:date>2017-05-10T18:40:32Z</dc:date>
    <item>
      <title>How to create buffer over feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-create-buffer-over-feature-layer/m-p/697730#M64944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;I am trying to create buffer over feature layer on the basis of earth quake depth.&lt;BR /&gt;&amp;nbsp; Here is what I have been trying, but it is not working.&lt;BR /&gt;could you please help me to find a solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;BR /&gt;&amp;lt;html&amp;gt;&lt;BR /&gt;&amp;lt;head&amp;gt;&lt;BR /&gt; &amp;lt;meta charset="utf-8" /&amp;gt;&lt;BR /&gt; &amp;lt;title&amp;gt;Quetta Locations&amp;lt;/title&amp;gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fjs.arcgis.com%2F4.3%2Fesri%2Fcss%2Fmain.css" rel="nofollow" target="_blank"&gt;https://js.arcgis.com/4.3/esri/css/main.css&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt; &amp;lt;style&amp;gt;&lt;BR /&gt; html, body, #viewDiv {&lt;BR /&gt; padding: 0;&lt;BR /&gt; margin: 0;&lt;BR /&gt; height: 100%;&lt;BR /&gt; width: 100%;&lt;BR /&gt; }&lt;BR /&gt; &amp;lt;/style&amp;gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;script src="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fjs.arcgis.com%2F4.3%2F" rel="nofollow" target="_blank"&gt;https://js.arcgis.com/4.3/&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;lt;/head&amp;gt;&lt;BR /&gt;&amp;lt;body&amp;gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;!-- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fdservices3.arcgis.com%2F8rJe0yoNOfCTVYEj%2Farcgis%2Fservices%2FQuettaLayer%2FWFSServer%3Fservice%3Dwfs%26request%3Dgetcapabilities" rel="nofollow" target="_blank"&gt;http://dservices3.arcgis.com/8rJe0yoNOfCTVYEj/arcgis/services/QuettaLayer/WFSServer?service=wfs&amp;amp;request=getcapabilities&lt;/A&gt;&lt;SPAN&gt; --&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt; &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;img id="loadingImg" src="images/loading.gif"&lt;BR /&gt; style="position:absolute; right:50%; top:50%; z-index:100; display:none;" /&amp;gt;&lt;BR /&gt; &amp;lt;script&amp;gt;&lt;BR /&gt; require([&lt;BR /&gt; "esri/Map",&lt;BR /&gt; "esri/views/MapView",&lt;BR /&gt; "esri/layers/FeatureLayer",&lt;BR /&gt; "esri/layers/GraphicsLayer",&lt;BR /&gt; "esri/geometry/geometryEngine",&lt;BR /&gt; "esri/geometry/Point",&lt;BR /&gt; "esri/tasks/QueryTask",&lt;BR /&gt; "esri/tasks/support/Query",&lt;BR /&gt; "esri/renderers/SimpleRenderer",&lt;BR /&gt; "esri/symbols/SimpleMarkerSymbol",&lt;BR /&gt; "esri/Graphic",&lt;BR /&gt; "dojo/dom",&lt;BR /&gt; "dojo/dom-style",&lt;BR /&gt; "esri/PopupTemplate",&lt;BR /&gt; "dojo/domReady!"&lt;BR /&gt; ], function (&lt;BR /&gt; Map,&lt;BR /&gt; MapView,&lt;BR /&gt; FeatureLayer,&lt;BR /&gt; GraphicsLayer,&lt;BR /&gt; geometryEngine,&lt;BR /&gt; Point,&lt;BR /&gt; QueryTask,&lt;BR /&gt; Query,&lt;BR /&gt; SimpleRenderer,&lt;BR /&gt; SimpleMarkerSymbol,&lt;BR /&gt; Graphic,&lt;BR /&gt; dom,&lt;BR /&gt; domStyle,&lt;BR /&gt; PopupTemplate&lt;BR /&gt; ) {&lt;/P&gt;&lt;P&gt;var map = new Map({&lt;BR /&gt; basemap: "gray"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var view = new MapView({&lt;BR /&gt; center: [66, 35],&lt;BR /&gt; container: "viewDiv",&lt;BR /&gt; map: map,&lt;BR /&gt; zoom: 4&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var fl = new FeatureLayer({&lt;BR /&gt; title: "QuettaLocation",&lt;BR /&gt; id:0,&lt;BR /&gt;&lt;SPAN&gt; url: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fservices3.arcgis.com%2F8rJe0yoNOfCTVYEj%2Farcgis%2Frest%2Fservices%2FQuettaLocationD%2FFeatureServer%2F0%3Ftoken%3DdTl1ak0nvnpH2W0YNHxgxdBx6dIDJ-lS26rQJSg3oTTs8DM58AJM_CmIT-t8A4YakCrWk3S2rWDysifmG6KT_LS6t-yIbZe6k1Sk2cAOd1wZYLV-CEl542SuMlCIxKJAGKTLj2l76CSZqLQ6xBLiwKBkgpQaEfXyDzqcsZF49ElPZZACynOsQWCPnVkOi_aGk8zsSNzHrRtZljYcNr8vsw" rel="nofollow" target="_blank"&gt;http://services3.arcgis.com/8rJe0yoNOfCTVYEj/arcgis/rest/services/QuettaLocationD/FeatureServer/0?token=dTl1ak0nvnpH2W0YNHxgxdBx6dIDJ-lS26rQJSg3oTTs8DM58AJM_CmIT-t8A4YakCrWk3S2rWDysifmG6KT_LS6t-yIbZe6k1Sk2cAOd1wZYLV-CEl542SuMlCIxKJAGKTLj2l76CSZqLQ6xBLiwKBkgpQaEfXyDzqcsZF49ElPZZACynOsQWCPnVkOi_aGk8zsSNzHrRtZljYcNr8vsw&lt;/A&gt;&lt;SPAN&gt;.."//"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fservices3.arcgis.com%2F8rJe0yoNOfCTVYEj%2Farcgis%2Frest%2Fservices%2FQuettaLocation%2FFeatureServer" rel="nofollow" target="_blank"&gt;http://services3.arcgis.com/8rJe0yoNOfCTVYEj/arcgis/rest/services/QuettaLocation/FeatureServer&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;BR /&gt; });&lt;BR /&gt; map.add(fl);&lt;BR /&gt; fl.then(function () {&lt;BR /&gt; view.extent = fl.fullExtent;&lt;BR /&gt; });&lt;BR /&gt; // helper functions&lt;BR /&gt; function showLoadingSpinner() {&lt;BR /&gt; var spinnerNode = dom.byId(loadingImg);&lt;BR /&gt; domStyle.set(spinnerNode, "display", "block");&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;function hideLoadingSpinner() {&lt;BR /&gt; var spinnerNode = dom.byId(loadingImg);&lt;BR /&gt; domStyle.set(spinnerNode, "display", "none");&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;function displayMyPolygon(polygonGeometry, aColorString, anOpacity) {&lt;BR /&gt; var aGraphic = new Graphic({&lt;BR /&gt; geometry: polygonGeometry,&lt;BR /&gt; symbol: new SimpleFillSymbol({ color: aColorString, style: "solid" })&lt;BR /&gt; });&lt;BR /&gt; // if opacity was not specified, default to 1.0&lt;BR /&gt; if (anOpacity) {&lt;BR /&gt; } else {&lt;BR /&gt; anOpacity = 1.0;&lt;BR /&gt; }&lt;BR /&gt; aGraphic.symbol.color.a = anOpacity;&lt;BR /&gt; graphicsLayer.graphics.add(aGraphic);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;var graphicsLayer = new GraphicsLayer({&lt;BR /&gt; graphics: []&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;map.add(graphicsLayer);&lt;/P&gt;&lt;P&gt;//Buffer analysis function&lt;BR /&gt; var myGeometry;&lt;BR /&gt; function bufferbyDistance(depth)&lt;BR /&gt; {&lt;BR /&gt; var q = fl.createQuery();&lt;BR /&gt; q.where = "depth ='" + depth + "'";&lt;BR /&gt; q.returnGeometry = true;&lt;BR /&gt; var depthTask = new QueryTask({&lt;BR /&gt;&lt;SPAN&gt; url: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fservices3.arcgis.com%2F8rJe0yoNOfCTVYEj%2Farcgis%2Frest%2Fservices%2FQuettaLocation%2FFeatureServer" rel="nofollow" target="_blank"&gt;http://services3.arcgis.com/8rJe0yoNOfCTVYEj/arcgis/rest/services/QuettaLocation/FeatureServer&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;BR /&gt; });&lt;BR /&gt; return depthTask.execute(q).then(function (response){&lt;BR /&gt; return response.FeatureLayer[0].geometry;&lt;BR /&gt; }).then(function (geometry) {&lt;BR /&gt; myGeometry = geometryEngine.buffer(&lt;BR /&gt; geometry,&lt;BR /&gt; 2,&lt;BR /&gt; "km"&lt;BR /&gt; );&lt;BR /&gt; displayMyPolygon(myGeometry , "red");&lt;BR /&gt; });&lt;BR /&gt; }&lt;BR /&gt; //showLoadingSpinner();&lt;BR /&gt; view.then(fl&lt;BR /&gt; .then(bufferbyDistance)&lt;BR /&gt; .then(hideLoadingSpinner)&lt;BR /&gt; );&lt;/P&gt;&lt;P&gt;});&lt;BR /&gt; &amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2017 16:45:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-create-buffer-over-feature-layer/m-p/697730#M64944</guid>
      <dc:creator>Engr_UmairShah</dc:creator>
      <dc:date>2017-05-10T16:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to create buffer over feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-create-buffer-over-feature-layer/m-p/697731#M64945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Engr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There were a few problems with your script. &amp;nbsp;The query task was not querying a feature layer, so no features were being returned. &amp;nbsp;The SimpleFillSymbol was not defined so it was not able to construct the graphic. &amp;nbsp;I put together a working demo for you. &amp;nbsp;You can view it at:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://gis.yakimawa.gov/demo/bufferfl.html" title="https://gis.yakimawa.gov/demo/bufferfl.html"&gt;Quetta Locations&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please view the source to see the modifications I made to your code. &amp;nbsp;I hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2017 18:40:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-create-buffer-over-feature-layer/m-p/697731#M64945</guid>
      <dc:creator>TomSellsted</dc:creator>
      <dc:date>2017-05-10T18:40:32Z</dc:date>
    </item>
  </channel>
</rss>

