<?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 The slide to adjust the display of points by depth in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-slide-to-adjust-the-display-of-points-by-depth/m-p/145215#M13526</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your time in advance. I am wondering if I could create a slider to adjust the value in the column "WellDepth" (Please see the attached file) and control the display of point features. I found there is a time slider widget to work on the &lt;SPAN style="font-weight: bold; color: #6a6a6a; font-family: arial, sans-serif; font-size: small;"&gt;time&lt;/SPAN&gt;&lt;SPAN style="color: #545454; font-family: arial, sans-serif; font-size: small;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-weight: bold; color: #6a6a6a; font-family: arial, sans-serif; font-size: small;"&gt;enabled layers. However, I am not sure if it is possible to have a slider to control the display of points by the WellDepth. Could anyone share your valuable opinions?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: bold; color: #6a6a6a; font-family: arial, sans-serif; font-size: small;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: bold; color: #6a6a6a; font-family: arial, sans-serif; font-size: small;"&gt;Hank&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Mar 2016 21:33:59 GMT</pubDate>
    <dc:creator>Chang-HengYang</dc:creator>
    <dc:date>2016-03-23T21:33:59Z</dc:date>
    <item>
      <title>The slide to adjust the display of points by depth</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-slide-to-adjust-the-display-of-points-by-depth/m-p/145215#M13526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your time in advance. I am wondering if I could create a slider to adjust the value in the column "WellDepth" (Please see the attached file) and control the display of point features. I found there is a time slider widget to work on the &lt;SPAN style="font-weight: bold; color: #6a6a6a; font-family: arial, sans-serif; font-size: small;"&gt;time&lt;/SPAN&gt;&lt;SPAN style="color: #545454; font-family: arial, sans-serif; font-size: small;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-weight: bold; color: #6a6a6a; font-family: arial, sans-serif; font-size: small;"&gt;enabled layers. However, I am not sure if it is possible to have a slider to control the display of points by the WellDepth. Could anyone share your valuable opinions?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: bold; color: #6a6a6a; font-family: arial, sans-serif; font-size: small;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: bold; color: #6a6a6a; font-family: arial, sans-serif; font-size: small;"&gt;Hank&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 21:33:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-slide-to-adjust-the-display-of-points-by-depth/m-p/145215#M13526</guid>
      <dc:creator>Chang-HengYang</dc:creator>
      <dc:date>2016-03-23T21:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: The slide to adjust the display of points by depth</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-slide-to-adjust-the-display-of-points-by-depth/m-p/145216#M13527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So you want to use it to filter values? Something like "show only values with a depth greater/less than X depth"?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should be able to accomplish this using one of the Dojo Slider widgets (&lt;A href="https://dojotoolkit.org/reference-guide/1.10/dijit/form/HorizontalSlider.html"&gt;dijit/form/HorizontalSlider&lt;/A&gt;) At page load, you could query your point layer to determine the min/max value range is and then adjust the slider's min/max values accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that's done, simply tie into the slider's onChange event to retrieve the slider's value and then apply a definition query to the layer based on that (i.e. depth &amp;lt; 200).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 22:01:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-slide-to-adjust-the-display-of-points-by-depth/m-p/145216#M13527</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2016-03-23T22:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: The slide to adjust the display of points by depth</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-slide-to-adjust-the-display-of-points-by-depth/m-p/145217#M13528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve, &lt;/P&gt;&lt;P&gt;Thank you for the valuable opinions. I will follow your instructions to make the codes. I am also wondering if you have found any sample; Therefore, I could follow the codes in the sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Hank &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 22:16:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-slide-to-adjust-the-display-of-points-by-depth/m-p/145217#M13528</guid>
      <dc:creator>Chang-HengYang</dc:creator>
      <dc:date>2016-03-23T22:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: The slide to adjust the display of points by depth</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-slide-to-adjust-the-display-of-points-by-depth/m-p/145218#M13529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yang,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can take look about this sample &lt;A href="https://developers.arcgis.com/javascript/jssamples/layers_raster.html" title="https://developers.arcgis.com/javascript/jssamples/layers_raster.html"&gt;Raster layer slider | ArcGIS API for JavaScript&lt;/A&gt; &lt;/P&gt;&lt;P&gt;This slider interact with an ImageServiceLayer, however you could take this sample as a reference to give you an idea how to interact with MapServiceLayer or featureLayer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this can help.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 22:28:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-slide-to-adjust-the-display-of-points-by-depth/m-p/145218#M13529</guid>
      <dc:creator>YueWu1</dc:creator>
      <dc:date>2016-03-23T22:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: The slide to adjust the display of points by depth</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-slide-to-adjust-the-display-of-points-by-depth/m-p/145219#M13530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to something along these lines:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var slider = new HorizontalSlider({
