<?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: Get xy coordinates from a graphics layer or series of map points in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-xy-coordinates-from-a-graphics-layer-or-series/m-p/411647#M9626</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If I understand your question correct, this may be what you are looking for:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(myGraphic.geometry as MapPoint).x&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(myGraphic.geometry as MapPoint).y&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Dec 2011 15:23:24 GMT</pubDate>
    <dc:creator>YungKaiChin</dc:creator>
    <dc:date>2011-12-13T15:23:24Z</dc:date>
    <item>
      <title>Get xy coordinates from a graphics layer or series of map points</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-xy-coordinates-from-a-graphics-layer-or-series/m-p/411646#M9625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is going to be a much more complex question than what the title suggests.&amp;nbsp; I have a data provider that populates a list of items (that's created based on a query via stored procedure in SQL and returns XML), and each item in the list stores an x coordinate and a y coordinate.&amp;nbsp; From this resulting data provider for the list I am dynamically generating points on a map in a graphics layer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;for (var i:int = 0; i &amp;lt; xys.length; i++)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; _resultsMapPoints = new MapPoint(Number(xys&lt;I&gt;.centroidX),Number(xys&lt;I&gt;.centroidY),new SpatialReference(3424));
&amp;nbsp;&amp;nbsp;&amp;nbsp; var myGraphic:Graphic;
&amp;nbsp;&amp;nbsp;&amp;nbsp; myGraphic = new Graphic(_resultsMapPoints,_sms_resultsRed); 
&amp;nbsp;&amp;nbsp;&amp;nbsp; this._gl_resultsMarkers.add(myGraphic);
}&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;What I'm trying to do next is based on a mouse click on an item in the list, match the xy of the selected item in the list to the xy of the graphic in _gl_resultsMarkers, and then place a speech bubble over the selected graphic in the correct place on the map.&amp;nbsp; The speech bubble is a component stored in my map component so it's a map/stage comparison thing.&amp;nbsp; I know I can use the map.toScreen option to get the bubble properly placed once I get my xy's, but I'm having trouble figuring out how to grab the xy's from the graphics (or do I need to loop through the MapPoints) to do the match to the array values in the first place.&amp;nbsp; Any pointers would be greatly appreciated.&amp;nbsp; I've been stuck on this for a day and a half now.&amp;nbsp; Thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2011 13:59:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-xy-coordinates-from-a-graphics-layer-or-series/m-p/411646#M9625</guid>
      <dc:creator>JanicePeal</dc:creator>
      <dc:date>2011-12-13T13:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Get xy coordinates from a graphics layer or series of map points</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-xy-coordinates-from-a-graphics-layer-or-series/m-p/411647#M9626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If I understand your question correct, this may be what you are looking for:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(myGraphic.geometry as MapPoint).x&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(myGraphic.geometry as MapPoint).y&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2011 15:23:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-xy-coordinates-from-a-graphics-layer-or-series/m-p/411647#M9626</guid>
      <dc:creator>YungKaiChin</dc:creator>
      <dc:date>2011-12-13T15:23:24Z</dc:date>
    </item>
  </channel>
</rss>

