Select to view content in your preferred language

My map doesn't display

730
4
08-24-2010 08:09 AM
AlejandroMorales
Emerging Contributor
Hi, I'm wondering if anyone of you guys ever had this problem

I'm trying to display a DynamicMapServiceLayer  but the map it doesn't show , I tried on IE8 and gives me an error about security and crossdomain and FF 3.5 just gives a [!] I've been looking how to solve this error but all I've found is "put de crossdomain.xml file into your web site directory" and I do it and still doesn't work 😞

Please help me!! if you have detail instructions I will apreciate very much

this is my code if it helps
<UserControl x:Class="Prueba2Silverlight.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:esri="http://schemas.esri.com/arcgis/client/2009" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="1079" d:DesignWidth="476">
       
    <Grid x:Name="LayoutRoot" Background="White" Height="783" Width="476">
       
        <esri:Map x:Name="MyMap" Extent="-120,20,-100,40" Margin="12,-118,0,432">
            <esri:Map.Layers>
                <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" />
            </esri:Map.Layers>
           
        </esri:Map>
       
        <esri:Map x:Name="Mapa2" Margin="0,350,0,-41">
            <!--<esri:ArcGISDynamicMapServiceLayer ID="MyLayer" Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapSe..." />-->
            <esri:ArcGISDynamicMapServiceLayer ID="MyLayer" Url="http://servarcgisprd/arcgis/rest/services/Demo_001/MapServer" />

        </esri:Map>

    </Grid>
</UserControl>
0 Kudos
4 Replies
BrockTerry
Emerging Contributor
Hello-

Try putting the crossdomainpolicy.xml at every root in your C:\Inetpub.

Ex:

Have it under the Inetpub, the folder in which you have the project, the ArcGIS Folder, etc.

I put this file in every location until it worked.  Not very scientific but I've never had any trouble since doing so.
0 Kudos
BrockTerry
Emerging Contributor
Also this portion of your code:

<!--<esri:ArcGISDynamicMapServiceLayer ID="MyLayer" Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapSe..." />-->


is commented out with the <!-- designation.
0 Kudos
AlejandroMorales
Emerging Contributor
Thank you for your response, I will do it and tell you about it

That line is commented because that's the line I use to call my map service the one who doesn't work, that's why I try ESRI's public services but with its services I have no problem at all...
0 Kudos