<?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: click event will not select Lines or Points. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-will-not-select-lines-or-points/m-p/419317#M38536</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Guh, looks like that was the problem, I changed it to OBJECTID and it worked. Still though, odd that the polygon script was the only one to give me "?feature=undefined"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Aug 2014 16:12:59 GMT</pubDate>
    <dc:creator>RyanLaird</dc:creator>
    <dc:date>2014-08-04T16:12:59Z</dc:date>
    <item>
      <title>click event will not select Lines or Points.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-will-not-select-lines-or-points/m-p/419310#M38529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been getting a problem here, my script generates a webmap. When a feature is selected a popup of the selected feature's attributes appears and the URL is updated to contain the object ID. Right now the click event will select polygons and the script will work, but I have two other identical scripts using lines and polygons. The "onmouseover" event will select them, but will not update the URL and I am unsure why. Any help would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The line in question is #152, or "map.on("click", function (e) {"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find attached the three scripts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 is Polygons,&lt;/P&gt;&lt;P&gt;1 is Points,&lt;/P&gt;&lt;P&gt;0 is Lines.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 18:26:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-will-not-select-lines-or-points/m-p/419310#M38529</guid>
      <dc:creator>RyanLaird</dc:creator>
      <dc:date>2014-08-01T18:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: click event will not select Lines or Points.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-will-not-select-lines-or-points/m-p/419311#M38530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I find this function useful for finding points on a map-click (inspired by some other online code that I've lost track of):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;function pointToExtent(map, objPoint, distance){
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // buffer around point
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var clickOffset = distance || 10;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var centerPoint = new Point
&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; (objPoint.x,objPoint.y,objPoint.spatialReference);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var mapWidth = map.extent.getWidth();

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Divide width in map units by width in pixels
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var pixelWidth = mapWidth/map.width;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Calculate an envelope width around center point that scales with map zoom level
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var tolerance = clickOffset * pixelWidth;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Build tolerance envelope and set it as the query geometry
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var queryExtent = new esri.geometry.Extent
&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; (1,1,tolerance,tolerance,objPoint.spatialReference);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return queryExtent.centerAt(centerPoint);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };

&amp;nbsp;&amp;nbsp;&amp;nbsp; // . . . later
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.on("click", function(evt){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var query = new Query();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.geometry = pointToExtent(map, evt.mapPoint, 10);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // ...
&amp;nbsp;&amp;nbsp;&amp;nbsp; });


&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 18:34:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-will-not-select-lines-or-points/m-p/419311#M38530</guid>
      <dc:creator>JoshHevenor</dc:creator>
      <dc:date>2014-08-01T18:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: click event will not select Lines or Points.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-will-not-select-lines-or-points/m-p/419312#M38531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmmm That will let me select points but still won't update the URL. Could the problem be in line #181 "if (selection.length &amp;gt; 0) {"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I mean, it makes no sense for point but you would think it would work for line that do have a "length".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 19:02:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-will-not-select-lines-or-points/m-p/419312#M38531</guid>
      <dc:creator>RyanLaird</dc:creator>
      <dc:date>2014-08-01T19:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: click event will not select Lines or Points.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-will-not-select-lines-or-points/m-p/419313#M38532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One problem is that the OBJECTIDLINK field does not exist in any of the layers. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14069757405085303 jive_text_macro" jivemacro_uid="_14069757405085303" modifiedtitle="true"&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //when users click on a feature it is selected&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.on("click", function (e) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var query = new Query();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.geometry = e.mapPoint;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var deferred = polys.selectFeatures(query, FeatureLayer.SELECTION_NEW, function (selection) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //update the url parameter if a feature was selected (if none were length will be 0)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (selection.length &amp;gt; 0) {&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;&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; // This field does not exist in the feature attributes&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&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 feature = selection[0].attributes["OBJECTIDLINK"]; &lt;/P&gt;
