IsInScaleRange not working in Legend

5617
11
05-07-2013 11:34 PM
AlekseyShulga
New Contributor II
Hi,
I found a weird bug. I use a simple example:
<esri:Map x:Name="MyMap"  WrapAround="True">
    <esri:ArcGISDynamicMapServiceLayer Url="http://myserver/arcgis/rest/services/objects/MapServer" />
</esri:Map>

<esri:Legend Map="{Binding ElementName=MyMap}" LayerItemsMode="Tree" ShowOnlyVisibleLayers="False" >
    <esri:Legend.MapLayerTemplate>
        <DataTemplate>
            <StackPanel Orientation="Horizontal">
                <CheckBox Content="{Binding Label}" IsChecked="{Binding IsEnabled, Mode=TwoWay}" 
                                IsEnabled="{Binding IsInScaleRange}" >
                </CheckBox>
            </StackPanel>
        </DataTemplate>
    </esri:Legend.MapLayerTemplate>
    <esri:Legend.LayerTemplate>
        <DataTemplate>
            <CheckBox Content="{Binding Label}" IsChecked="{Binding IsEnabled, Mode=TwoWay}" 
                            IsEnabled="{Binding IsInScaleRange}" >
            </CheckBox>
        </DataTemplate>
    </esri:Legend.LayerTemplate>
</esri:Legend>
It's ok. IsEnabled="{Binding IsInScaleRange}" works.
I add ArcGISTiledMapServiceLayer in the map before my ArcGISDynamicMapServiceLayer, I get:
- if ArcGISTiledMapServiceLayer is a tiled map service, IsInScaleRange works
- if ArcGISTiledMapServiceLayer is a image service, IsInScaleRange NOT works
<esri:ArcGISTiledMapServiceLayer ShowLegend="False" Url="http://myserver/arcgis/rest/services/base/MapServer" />
<esri:ArcGISTiledMapServiceLayer ShowLegend="False" Url="http://myserver/arcgis/rest/services/ortho/ImageServer" />
I don't want to use ArcGISImageServiceLayer for the ImageServer, because ArcGISImageServiceLayer displayed very slowly. Why is it not working?
PS: This example works fine on JavaScript, but not work on SL.
0 Kudos
11 Replies
DominiqueBroux
Esri Frequent Contributor
Could you share the URL of the non working service?

Thanks
0 Kudos
AlekseyShulga
New Contributor II
Ok. But I need some time to prepare test services and publish them for you. My services now is private.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
I eventually reproduced the issue.

We'll try to get it fixed in a future version.

Meanwhile, the workaround may be to set the Layer minimum and MaximumResolution accordinly with the min and max scale defined at server side.

Thanks for reporting that.
0 Kudos
AlekseyShulga
New Contributor II
Thanks.
When the expected release of a new version?
0 Kudos
AlekseyShulga
New Contributor II
Ver 3.2 nothing changed... 😞
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Ver 3.2 nothing changed... 😞

The issue is supposed to be fixed with version 3.2.
Do you mean that you still run into the issue after migrating to 3.2?
0 Kudos
AlekseyShulga
New Contributor II
Hi, dbroux.

After migration to 3.2 IsInScaleRange work fine for map-layers in WGS84, but if I use custom spatial reference this bug still exists. Now I'm experimenting to confirm this.
I'll tell the result later.
0 Kudos
AlekseyShulga
New Contributor II
Confirmation.
IsInScaleRange changing, if I use spatial reference WKID=102100 (wgs84 web mercator). For custom SR IsInScaleRange not work.
0 Kudos