Esempio n. 1
0
        /// <summary>
        /// This method re-sets the map projection and re-projects all map
        /// layers to the projection that is specified in the project file
        /// </summary>
        public void ResetMapProjection()
        {
            if (_applicationManager == null)
            {
                return;
            }
            if (_applicationManager.Map == null)
            {
                return;
            }

            string dspxProjectionEsriString = _applicationManager.Map.Projection.ToEsriString();

            if (String.IsNullOrEmpty(dspxProjectionEsriString))
            {
                return;
            }

            MapFrameProjectionHelper.ReprojectMapFrame(_applicationManager.Map.MapFrame, dspxProjectionEsriString);

            _applicationManager.Map.MapFrame.ResetExtents();
        }
 private void ApplyChanges()
 {
     MapFrameProjectionHelper.ReprojectMapFrame(_mapFrame, _projection.ToEsriString());
     _mapFrame.ResetExtents();
 }