&lt;P&gt;&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; //refresh to add changes to the url, adding the url parameter &lt;/P&gt;
&lt;P&gt;&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; if (typeof history.pushState !== "undefined") {&lt;/P&gt;
&lt;P&gt;&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; window.history.pushState(null, null, "?feature=" + selection[0].attributes.OBJECTIDLINK);&lt;/P&gt;
&lt;P&gt;&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;P&gt;&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;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.setFeatures([deferred]);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.show(e.mapPoint);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This leads to the new URL having an undefined value for the feature, for example: &lt;EM&gt;&lt;A class="jive-link-external-small" href="http://../CPDFN2.html?feature=undefined" rel="nofollow" target="_blank"&gt;http://../CPDFN2.html?feature=undefined&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Owen&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.spatialxp.com.au/"&gt;Spatial XP&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Aug 2014 10:41:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-will-not-select-lines-or-points/m-p/419313#M38532</guid>
      <dc:creator>OwenEarley</dc:creator>
      <dc:date>2014-08-02T10:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: click event will not select Lines or Points.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-will-not-select-lines-or-points/m-p/419314#M38533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also forgot to mention:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Could the problem be in line #181 "if (selection.length &amp;gt; 0) {"&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I mean, it makes no sense for point but you would think it would work for line that do have a "length".&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The &lt;EM&gt;selection.length&lt;/EM&gt; in this case is the number of selected features. Length in JavaScript refers to the number of items in a list/array. This is not related to the length of line features.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Aug 2014 10:46:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-will-not-select-lines-or-points/m-p/419314#M38533</guid>
      <dc:creator>OwenEarley</dc:creator>
      <dc:date>2014-08-02T10:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: click event will not select Lines or Points.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-will-not-select-lines-or-points/m-p/419315#M38534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh I see! I've been looking for an alternative to .length but I can't seem to have any documentation on it. I'm aware of the problem with OBJECTIDLINK, we're going add that back to the data later. So you happen to know the name for what .length is? I looking i the documentation for arrays.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 15:08:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-will-not-select-lines-or-points/m-p/419315#M38534</guid>
      <dc:creator>RyanLaird</dc:creator>
      <dc:date>2014-08-04T15:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: click event will not select Lines or Points.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-will-not-select-lines-or-points/m-p/419316#M38535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;array.length is fine, but I think you're looking at selection-complete object and not the selection itself. See&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/featurelayer-amd.html#event-selection-complete" title="https://developers.arcgis.com/javascript/jsapi/featurelayer-amd.html#event-selection-complete"&gt;featurelayer-amd | API Reference | ArcGIS API for JavaScript&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try something like this:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;OL class="dp-c" start="1" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; list-style-position: initial; list-style-image: initial; color: #5c5c5c; margin: 0 0 1px 45px !important;"&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; &lt;/SPAN&gt;&lt;SPAN class="comment" style="font-weight: inherit; font-style: inherit; color: #008200; font-size: 9pt !important; background-color: inherit;"&gt;//when users click on a feature it is selected&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.on(&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;"click"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;, &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; (e) {&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; query = &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; Query();&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.geometry = e.mapPoint;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; deferred = polys.selectFeatures(query, FeatureLayer.SELECTION_NEW, &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; (evt) {&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment" style="font-weight: inherit; font-style: inherit; color: #008200; font-size: 9pt !important; background-color: inherit;"&gt;//update the url parameter if a feature was selected (if none were length will be 0)&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; (evt.selection.length &amp;gt; &lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;) {&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&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;SPAN class="comment" style="font-weight: inherit; font-style: inherit; color: #008200; font-size: 9pt !important; background-color: inherit;"&gt;// This field does not exist in the feature attributes&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&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;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; feature = evt.selection[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;].attributes[&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;"OBJECTIDLINK"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;];&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&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;SPAN class="comment" style="font-weight: inherit; font-style: inherit; color: #008200; font-size: 9pt !important; background-color: inherit;"&gt;//refresh to add changes to the url, adding the url parameter &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&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;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; (&lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;typeof&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; history.pushState !== &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;"undefined"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;) {&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&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; window.history.pushState(&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;null&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;, &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;null&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;, &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;"?feature="&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; + &lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;feature&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;.attributes.OBJECTIDLINK);&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&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;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&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;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.setFeatures([deferred]);&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.show(e.mapPoint);&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can put a breakpoint on line #7 (chrome debug tools, etc.&amp;nbsp; F12 in all browsers more or less) and inspect what you're getting back&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 15:20:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-will-not-select-lines-or-points/m-p/419316#M38535</guid>
      <dc:creator>JoshHevenor</dc:creator>
      <dc:date>2014-08-04T15:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: click event will not select Lines or Points.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-will-not-select-lines-or-points/m-p/419317#M38536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Guh, looks like that was the problem, I changed it to OBJECTID and it worked. Still though, odd that the polygon script was the only one to give me "?feature=undefined"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 16:12:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-will-not-select-lines-or-points/m-p/419317#M38536</guid>
      <dc:creator>RyanLaird</dc:creator>
      <dc:date>2014-08-04T16:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: click event will not select Lines or Points.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-will-not-select-lines-or-points/m-p/419318#M38537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! This will be useful in the future.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 16:14:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-will-not-select-lines-or-points/m-p/419318#M38537</guid>
      <dc:creator>RyanLaird</dc:creator>
      <dc:date>2014-08-04T16:14:41Z</dc:date>
    </item>
  </channel>
</rss>

