<?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 OnRowClick Issues in 3.3 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/onrowclick-issues-in-3-3/m-p/95640#M8757</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am upgrading my application from 3.2 to 3.3 and in the process noticed that my OnRowClickHandler function no longer works. When I click on a row in my dojo data grid, nothing happens. I can see the selected feature on the map, I just can't zoom to it anymore. I have my connection to the grid,&lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt; dojo.connect(grid2, "onRowClick", onRowClickHandler);&lt;/SPAN&gt;&lt;SPAN&gt; inside my init() function as well. Also, there are no errors showing up in Firebug which is making it hard to pinpoint the problem. Has anyone else come across this issue?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any insight would be greatly appreciated!&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
 function onRowClickHandler(evt){ 
&amp;nbsp; console.log(searchType);
&amp;nbsp; if (searchType == 'City') {
&amp;nbsp;&amp;nbsp; var clickedTaxLotId = grid2.getItem(evt.rowIndex).CITY; 
&amp;nbsp;&amp;nbsp; var selectedTaxLot; 
&amp;nbsp;&amp;nbsp; var highlightSymbol = new esri.symbol.SimpleMarkerSymbol().setColor(new dojo.Color([255,255,0,0.3])); 
&amp;nbsp;&amp;nbsp; dojo.forEach(map.graphics.graphics,function(graphic){ 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if((graphic.attributes) &amp;amp;&amp;amp; graphic.attributes.CITY === clickedTaxLotId){ 
&amp;nbsp;&amp;nbsp;&amp;nbsp; selectedTaxLot = graphic; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.setSymbol(highlightSymbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return; 
&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; if ( selectedTaxLot.geometry.declaredClass == 'esri.geometry.Point' ) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.centerAndZoom(taxLotExtent, 14)
&amp;nbsp;&amp;nbsp; var sp = map.toScreen(selectedTaxLot.geometry);
&amp;nbsp;&amp;nbsp; map.infoWindow.show(selectedTaxLot.geometry, map.getInfoWindowAnchor(sp));
&amp;nbsp;&amp;nbsp; } else {
&amp;nbsp;&amp;nbsp; var taxLotExtent = selectedTaxLot.geometry.getExtent(); 
&amp;nbsp;&amp;nbsp; var screenpoint = map.toScreen(selectedTaxLot.geometry.getExtent().getCenter());
&amp;nbsp;&amp;nbsp; var mappoint = map.toMap(screenpoint);
&amp;nbsp;&amp;nbsp; map.setExtent(taxLotExtent,true);
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Feb 2013 19:35:00 GMT</pubDate>
    <dc:creator>EmilyLaMunyon</dc:creator>
    <dc:date>2013-02-21T19:35:00Z</dc:date>
    <item>
      <title>OnRowClick Issues in 3.3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/onrowclick-issues-in-3-3/m-p/95640#M8757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am upgrading my application from 3.2 to 3.3 and in the process noticed that my OnRowClickHandler function no longer works. When I click on a row in my dojo data grid, nothing happens. I can see the selected feature on the map, I just can't zoom to it anymore. I have my connection to the grid,&lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt; dojo.connect(grid2, "onRowClick", onRowClickHandler);&lt;/SPAN&gt;&lt;SPAN&gt; inside my init() function as well. Also, there are no errors showing up in Firebug which is making it hard to pinpoint the problem. Has anyone else come across this issue?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any insight would be greatly appreciated!&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
 function onRowClickHandler(evt){ 
&amp;nbsp; console.log(searchType);
&amp;nbsp; if (searchType == 'City') {
&amp;nbsp;&amp;nbsp; var clickedTaxLotId = grid2.getItem(evt.rowIndex).CITY; 
&amp;nbsp;&amp;nbsp; var selectedTaxLot; 
&amp;nbsp;&amp;nbsp; var highlightSymbol = new esri.symbol.SimpleMarkerSymbol().setColor(new dojo.Color([255,255,0,0.3])); 
&amp;nbsp;&amp;nbsp; dojo.forEach(map.graphics.graphics,function(graphic){ 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if((graphic.attributes) &amp;amp;&amp;amp; graphic.attributes.CITY === clickedTaxLotId){ 
&amp;nbsp;&amp;nbsp;&amp;nbsp; selectedTaxLot = graphic; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.setSymbol(highlightSymbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return; 
&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; if ( selectedTaxLot.geometry.declaredClass == 'esri.geometry.Point' ) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.centerAndZoom(taxLotExtent, 14)
&amp;nbsp;&amp;nbsp; var sp = map.toScreen(selectedTaxLot.geometry);
&amp;nbsp;&amp;nbsp; map.infoWindow.show(selectedTaxLot.geometry, map.getInfoWindowAnchor(sp));
&amp;nbsp;&amp;nbsp; } else {
&amp;nbsp;&amp;nbsp; var taxLotExtent = selectedTaxLot.geometry.getExtent(); 
&amp;nbsp;&amp;nbsp; var screenpoint = map.toScreen(selectedTaxLot.geometry.getExtent().getCenter());
&amp;nbsp;&amp;nbsp; var mappoint = map.toMap(screenpoint);
&amp;nbsp;&amp;nbsp; map.setExtent(taxLotExtent,true);
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 19:35:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/onrowclick-issues-in-3-3/m-p/95640#M8757</guid>
      <dc:creator>EmilyLaMunyon</dc:creator>
      <dc:date>2013-02-21T19:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: OnRowClick Issues in 3.3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/onrowclick-issues-in-3-3/m-p/95641#M8758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am still having this issue after trying multiple things, has anyone else noticed their OnRowClick does not zoom to feature in 3.3?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2013 16:35:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/onrowclick-issues-in-3-3/m-p/95641#M8758</guid>
      <dc:creator>EmilyLaMunyon</dc:creator>
      <dc:date>2013-03-21T16:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: OnRowClick Issues in 3.3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/onrowclick-issues-in-3-3/m-p/95642#M8759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I did notice on my app that my zoom to point feature does not work anymore and I beleive it has something to do with changing or setting the extent &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;....as I was reading in another thread pasted here below&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/80077-Update-to-ArcGIS-JS-API-3.3"&gt;http://forums.arcgis.com/threads/80077-Update-to-ArcGIS-JS-API-3.3&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;interesting enough that zooming to polygons is fine so only the point features manipulated with a expand factor are problematic&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If i were to guess right your grid is returning point features is that correct?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2013 21:01:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/onrowclick-issues-in-3-3/m-p/95642#M8759</guid>
      <dc:creator>GabiVoicu</dc:creator>
      <dc:date>2013-03-21T21:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: OnRowClick Issues in 3.3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/onrowclick-issues-in-3-3/m-p/95643#M8760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply Gabi.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Zooming in 3.3 is not working on any of my layers, whether they are points or polylines. In addition, there are no errors in Firebug to even give me a clue as to what is going on. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will look into the spatial extent issue a little more and let you know if I find anything.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2013 21:25:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/onrowclick-issues-in-3-3/m-p/95643#M8760</guid>
      <dc:creator>EmilyLaMunyon</dc:creator>
      <dc:date>2013-03-21T21:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: OnRowClick Issues in 3.3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/onrowclick-issues-in-3-3/m-p/95644#M8761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I had a similar issue when attempting to zoomToFeature when the geometry is a point. I noticed that if the extent was "too small" then it would simply revert back to the exent that I was originally in.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I had to do a complete "rehaul" of my ZoomToFeature method to get this to work correctly. I ended up having to use the buffer task to do this. I created a quick method to handle any case where I either pass in one or more graphics to zoom to.&amp;nbsp; Below is a simplified version of the code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
function zoomToGraphics(graphicsArray, expandFactor) {
&amp;nbsp; var zoomExtent = esri.graphicsExtent(graphicsArray);
&amp;nbsp; //If the extent height and width are 0, null is returned by ESRI method above
&amp;nbsp; if (!zoomExtent) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var geomArray = esri.getGeometries(graphicsArray);
&amp;nbsp;&amp;nbsp;&amp;nbsp; var deferred = bufferGeometry("http://myserver/arcgis/rest/services/Utilities/Geometry/GeometryServer",
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geomArray, [0.02], map.spatialReference, map.spatialReference);
&amp;nbsp;&amp;nbsp;&amp;nbsp; deferred.then(function (results) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.setExtent(results[0].getExtent());
&amp;nbsp;&amp;nbsp;&amp;nbsp; }, function (error) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //place holder for error handling&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert("Error during buffer Geom: " + error.message);
&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp; } else {
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (expandFactor) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.setExtent(zoomExtent.expand(expandFactor));
&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.setExtent(zoomExtent);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp; }
}

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:39:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/onrowclick-issues-in-3-3/m-p/95644#M8761</guid>
      <dc:creator>DianaBenedict</dc:creator>
      <dc:date>2021-12-10T23:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: OnRowClick Issues in 3.3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/onrowclick-issues-in-3-3/m-p/95645#M8762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I finally found a solution to the zoom issue in 3.3. Since clickedTaxLotId is an array, we need to take the first value that will contain &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the name. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The if statement was initially:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if((graphic.attributes) &amp;amp;&amp;amp; graphic.attributes.CITY === clickedTaxLotId)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In 3.3 it needs to be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if((graphic.attributes) &amp;amp;&amp;amp; graphic.attributes.CITY === clickedTaxLotId[0])&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps someone!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 15:41:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/onrowclick-issues-in-3-3/m-p/95645#M8762</guid>
      <dc:creator>EmilyLaMunyon</dc:creator>
      <dc:date>2013-03-26T15:41:02Z</dc:date>
    </item>
  </channel>
</rss>

