/// <summary>
 /// Sets extents, limits, and events after layers have been initialized
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 private void Layer_LayersInitialized(object sender, EventArgs args)
 {
     fullExtent = OVMapImage.Layers.GetFullExtent();
     OVMapImage.MinimumResolution = double.Epsilon;
     OVMapImage.MaximumResolution = double.MaxValue;
     if (MaximumExtent != null)
     {
         fullExtent = MaximumExtent.Clone();
         maxWidth   = fullExtent.Width;
         maxHeight  = fullExtent.Height;
         OVMapImage.ZoomTo(fullExtent);
     }
     UpdateOVMap();
 }
Exemplo n.º 2
0
        /// <summary>
        /// Sets extents, limits, and events after layers have been initialized
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private void Layer_LayersInitialized(object sender, EventArgs args)
        {
            if (OVMapImage != null)
            {
                if (MaximumExtent != null)
                {
                    fullExtent = MaximumExtent.Clone();
                }
                else
                {
                    fullExtent = OVMapImage.Layers.GetFullExtent();
                }

                if (fullExtent != null)
                {
                    maxWidth  = fullExtent.Width;
                    maxHeight = fullExtent.Height;
                }
                UpdateOVMap();
            }
        }