try { //code } catch { //empty catch block }
<esri:Map x:Name="BaseWIMS" IsLogoVisible="False" ExtentChanged="BaseWIMS_ExtentChanged" Extent="-98.220507, 36.188768, -96.225105, 34.716448" MouseClick="QueryPoint_MouseClick" > <i:Interaction.Behaviors> <esri:MaintainExtentBehavior /> <esri:ConstrainExtentBehavior ConstrainedExtent="-98.220507, 36.188768, -96.225105, 34.716448" /> </i:Interaction.Behaviors> <esri:ArcGISTiledMapServiceLayer ID="BaseLayer" Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" /> <esri:ArcGISDynamicMapServiceLayer ID="BoundaryLayer" Url="http://rest.owrb.ok.gov/ArcGIS/rest/services/Special_Studies/Garber_GWQ_Max_Metals_Boundary_WGS84/MapServer" Opacity=".85"/> <esri:ArcGISDynamicMapServiceLayer ID="CountyLayer" Url="http://rest.owrb.ok.gov/ArcGIS/rest/services/Base/SDE_State_County_PLSS_WGS84/MapServer" InitializationFailed="CountyLayer_InitializationFailed" Opacity=".9"/> <esri:ArcGISDynamicMapServiceLayer ID="DynamicLayer" Url="http://rest.owrb.ok.gov/ArcGIS/rest/services/Special_Studies/Garber_GWQ_Max_Metals_WGS84/MapServer" Initialized="ArcGISDynamicMapServiceLayer_Initialized" InitializationFailed="ArcGISDynamicMapServiceLayer_InitializationFailed" /> <esri:GraphicsLayer ID="GraphicsLayer" /> </esri:Map>
private void UserControl_Loaded(object sender, RoutedEventArgs e) { //Show disclaimer at startup, after splash screen. lblDisclaimer_Link(sender, e); BaseWIMS.MinimumResolution = .0001; //Fix for broken ConstrainExtentBehavior in SL4. /*System.Windows.Interactivity.Behavior behavior = new ESRI.ArcGIS.Client.Behaviors.ConstrainExtentBehavior() { ConstrainedExtent = new ESRI.ArcGIS.Client.Geometry.Envelope(-98.220507, 36.188768, -96.225105, 34.716448) }; System.Windows.Interactivity.Interaction.GetBehaviors(BaseWIMS).Add(behavior); */ BaseWIMS.Cursor = Cursors.Hand; }
<esri:ConstrainExtentBehavior ConstrainedExtent="-98.220507, 36.188768, -96.225105, 34.716448" />
Would you like me to upload with the reversed YMin and YMax so you can see the effects?
<esri:Map x:Name="BaseWIMS" IsLogoVisible="False" ExtentChanged="BaseWIMS_ExtentChanged" Extent="-98.220507, 34.716448, -96.225105, 36.188768" MouseClick="QueryPoint_MouseClick" > <i:Interaction.Behaviors> <!-- <esri:MaintainExtentBehavior />--> <esri:ConstrainExtentBehavior ConstrainedExtent="-98.220507, 34.716448, -96.225105, 36.188768" /> </i:Interaction.Behaviors> <esri:ArcGISTiledMapServiceLayer ID="BaseLayer" Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" /> <esri:ArcGISDynamicMapServiceLayer ID="BoundaryLayer" Url="http://rest.owrb.ok.gov/ArcGIS/rest/services/Special_Studies/Garber_GWQ_Max_Metals_Boundary_WGS84/MapServer" Opacity=".85"/> <esri:ArcGISDynamicMapServiceLayer ID="CountyLayer" Url="http://rest.owrb.ok.gov/ArcGIS/rest/services/Base/SDE_State_County_PLSS_WGS84/MapServer" InitializationFailed="CountyLayer_InitializationFailed" Opacity=".9"/> <esri:ArcGISDynamicMapServiceLayer ID="DynamicLayer" Url="http://rest.owrb.ok.gov/ArcGIS/rest/services/Special_Studies/Garber_GWQ_Max_Metals_WGS84/MapServer" Initialized="ArcGISDynamicMapServiceLayer_Initialized" InitializationFailed="ArcGISDynamicMapServiceLayer_InitializationFailed" /> <esri:GraphicsLayer ID="GraphicsLayer" /> </esri:Map>
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.