<?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: Infowindow data is same for all point symbol, missing some loop in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-data-is-same-for-all-point-symbol/m-p/321410#M29586</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Post your code on what the map.infoWindow.setContent contents are.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Jun 2017 14:10:03 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2017-06-22T14:10:03Z</dc:date>
    <item>
      <title>Infowindow data is same for all point symbol, missing some loop</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-data-is-same-for-all-point-symbol/m-p/321407#M29583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;//data from sql works fine, it binds to infowindow, but same data for all points, I think i'm missing something in the bold selected&amp;nbsp;bottom lines&lt;/P&gt;&lt;P&gt;var map;&lt;BR /&gt; require([&lt;BR /&gt; "esri/map",&lt;BR /&gt; "esri/dijit/Scalebar",&lt;BR /&gt; "esri/InfoTemplate",&lt;BR /&gt; "esri/symbols/SimpleLineSymbol",&lt;BR /&gt; "esri/graphic",&lt;BR /&gt; "esri/symbols/SimpleMarkerSymbol",&lt;BR /&gt; "esri/Color",&lt;BR /&gt; "dojo/on",&lt;BR /&gt; "dojo/dom",&lt;BR /&gt; "esri/geometry/Point",&lt;BR /&gt; "esri/dijit/Search",&lt;BR /&gt; "dojo/domReady!"&lt;BR /&gt; ], function (&lt;BR /&gt; Map, Scalebar, InfoTemplate, SimpleLineSymbol, Graphic, SimpleMarkerSymbol, Color, on, dom, Point, Search&lt;BR /&gt; ) {&lt;BR /&gt; var markers = JSON.parse('&amp;lt;%=ConvertDataTabletoString() %&amp;gt;'); &lt;BR /&gt; map = new Map("map", {&lt;BR /&gt; basemap: "osm",&lt;BR /&gt; center: [-120.7077, 47.2601],&lt;BR /&gt; zoom: 7 &lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var scalebar = new Scalebar({&lt;BR /&gt; map: map,&lt;BR /&gt; // "dual" displays both miles and kilometers // "english" is the default, which displays miles // use "metric" for kilometers &lt;BR /&gt; scalebarUnit: "dual"&lt;BR /&gt; });&lt;BR /&gt; var search = new Search({&lt;BR /&gt; map: map&lt;BR /&gt; }, "City");&lt;BR /&gt; search.startup();&lt;BR /&gt; var infoTemplate = new InfoTemplate();&lt;BR /&gt; infoTemplate.setTitle("Population in ");&lt;BR /&gt; infoTemplate.setContent("&amp;lt;b&amp;gt;2007&amp;lt;br/&amp;gt;" ); &lt;BR /&gt; map.on("click", addPoint);&lt;BR /&gt; function addPoint(evt) { &lt;BR /&gt; var lat = evt.mapPoint.getLatitude();&lt;BR /&gt; var long = evt.mapPoint.getLongitude();&lt;BR /&gt; document.getElementById("ContentPlaceHolder1_txtLat").value = lat;&lt;BR /&gt; document.getElementById("ContentPlaceHolder1_txtLng").value = long; &lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;map.on("load", addQueryResult);&lt;BR /&gt; function addQueryResult() {&lt;BR /&gt; for (i = 0; i &amp;lt; markers.length; i++) {&lt;BR /&gt; var data = markers&lt;I&gt;&lt;BR /&gt; var lat = data.latitude;&lt;BR /&gt; var long = data.longitude;&lt;BR /&gt; var green = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 11,&lt;BR /&gt; new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,&lt;BR /&gt; new Color([0, 128, 0]),2));&lt;BR /&gt; var yellow = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 11,&lt;BR /&gt; new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,&lt;BR /&gt; new Color([255, 255, 0]), 2));&lt;BR /&gt; var pt = new Point(long, lat);&lt;BR /&gt; var graphic = new Graphic();&lt;BR /&gt; if (data.PermitStatus == 'Active') {&lt;BR /&gt; var graphic = Graphic(pt, green);&lt;BR /&gt; }&lt;/I&gt;&lt;/P&gt;&lt;P&gt;else {&lt;BR /&gt; var graphic = Graphic(pt, yellow);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;map.graphics.add(graphic);&lt;BR /&gt; &lt;STRONG&gt;map.on("click", Pointdata);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; function Pointdata(evt) {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; if (evt.graphic) {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;var latitude = evt.mapPoint.getLatitude();&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; var longitude = evt.mapPoint.getLongitude();&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; map.infoWindow.setTitle("FacilityDetails");&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; map.infoWindow.setContent(select city, industry from location//example query//&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; );&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;map.infoWindow.show(evt.mapPoint, map.getInfoWindowAnchor(evt.screenPoint));&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; }&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; }&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; }&lt;/STRONG&gt;&lt;BR /&gt; }&lt;BR /&gt; });&lt;A href="https://community.esri.com/migrated-users/36756"&gt;thejus kambi@&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jun 2017 20:16:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-data-is-same-for-all-point-symbol/m-p/321407#M29583</guid>
      <dc:creator>Pa_Lotus</dc:creator>
      <dc:date>2017-06-21T20:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: Infowindow data is same for all point symbol, missing some loop</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-data-is-same-for-all-point-symbol/m-p/321408#M29584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Malla,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out this sample, especially from line 99 onwards. you may have to do something like that.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jssamples/fl_hover.html" title="https://developers.arcgis.com/javascript/3/jssamples/fl_hover.html"&gt;Feature layer hover | ArcGIS API for JavaScript 3.20&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, you would have to updated the attributes property while creating new graphics.&lt;/P&gt;&lt;P&gt;var graphic = Graphic(pt, green, data);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jun 2017 20:25:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-data-is-same-for-all-point-symbol/m-p/321408#M29584</guid>
      <dc:creator>thejuskambi</dc:creator>
      <dc:date>2017-06-21T20:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Infowindow data is same for all point symbol, missing some loop</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-data-is-same-for-all-point-symbol/m-p/321409#M29585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tried with that, Still the same, Only 1st record is loaded and that is the one shown for all points in infowindow&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jun 2017 21:09:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-data-is-same-for-all-point-symbol/m-p/321409#M29585</guid>
      <dc:creator>Pa_Lotus</dc:creator>
      <dc:date>2017-06-21T21:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Infowindow data is same for all point symbol, missing some loop</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-data-is-same-for-all-point-symbol/m-p/321410#M29586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Post your code on what the map.infoWindow.setContent contents are.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jun 2017 14:10:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-data-is-same-for-all-point-symbol/m-p/321410#M29586</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2017-06-22T14:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Infowindow data is same for all point symbol, missing some loop</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-data-is-same-for-all-point-symbol/m-p/321411#M29587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;map.infoWindow.setContent(data.Facility);//it's a column name coming from sql,&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jun 2017 16:01:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-data-is-same-for-all-point-symbol/m-p/321411#M29587</guid>
      <dc:creator>Pa_Lotus</dc:creator>
      <dc:date>2017-06-22T16:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Infowindow data is same for all point symbol, missing some loop</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-data-is-same-for-all-point-symbol/m-p/321412#M29588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Malla,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have mentioned this in my earlier post. when adding the graphics add the "data" to attributes values that way each point will have its own data within it. Then when you are call the "setContent" use the value from the graphic attributes. Check the sample link I have sent again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now data will contain the last attribute from the loop and it will show for all records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; graphic &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Graphic&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pt&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; green&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; data&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;infoWindow&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setContent&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;evt&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphicattributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Facility&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;//it's a column name coming from sql, &lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:15:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-data-is-same-for-all-point-symbol/m-p/321412#M29588</guid>
      <dc:creator>thejuskambi</dc:creator>
      <dc:date>2021-12-11T15:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Infowindow data is same for all point symbol, missing some loop</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-data-is-same-for-all-point-symbol/m-p/321413#M29589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Malla,&lt;/P&gt;&lt;P&gt;try Resizing the&amp;nbsp;&lt;STRONG style="background-color: #ffffff; border: 0px; font-weight: bold;"&gt;infoWindow&amp;nbsp;&lt;/STRONG&gt;after the loop.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #ffffff; border: 0px; font-weight: bold;"&gt;infoWindow.resize(210, 150);&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jun 2017 16:23:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-data-is-same-for-all-point-symbol/m-p/321413#M29589</guid>
      <dc:creator>SarojThapa1</dc:creator>
      <dc:date>2017-06-22T16:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Infowindow data is same for all point symbol, missing some loop</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-data-is-same-for-all-point-symbol/m-p/321414#M29590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how to zoom map, where points are loaded&amp;nbsp;&lt;A href="https://community.esri.com/people/thejus.kambi"&gt;thejus.kambi&lt;/A&gt;, while map loading i'm using zoom7, it is always same location and same zoom level, how to zoom according to points loaded&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jun 2017 16:41:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-data-is-same-for-all-point-symbol/m-p/321414#M29590</guid>
      <dc:creator>Pa_Lotus</dc:creator>
      <dc:date>2017-06-22T16:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: Infowindow data is same for all point symbol, missing some loop</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-data-is-same-for-all-point-symbol/m-p/321415#M29591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You would need to use &lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jsapi/esri.graphicsutils-amd.html" title="https://developers.arcgis.com/javascript/3/jsapi/esri.graphicsutils-amd.html"&gt;esri/graphicsUtils &lt;/A&gt;module and calucate the extent of map.graphics and then update the map.extent to the extent of all graphics.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jun 2017 16:51:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-data-is-same-for-all-point-symbol/m-p/321415#M29591</guid>
      <dc:creator>thejuskambi</dc:creator>
      <dc:date>2017-06-22T16:51:42Z</dc:date>
    </item>
  </channel>
</rss>

