<?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: Binded two stored procedures from sql to same one map, but while coming to infowindow only one stored procedure is working, need to show different values depending on graphic in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/binded-two-stored-procedures-from-sql-to-same-one/m-p/261013#M24171</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;Please understand what you are writing or copying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you are creating the instance of the graphic&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; symbol&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="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You are passing the attribute informations into the graphics which is reterieved from looping through the variable "markers".&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;i &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt; markers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i&lt;SPAN class="operator token"&gt;++&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; data &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; markers&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &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="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;P&gt;Now, that you have created a new variable "outfall" and looping through them to create new objects.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;for (i = 0; i &amp;lt; outfall.length; i++) {
&amp;nbsp;&amp;nbsp; var Info = outfall&lt;I&gt;
&amp;nbsp;&amp;nbsp; ...&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;/I&gt;&lt;/CODE&gt;&lt;I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;P&gt;but you are still using the data from previous loop. you would need to use the correct object instances.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 12:49:16 GMT</pubDate>
    <dc:creator>thejuskambi</dc:creator>
    <dc:date>2021-12-11T12:49:16Z</dc:date>
    <item>
      <title>Binded two stored procedures from sql to same one map, but while coming to infowindow only one stored procedure is working, need to show different values depending on graphic</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/binded-two-stored-procedures-from-sql-to-same-one/m-p/261011#M24169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;//Same information on every point only first Json Markers(data) is showing for all points&lt;/P&gt;&lt;P&gt;var map;&lt;BR /&gt; require([&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;], function (&lt;BR /&gt; Map, Scalebar, graphicsUtils, Extent, InfoTemplate, SimpleLineSymbol, Graphic, SimpleMarkerSymbol, Color, on, dom, Point, Search&lt;BR /&gt; ) {&lt;BR /&gt; var markers = JSON.parse('&amp;lt;%=GetData1() %&amp;gt;'); //getting data from sql&lt;BR /&gt; var outfall = JSON.parse('&amp;lt;%=GetData2() %&amp;gt;');//getting data from sql&lt;BR /&gt; map = new Map("FSMap", {&lt;BR /&gt; basemap: "osm",&lt;BR /&gt; center: [-y, x],&lt;BR /&gt; zoom: 6 &lt;BR /&gt; });&lt;BR /&gt; map.on("load", addQueryResult);&lt;BR /&gt; function addQueryResult() {&lt;BR /&gt; if (markers &amp;amp;&amp;amp; markers.length &amp;gt; 0) {&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 symbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_SQUARE, 4,&lt;BR /&gt; new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,&lt;BR /&gt; new Color([128, 0, 128]))); &lt;BR /&gt; var pt = new Point(long, lat);&lt;BR /&gt; var graphic = Graphic(pt, symbol, data);&lt;BR /&gt; map.graphics.add(graphic);&lt;BR /&gt; map.on("click", Pointdata);&lt;BR /&gt; function Pointdata(evt) { &lt;BR /&gt; if (evt.graphic) {&lt;BR /&gt; var latitude = evt.mapPoint.getLatitude();&lt;BR /&gt; var longitude = evt.mapPoint.getLongitude();&lt;BR /&gt; map.infoWindow.setTitle("Details");&lt;BR /&gt; map.infoWindow.setContent(evt.graphic.attributes.FId+ '&amp;lt;br&amp;gt;' + 'Address:' + evt.graphic.attributes.StreetAddress&amp;nbsp;&lt;BR /&gt; );&lt;BR /&gt; map.infoWindow.show(evt.mapPoint, map.getInfoWindowAnchor(evt.screenPoint)); &lt;BR /&gt; }&lt;BR /&gt; } &lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; if (outfall &amp;amp;&amp;amp; outfall.length &amp;gt; 0) {&lt;BR /&gt; for (i = 0; i &amp;lt; outfall.length; i++) {&lt;BR /&gt; var Info = outfall&lt;I&gt;&lt;BR /&gt; var lati = Info.LatitudeDecimal;&lt;BR /&gt; var longi = Info.LongitudeDecimal;&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 pnt = new Point(longi, lati);&lt;BR /&gt; var graphi = Graphic(pnt, green, data);&lt;BR /&gt; map.graphics.add(graphi);&lt;BR /&gt; map.on("click", Outfalldata);&lt;BR /&gt; function Outfalldata(evt) {&lt;BR /&gt; if (evt.graphi) {&lt;BR /&gt; var latitude = evt.mapPoint.getLatitude();&lt;BR /&gt; var longitude = evt.mapPoint.getLongitude();&lt;BR /&gt; map.infoWindow.setTitle("OutfallDetails");&lt;BR /&gt; map.infoWindow.setContent(evt.graphi.attributes.PId&lt;BR /&gt; );&lt;BR /&gt; map.infoWindow.show(evt.mapPoint, map.getInfoWindowAnchor(evt.screenPoint));&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; });&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2017 23:20:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/binded-two-stored-procedures-from-sql-to-same-one/m-p/261011#M24169</guid>
      <dc:creator>Pa_Lotus</dc:creator>
      <dc:date>2017-06-26T23:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: Binded two stored procedures from sql to same one map, but while coming to infowindow only one stored procedure is working, need to show different values depending on graphic</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/binded-two-stored-procedures-from-sql-to-same-one/m-p/261012#M24170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/people/thejus.kambi"&gt;thejus.kambi&lt;/A&gt;‌ If you can help me, Have a look in to code once&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2017 23:21:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/binded-two-stored-procedures-from-sql-to-same-one/m-p/261012#M24170</guid>
      <dc:creator>Pa_Lotus</dc:creator>
      <dc:date>2017-06-26T23:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: Binded two stored procedures from sql to same one map, but while coming to infowindow only one stored procedure is working, need to show different values depending on graphic</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/binded-two-stored-procedures-from-sql-to-same-one/m-p/261013#M24171</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;Please understand what you are writing or copying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you are creating the instance of the graphic&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; symbol&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="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You are passing the attribute informations into the graphics which is reterieved from looping through the variable "markers".&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;i &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt; markers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i&lt;SPAN class="operator token"&gt;++&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; data &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; markers&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &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="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;P&gt;Now, that you have created a new variable "outfall" and looping through them to create new objects.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;for (i = 0; i &amp;lt; outfall.length; i++) {
&amp;nbsp;&amp;nbsp; var Info = outfall&lt;I&gt;
&amp;nbsp;&amp;nbsp; ...&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;/I&gt;&lt;/CODE&gt;&lt;I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;P&gt;but you are still using the data from previous loop. you would need to use the correct object instances.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:49:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/binded-two-stored-procedures-from-sql-to-same-one/m-p/261013#M24171</guid>
      <dc:creator>thejuskambi</dc:creator>
      <dc:date>2021-12-11T12:49:16Z</dc:date>
    </item>
  </channel>
</rss>

