Select to view content in your preferred language

How to display a single grouped MapService layer?

537
2
04-13-2011 01:48 PM
SuiHuang
Frequent Contributor
Hi Experts:

    I am developing a silverlight application to display a layer in a map service. The layer is inside a grouped layer of the map service, and I haven't find the way to make the silverlight application work.

    Here is a demostration of the issue I encountered:
1. I built a silverlight application following this live example provided by ESRI (directly use the provided code):
http://serverapps.esri.com/ArcGIS/rest/services/WashingtonDC/MapServer/10
2. In the application I replaced the original map with the following:
*********************************************
        <esri:Map x:Name="MyMap" Grid.Column="0">
            <esri:FeatureLayer Url="http://serverapps.esri.com/ArcGIS/rest/services/WashingtonDC/MapServer/10" Opacity="1" />
        </esri:Map>
*********************************************
    Then the application cannot display the layer properly.

    The map service layer
         "http://serverapps.esri.com/ArcGIS/rest/services/WashingtonDC/MapServer/10"
    is provided by ESRI and it is under a group.
    I guess the reason why the usually way I used to display a feature layer does not work may be:
1. this layer is grouped
2. there is no tiled layer in the map together with it

    Can you give me some idea how to get this layer displayed?
    Thank you.

My development environment:
-- .Net 4
-- Silverlight 4
-- Visual Studio 2010
0 Kudos
2 Replies
DominiqueBroux
Esri Frequent Contributor
http://serverapps.esri.com/ArcGIS/rest/services/WashingtonDC/MapServer/10 is a 9.3 map service without default symbology.
Hence you have to provide a FeatureSymbol of type 'LineSymbol' to your FeatureLayer.
0 Kudos
SuiHuang
Frequent Contributor
http://serverapps.esri.com/ArcGIS/rest/services/WashingtonDC/MapServer/10 is a 9.3 map service without default symbology.
Hence you have to provide a FeatureSymbol of type 'LineSymbol' to your FeatureLayer.


Hi, I changed the extent as described in the map service and then some features are displayed. Thank you for reminding me the symbol.
0 Kudos