///// <summary>
        ///// Make a CIMPointGraphic that can be added to the map overlay
        ///// </summary>
        ///// <param name="point">The location of the graphic</param>
        ///// <returns></returns>
        //internal static CIMPointGraphicHelper MakeCIMPointGraphic(PointN point)
        //{
        //    return new CIMPointGraphicHelper(point);
        //}
        /// <summary>
        /// Add a point to the specified mapview
        /// </summary>
        /// <param name="mapView">The mapview to whose overlay the graphic will be added</param>
        /// <returns>The graphic id assigned to the graphic in the overlay</returns>
        public static async Task AddToMapOverlay(ArcGIS.Core.CIM.PointN point, MapViewInternal mapView)
        {
            if (!mapView.Is2D)
            {
                return;//only currently works for 2D
            }
            CIMPointGraphicHelper graphicHlpr = new CIMPointGraphicHelper(point);

            graphicHlpr.graphicID = await mapView.AddOverlayGraphicAsync(graphicHlpr.XML);

            _lookup[mapView.Map.RepositoryID] = graphicHlpr;
        }
예제 #2
0
        ///// <summary>
        ///// Make a CIMPointGraphic that can be added to the map overlay
        ///// </summary>
        ///// <param name="point">The location of the graphic</param>
        ///// <returns></returns>
        //internal static CIMPointGraphicHelper MakeCIMPointGraphic(PointN point)
        //{
        //    return new CIMPointGraphicHelper(point);
        //}
        /// <summary>
        /// Add a point to the specified mapview
        /// </summary>
        /// <param name="mapView">The mapview to whose overlay the graphic will be added</param>
        /// <returns>The graphic id assigned to the graphic in the overlay</returns>
        public static async Task AddToMapOverlay(ArcGIS.Core.CIM.PointN point, MapViewInternal mapView) {
            if (!mapView.Is2D)
                return;//only currently works for 2D

            CIMPointGraphicHelper graphicHlpr = new CIMPointGraphicHelper(point);
            graphicHlpr.graphicID = await mapView.AddOverlayGraphicAsync(graphicHlpr.XML);
            _lookup[mapView.Map.RepositoryID] = graphicHlpr;

        }