Select to view content in your preferred language

Problems with Graphics Layer

864
4
08-30-2010 10:26 AM
JorgeBerumen
Emerging Contributor
Hello there.

I am currently working with the ArcGIS Silverlight API v2.0 alongside ArcGIS Server 9.3.1. Right now I am following one of the tutorials in the Samples site - the custom symbols example. I try the code using the server provided and works wonderfully, however, when I switch over to my map service the map doesn't show up neither does the graphics layer (everything is white). Is there an incompatibility here? Why am I having this problem? Here is the simple code:

Working
    
<Grid x:Name="LayoutRoot" Background="White">
        <Grid.Resources>
             <esri:SimpleMarkerSymbol x:Key="RedMarkerSymbol" Color="Red" Size="12" Style="Circle" />
        </Grid.Resources>
        <esri:Map x:Name="MyMap" Background="White">
            <esri:ArcGISTiledMapServiceLayer ID="PhysicalTiledLayer" Url="http://server.arcgisonline.com/ArcGIS/rest/services/NPS_Physical_World_2D/MapServer"/>
            <esri:GraphicsLayer ID="MyGraphics" >
                <esri:GraphicsLayer.Graphics >
                    <esri:Graphic Symbol="{StaticResource RedMarkerSymbol}" >
                        <esri:MapPoint X="0" Y="0" />
                    </esri:Graphic>
                </esri:GraphicsLayer.Graphics>
            </esri:GraphicsLayer>
        </esri:Map>
    </Grid>
</UserControl>


Not working:
    
<Grid x:Name="LayoutRoot" Background="White">
        <Grid.Resources>
             <esri:SimpleMarkerSymbol x:Key="RedMarkerSymbol" Color="Red" Size="12" Style="Circle" />
        </Grid.Resources>
        <esri:Map x:Name="MyMap" Background="White">
            <esri:ArcGISTiledMapServiceLayer ID="PhysicalTiledLayer" Url="http://myserver/ArcGIS/rest/services/Storm"/>
            <esri:GraphicsLayer ID="MyGraphics" >
                <esri:GraphicsLayer.Graphics >
                    <esri:Graphic Symbol="{StaticResource RedMarkerSymbol}" >
                        <esri:MapPoint X="0" Y="0" />
                    </esri:Graphic>
                </esri:GraphicsLayer.Graphics>
            </esri:GraphicsLayer>
        </esri:Map>
    </Grid>
</UserControl>


Thanks in advance!
0 Kudos
4 Replies
egismazeika
Emerging Contributor
You should always check the url in the browser first.
This time try http://myserver/ArcGIS/rest/services/Storm/MapServer
0 Kudos
JorgeBerumen
Emerging Contributor
You should always check the url in the browser first.  
This time try   http://myserver/ArcGIS/rest/services/Storm /MapServer


I apologize - I hand-edited the URL to prevent disclosing my actual server. The server URL is fine. I know so because I've attempted the project without the graphics layer and with the graphics layer. It works without but not with a graphics layer. Can someone please help me?
0 Kudos
egismazeika
Emerging Contributor
GraphicsLayer code is fine and is has nothing to do with errors you get. This is your server (service) problem.
0 Kudos
JorgeBerumen
Emerging Contributor
What do you think is wrong? I've attempted to recreate the service all together and the same thing occurs. What options should I modify?

Thanks!
0 Kudos