import com.esri.ags.geometry.MapPoint;
Thanks Robert for looking at this. I've had warnings pop up in my console about some of the esri classes I'm importing. Warnings such as:The class com.esri.ags.geometry.MapPoint has been used in a call to net.registerClassAlias() in _ModRound2Form_FlexInit. This will cause Round2Form:ModRound2Form to be leaked. To resolve the leak, define com.esri.ags.geometry.MapPoint in the top-level application.
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>
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.