/// <summary>
 /// Zoom to the specified location
 /// </summary>
 /// <param name="extent">The extent of the geocoded candidate</param>
 /// <returns></returns>
 public static Task ZoomToLocation(CandidateExtent extent)
 {
     return(QueuingTaskFactory.StartNew(() => {
         ArcGIS.Core.Geometry.Envelope envelope = new ArcGIS.Core.Geometry.Envelope(
             extent.XMin, extent.YMin, extent.XMax, extent.YMax,
             new ArcGIS.Core.Geometry.SpatialReference(extent.WKID)
             );
         //apply extent
         ForTheUcModule.ActiveMapView.ZoomTo(GeometryEngine.Expand(envelope, 3, 3, true));
     }));
 }
Пример #2
0
        /// <summary>
        /// Zoom to the specified location
        /// </summary>
        /// <param name="extent">The extent of the geocoded candidate</param>
        /// <returns></returns>
        public static Task ZoomToLocation(CandidateExtent extent) {

            return QueuingTaskFactory.StartNew(() => {
                ArcGIS.Core.Geometry.Envelope envelope = new ArcGIS.Core.Geometry.Envelope(
                     extent.XMin, extent.YMin, extent.XMax, extent.YMax,
                     new ArcGIS.Core.Geometry.SpatialReference(extent.WKID)
                     );
                //apply extent
                ForTheUcModule.ActiveMapView.ZoomTo(GeometryEngine.Expand(envelope, 3, 3, true));
            });
        }