Select to view content in your preferred language

SimpleMarkerSymbol not displaying all map features

931
5
Jump to solution
02-07-2012 07:42 AM
MattSimmons
Deactivated User
I've got a test ArcGIS Silverlight app and I've successfully got maptips displaying all my attribute data for a point layer, but not all points are showing up.  I grabbed the maptips sample from the Silverlight API interactive SDK website.  For example, my ArcGIS Server map service has a layer that contains 4000+ points.  All of these display fine in the application, but when I use the following:

        <Grid.Resources>
            <esri:SimpleMarkerSymbol x:Key="DefaultMarkerSymbol" Color="Red" />
        </Grid.Resources>

to generate the symbols which the maptips use, only about half of the points generate.  According to the code above, I should be getting a red dot at all point features but I don't.  Any ideas on what I should chase down?  Is this a layer properties problem with the map service or a silverlight code problem?
0 Kudos
1 Solution

Accepted Solutions
DominiqueBroux
Esri Frequent Contributor
There is a maximum number of features that can be returned by the service.
You probably reached this limit (often 1000 but can be changed).

The workaround may be to use the Mode 'OnDemand' (defined on the FeatureLayer) so only the features inside the current extent will be loaded.

View solution in original post

0 Kudos
5 Replies
MattSimmons
Deactivated User
Not sure if this is a coincidence or not, but it looks like its only applying a graphic to ObjectID's with 3 digits or less, which makes no sense to me...
0 Kudos
JenniferNery
Esri Regular Contributor
If you want the same symbol applied to the GraphicsLayer, you can set GraphicsLayer.Renderer with this symbol just as in the following SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#FeatureLayerSimple

    <Grid x:Name="LayoutRoot" Background="White" >
  <Grid.Resources>
   <esri:SimpleRenderer x:Key="MySimplePointRenderer">
    <esri:SimpleRenderer.Symbol>
     <esri:SimpleMarkerSymbol Color="#99FF0000"/>
    </esri:SimpleRenderer.Symbol>
   </esri:SimpleRenderer>   
  </Grid.Resources>

  <esri:Map x:Name="MyMap" WrapAround="True" Extent="-15000000,2000000,-7000000,8000000">
            <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer"
                    Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
            <esri:FeatureLayer ID="MyFeatureLayer"
                    Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/0" 
                    Where="POP1990 > 100000" Renderer="{StaticResource MySimplePointRenderer}"/>
        </esri:Map>
0 Kudos
MattSimmons
Deactivated User
Thanks for the reply!  But not sure how that helps here - I've got a data layer from an .msd with 4000+ points, but when I set it up for maptips, only half, or so, show up in the application's graphics layer.  What would prevent them all from displaying?  I have no where clauses in any layers.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
There is a maximum number of features that can be returned by the service.
You probably reached this limit (often 1000 but can be changed).

The workaround may be to use the Mode 'OnDemand' (defined on the FeatureLayer) so only the features inside the current extent will be loaded.
0 Kudos
MattSimmons
Deactivated User
BINGO - that was it - Thank you!
0 Kudos