Select to view content in your preferred language

Design mode fails when used with ProxyURL and navigation control

741
0
05-06-2010 07:35 AM
BryanLynn
Deactivated User
I am converting a SL3 application to SL4 but I am using the 1.2 API and I have noticed some strange behavior in the design mode.  Not sure if this is a bug or a limitations.  Here are the scenarios:


  1. Map control NO proxyURL everything looks fine in the designer no error messages.

  2. Map control with proxyURL everything looks fine in the designer no error messages.

  3. Map control and navagation control with NO proxyURL and the map disappears in the designer but the application works correctly.

  4. Map control and navigation control with proxyURL on map layer and the designer throws a parser error.  However the application works correctly.

Here is the XAML that I was using:
<Grid x:Name="LayoutRoot" Background="White">

        <!-- Scenario 1 -->
        <!-- Using map control with NO ProxyURL. No error in design mode. -->
        <esri:Map Background="Beige" HorizontalAlignment="Stretch" Margin="10,10,10,10" Name="map1" VerticalAlignment="Stretch">
            <esri:ArcGISTiledMapServiceLayer ID="BasemapLayer" Opacity="0.8" Url="http://secure.mapservice" />
        </esri:Map>

        <!-- Scenario 2 -->
        <!-- Using map control with ProxyURL. No error in design mode. -->
        <!--<esri:Map Background="Beige" HorizontalAlignment="Stretch" Margin="10,10,10,10" Name="map1" VerticalAlignment="Stretch">
            <esri:ArcGISTiledMapServiceLayer ID="BasemapLayer"  Opacity="0.8" ProxyURL="../proxy.ashx" Url="http://secure.mapservice" />
        </esri:Map>-->

        <!-- Scenario 3 -->
        <!-- Using map control and navigation control with NO ProxyURL set for the map.
             No error in design mode but the map control doesn't display.
             However, the application works. -->        
        <!--<esri:Map Background="Beige" HorizontalAlignment="Stretch" Margin="10,10,10,10" Name="map1" VerticalAlignment="Stretch">
            <esri:ArcGISTiledMapServiceLayer ID="BasemapLayer" Opacity="0.8" Url="http://secure.mapservice" />
        </esri:Map>
        <esriToolkit:Navigation x:Name="nav" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="20,20,0,0" Map="{Binding ElementName=map1}"  />-->
        

        <!-- Scenario 4 -->
        <!-- Using map control and navigation control with ProxyURL set for the map.
             Throws parser error in design view.  However, the application still works. -->
        <!--<esri:Map Background="Beige" HorizontalAlignment="Stretch" Margin="10,10,10,10" Name="map1" VerticalAlignment="Stretch">
            <esri:ArcGISTiledMapServiceLayer ID="BasemapLayer" ProxyURL="../proxy.ashx" Opacity="0.8" Url="http://secure.mapservice" />
        </esri:Map>
        <esriToolkit:Navigation x:Name="nav" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="20,20,0,0" Map="{Binding ElementName=map1}"  />-->

    </Grid>
0 Kudos
0 Replies