Select to view content in your preferred language

OverviewMap MaximumExtent Property

1017
3
07-21-2011 04:04 AM
LanceCrumbliss
Frequent Contributor
Hell all,

I cannot get the MaximumExtent property to honor the MaximumExtent.  The OverviewMap will be static (desired) but instead of the extent defined by the MaximumExtent property, the extent is the full extent of the ArcGISTiledMapServiceLayer used as a source.

            <esri:OverviewMap x:Name="MyOverviewMap" Width="130" Height="130" Map="{Binding ElementName=MyMap}" IsStatic="True" MaximumExtent="3005535,596476,3070530,644436" >
                <esri:OverviewMap.Layer>
                    <esri:ArcGISTiledMapServiceLayer ID="OverViewMap" Url="<ServerAddress>"/>
                </esri:OverviewMap.Layer>
            </esri:OverviewMap>
0 Kudos
3 Replies
LanceCrumbliss
Frequent Contributor
Specifically chiming in for comments or suggestions from ESRI guys and gals morten, dominique, or jennifer.  Of course, anyone else that may have a suggestion or comment is welcome to reply as well 🙂

FYI, the overview map and the main map are using the same Tiled Map Service.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Looks like a bug.

We'll try to get it fixed ASAP.

The workaround can be to initialize the IsStatic property after the 2 maps have been initialized.

I get it working with this code:
public OverviewMap(){
InitializeComponent();
MyMap.Layers.LayersInitialized += SetIsStatic;
}
 
void SetIsStatic(object sender, System.EventArgs args)
{
Dispatcher.BeginInvoke(() =>    {
    MyOverviewMap.IsStatic = false;
    MyOverviewMap.IsStatic = true;
});
}

And in XAML:

<esri:ArcGISTiledMapServiceLayer ID="StreetLayer"  Initialized="SetIsStatic"
   Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>


Thanks for reporting that.
0 Kudos
LanceCrumbliss
Frequent Contributor
Great workaround. 😄 Thanks Dominique.
0 Kudos