&amp;nbsp;&amp;nbsp;&amp;nbsp; name: "slider",
&amp;nbsp;&amp;nbsp;&amp;nbsp; value: 5,
&amp;nbsp;&amp;nbsp;&amp;nbsp; minimum: 0,
&amp;nbsp;&amp;nbsp;&amp;nbsp; maximum: 2000,
&amp;nbsp;&amp;nbsp;&amp;nbsp; intermediateChanges: true,
&amp;nbsp;&amp;nbsp;&amp;nbsp; style: "width:300px;",
&amp;nbsp;&amp;nbsp;&amp;nbsp; onChange: function(value){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var layerDefinitions = [];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerDefinitions[0] = "WellDepth &amp;gt; "+value;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yourMapLayer.setLayerDefinitions(layerDefinitions, false);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}, "slider").startup();&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:56:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-slide-to-adjust-the-display-of-points-by-depth/m-p/145219#M13530</guid>
      <dc:creator>BillDaigle</dc:creator>
      <dc:date>2021-12-11T07:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: The slide to adjust the display of points by depth</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-slide-to-adjust-the-display-of-points-by-depth/m-p/145220#M13531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, unfortunately, it's rare to find a sample that does EXACTLY what you want/need. Usually you need to piece together components of several different things (well, that's my experience).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The way I'd attack this would be to incorporate a Dojo slider widget into your application first. &lt;A href="https://dojotoolkit.org/documentation/tutorials/1.10/sliders/index.html" rel="nofollow noopener noreferrer" target="_blank"&gt;This&lt;/A&gt; is a tutorial page on the Dojo site about using the slider. Unless you want to just give the slider a min/max value range upfront, you'll have to figure that out somehow. If you need to do this, use a queryTask on your layer, You might be able to use the &lt;A href="https://developers.arcgis.com/javascript/jsapi/statisticdefinition-amd.html" rel="nofollow noopener noreferrer" target="_blank"&gt;statisticDefinition&lt;/A&gt; parameter of a QueryTask to help you do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Knowing what your new min/max values should be, you alter the value using the attr method of the slider:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;theSlider.attr('minimun', theNewMin);
theSlider.attr('maximum', theNewMax);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where theNewMin is your min value and theNewMax is your max value for the slider.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The final piece is to actually filter the data once your user uses the slider. I've done something similar in one of my apps. I have a filteringSelect (combobox) full of date values. Once the user selects a date, a definition query is applied to a layer based on the date selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select.on('change', function(evt) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Need to take into account the GMT time offset
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var theDefExp = "eventDate = Date '" + new Date(evt + 28800000).toLocaleDateString("en-US") + "'";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; repairLayer.setDefinitionExpression(theDefExp);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above, my filteringSelect widget's variable is "select" and I'm just tying into the change event of the widget. My featureLayer in this example is repairLayer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:56:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-slide-to-adjust-the-display-of-points-by-depth/m-p/145220#M13531</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2021-12-11T07:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: The slide to adjust the display of points by depth</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-slide-to-adjust-the-display-of-points-by-depth/m-p/145221#M13532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bill's example is cleaner. &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 22:46:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-slide-to-adjust-the-display-of-points-by-depth/m-p/145221#M13532</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2016-03-23T22:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: The slide to adjust the display of points by depth</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-slide-to-adjust-the-display-of-points-by-depth/m-p/145222#M13533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bill,&lt;/P&gt;&lt;P&gt;HooRay!! I wish I could talk to you in the future if I have the questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;Hank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2016 17:25:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-slide-to-adjust-the-display-of-points-by-depth/m-p/145222#M13533</guid>
      <dc:creator>Chang-HengYang</dc:creator>
      <dc:date>2016-03-24T17:25:38Z</dc:date>
    </item>
  </channel>
</rss>

