<?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 How do you get a MapPoint from a MultiPoint on MouseEvent? in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-do-you-get-a-mappoint-from-a-multipoint-on/m-p/249085#M5915</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If I click a specific MapPoint (represented by a SimpleGraphicSymbol) within a MultiPoint, how can i retrieve the information for &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;only&lt;/SPAN&gt;&lt;SPAN&gt; the point that was clicked.&amp;nbsp; Here's the code displaying the MultiPoint:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp; &amp;lt;esri:GraphicsLayer id="glDeviceLayer"
&amp;nbsp;&amp;nbsp; symbol="{deviceMarker}"&amp;gt;

&amp;nbsp;&amp;nbsp; &amp;lt;esri:Graphic id="glDevicePoints"
&amp;nbsp;&amp;nbsp;&amp;nbsp; click="pointClick(event)"&amp;gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:geometry&amp;gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:Multipoint id="multipoint"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; points="{mapPoints}" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:geometry&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/esri:Graphic&amp;gt;

&amp;nbsp; &amp;lt;/esri:GraphicsLayer&amp;gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 May 2010 18:53:31 GMT</pubDate>
    <dc:creator>EricTerpstra</dc:creator>
    <dc:date>2010-05-05T18:53:31Z</dc:date>
    <item>
      <title>How do you get a MapPoint from a MultiPoint on MouseEvent?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-do-you-get-a-mappoint-from-a-multipoint-on/m-p/249085#M5915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If I click a specific MapPoint (represented by a SimpleGraphicSymbol) within a MultiPoint, how can i retrieve the information for &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;only&lt;/SPAN&gt;&lt;SPAN&gt; the point that was clicked.&amp;nbsp; Here's the code displaying the MultiPoint:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp; &amp;lt;esri:GraphicsLayer id="glDeviceLayer"
&amp;nbsp;&amp;nbsp; symbol="{deviceMarker}"&amp;gt;

&amp;nbsp;&amp;nbsp; &amp;lt;esri:Graphic id="glDevicePoints"
&amp;nbsp;&amp;nbsp;&amp;nbsp; click="pointClick(event)"&amp;gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:geometry&amp;gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:Multipoint id="multipoint"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; points="{mapPoints}" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:geometry&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/esri:Graphic&amp;gt;

&amp;nbsp; &amp;lt;/esri:GraphicsLayer&amp;gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2010 18:53:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-do-you-get-a-mappoint-from-a-multipoint-on/m-p/249085#M5915</guid>
      <dc:creator>EricTerpstra</dc:creator>
      <dc:date>2010-05-05T18:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get a MapPoint from a MultiPoint on MouseEvent?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-do-you-get-a-mappoint-from-a-multipoint-on/m-p/249086#M5916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Heres something you can do in actionscript&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

private function onMouseClick(event:mouseEvent):void{

var mygraphic:Graphic = event.currentTarget as Graphic;
if (mygraphic){
var myMapPoint:Mappoint = Mappoint (mygraphic.geometry);

var lat:number = myMapPoint.y;
var lon:number = myMapPoint.x;


}}

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I havent got chance to test, but i know it will work (may be little bit tunning need because of upper/lower case letter and spellings) - hope it will help&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Zahid&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://zachsgeospatial.blogspot.com" rel="nofollow noopener noreferrer" target="_blank"&gt;http://zachsgeospatial.blogspot.com&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:23:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-do-you-get-a-mappoint-from-a-multipoint-on/m-p/249086#M5916</guid>
      <dc:creator>ZahidChaudhry</dc:creator>
      <dc:date>2021-12-11T12:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get a MapPoint from a MultiPoint on MouseEvent?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-do-you-get-a-mappoint-from-a-multipoint-on/m-p/249087#M5917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Unfortunately this does not work.&amp;nbsp; A MultiPoint object is an array of MapPoints, so when I click on a point on the map, event.currentTarget returns a MultiPoint, which cannot be coerced as a MapPoint.&amp;nbsp; I need a way to distinguish which MapPoint within the MultiPoint was clicked, and as var as I can tell, neither event.target nor event.currentTarget will return this information. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems like this should be basic functionality, but I guess a MultiPoint is intended to be one cohesive graphic.&amp;nbsp; The only solution I can think of is to not use a MultiPoint, but rather loop over my lat/long data and manually add individual MapPoints to the map so that they can each be clicked.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 14:32:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-do-you-get-a-mappoint-from-a-multipoint-on/m-p/249087#M5917</guid>
      <dc:creator>EricTerpstra</dc:creator>
      <dc:date>2010-05-06T14:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get a MapPoint from a MultiPoint on MouseEvent?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-do-you-get-a-mappoint-from-a-multipoint-on/m-p/249088#M5918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;eterps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; You are on the right track in thinking that a multipoint graphic is intended to be treated as an single graphic. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;the only solution I can think of is to not use a MultiPoint, but rather loop over my lat/long data and manually add individual MapPoints to the map so that they can each be clicked. &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This would be your best route.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 14:50:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-do-you-get-a-mappoint-from-a-multipoint-on/m-p/249088#M5918</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2010-05-06T14:50:08Z</dc:date>
    </item>
  </channel>
</rss>

