Select to view content in your preferred language

Some Features not rendering in ArcGIS Runtime

3287
1
04-30-2012 12:31 AM
Labels (1)
by Anonymous User
Not applicable
Original User: LarsCLarsen

I am testing the new Runtime prerelease and made a very simple sample. I basically just exported a map package from one of my ArcMap applications including data and tried to render the same layers in Runtime. However as it can be seen on the attached screendumps some features simply do not appear in the runtime version. The missing features are from the same featureclass as the one showing up and the only thing 'special' about the missing ones is that they appear late in the table (i.e. have high objectid numbers). It happens for both points and lines.

First I thought that it had to do with the features being part of a geometric network, or the database having class extension. But I have now removed both and the problem persist.

Anyone have a good explanation? I have added the map package with the data and the XAML code looks like this:

  <Grid>
        <Grid.Resources>
            <esri:SimpleRenderer x:Key="ptRenderer">
                <esri:SimpleRenderer.Symbol>
           
                    <esri:SimpleMarkerSymbol Style="Triangle" Color="Orange"/>
                </esri:SimpleRenderer.Symbol>
            </esri:SimpleRenderer>
            <esri:SimpleRenderer x:Key="LineRenderer">
                <esri:SimpleRenderer.Symbol>
                    <esri:SimpleLineSymbol Style="Solid" Color="Blue"  Width="3" />
                </esri:SimpleRenderer.Symbol>
            </esri:SimpleRenderer>
        </Grid.Resources>
        <!-- Map Control-->
        <esri:Map x:Name="_mapControl" UseAcceleratedDisplay="False" >

    
            <!-- * FeatureLayer(s) * -->
<esri:ArcGISLocalFeatureLayer ID="MOUSE Manholes" LayerName="MOUSE Manholes" Renderer="{StaticResource ptRenderer}"
                   Path="muCoeff.mpk"  />
            <esri:ArcGISLocalFeatureLayer ID="MOUSE Basins" LayerName="MOUSE Basins" Renderer="{StaticResource ptRenderer}"
                   Path="muCoeff.mpk"  />
            <esri:ArcGISLocalFeatureLayer ID="MOUSE Outlets" LayerName="MOUSE Outlets" Renderer="{StaticResource ptRenderer}"
                   Path="muCoeff.mpk"  />
            <esri:ArcGISLocalFeatureLayer ID="MOUSE Links" LayerName="MOUSE Links" Renderer="{StaticResource LineRenderer}"
                   Path="muCoeff.mpk"  />
            <esri:ArcGISLocalFeatureLayer ID="MOUSE Storage Nodes" LayerName="MOUSE Storage Nodes" Renderer="{StaticResource ptRenderer}"
                   Path="muCoeff.mpk"  />
            <esri:ArcGISLocalFeatureLayer ID="MOUSE Weirs" LayerName="MOUSE Weirs" Renderer="{StaticResource LineRenderer}"
                   Path="muCoeff.mpk"  />
            <esri:ArcGISLocalFeatureLayer ID="MOUSE Orifices" LayerName="MOUSE Orifices" Renderer="{StaticResource LineRenderer}"
                   Path="muCoeff.mpk"  />
            <esri:ArcGISLocalFeatureLayer ID="MOUSE Curb Inlet" LayerName="MOUSE Curb Inlet" Renderer="{StaticResource ptRenderer}"
                   Path="muCoeff.mpk"  />
            <esri:ArcGISLocalFeatureLayer ID="MOUSE Pumps" LayerName="MOUSE Pumps" Renderer="{StaticResource LineRenderer}"
                   Path="muCoeff.mpk"  />
            <esri:ArcGISLocalFeatureLayer ID="MOUSE Valve" LayerName="MOUSE Valve" Renderer="{StaticResource LineRenderer}"
                   Path="muCoeff.mpk"  />
       

        </esri:Map>
        <esri:Navigation HorizontalAlignment="Left" Margin="25,12,0,0" Name="navigation1" VerticalAlignment="Top" Map="{Binding ElementName=_mapControl}" />
        <esri:ScaleLine HorizontalAlignment="Left" Margin="314,12,0,0" Name="scaleLine1" VerticalAlignment="Top" Panel.ZIndex="1" Map="{Binding ElementName=_mapControl}" Height="38" />
    </Grid>

Lars
0 Kudos
1 Reply
MichaelBranscomb
Esri Frequent Contributor
Hi,

By default the LocalFeatureService which is created when you specify an ArcGISLocalFeatureLayer instance in XAML has a limit of 1000 features which matches the ArcGIS Server FeatureServer default limit of 1000 (in 10.1).

In order to render more than the default 1000 features from this layer you will need to set the MaxRecords property on the LocalFeatureService. It is still possible to do this in XAML - you'll need to declare a LocalFeatureService as a resource then bind the Service property of the ArcGISLocalFeatureLayer to that local service. If you are working with that number of features in the display I would recommend considering the new accelerated display functionality - easily enabled in the example below by setting UseAcceleratedDisplay to true. Alternatively there is an AcceleratedDisplayLayers group layer which you can use to just enabled the new display on a specific set of layers (useful if you want one or two layers on top of the map with cluster renderers or animated symbols).

For example:

<Grid.Resources>
    <esri:LocalFeatureService x:Key="_localFeatureService" Path="muCoeff.mpk" MaxRecords="500000" />
    <esri:SimpleRenderer x:Key="ptRenderer">
        <esri:SimpleRenderer.Symbol>
            <esri:SimpleMarkerSymbol Style="Triangle" Color="Orange"/>
        </esri:SimpleRenderer.Symbol>
    </esri:SimpleRenderer>
</Grid.Resources>

<esri:Map x:Name="_mapControl" UseAcceleratedDisplay="True" >
<esri:ArcGISTiledMapServiceLayer ID="World Topo Map"
       Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
<esri:ArcGISLocalFeatureLayer ID="MOUSE Manholes" LayerName="MOUSE Manholes"
       Service="{StaticResource _localFeatureService}"
       Renderer="{StaticResource ptRenderer}" />
</esri:Map>

Cheers

Mike
0 Kudos