private static void OnMaximumExtentPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { OverviewMap ovmap = (OverviewMap)d; Envelope maxExtent = (Envelope)e.NewValue; if (ovmap.OVMapImage != null && ovmap.OVMapImage.Layers.Count == 0 && maxExtent != null && maxExtent.SpatialReference != null) { ovmap.OVMapImage.Extent = maxExtent; } }
private void ChangeOverviewMapSpatialReference(OverviewMap overviewMap, Layer overviewLayer, Envelope maximumExtent) { // Clear the existing overview layer so that spatial reference can be changed overviewMap.Layer = null; // Set maximum extent to set the spatial reference overviewMap.MaximumExtent = maximumExtent; // Set the new overview layer overviewMap.Layer = overviewLayer; }
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.