/// <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
         ProSDKSampleModule.ActiveMapView.ZoomToAsync(GeometryEngine.Expand(envelope, 3, 3, true));
     }));
 }
        /// <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(QueuedTask.Run(() =>
            {
                ArcGIS.Core.Geometry.SpatialReference spatialReference = SpatialReferenceBuilder.CreateSpatialReference(extent.WKID);
                ArcGIS.Core.Geometry.Envelope envelope = EnvelopeBuilder.CreateEnvelope(extent.XMin, extent.YMin, extent.XMax, extent.YMax, spatialReference);

                //apply extent
                MapView.Active.ZoomTo(GeometryEngine.Expand(envelope, 3, 3, true));
            }));
        }