Solved! Go to Solution.
import com.esri.ags.geometry.MapPoint;
protected function MapClickHandler(event:MapMouseEvent):void { const mapPoint:MapPoint = event.mapPoint; mapPoint.spatialReference = new SpatialReference(102100); var myGraphicMarker:Graphic = new Graphic(mapPoint, new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_DIAMOND, 22, 0x009933)); myGraphicMarker.toolTip = "Marker added with ActionScript"; pointGraphicsLayer.add(myGraphicMarker); pointGraphicsLayer.refresh(); }
<esri:Map id="theMap" mapClick="MapClickHandler(event)"> <esri:GraphicsLayer id="pointGraphicsLayer" /> </esri:Map>
import com.esri.ags.geometry.MapPoint;