Hi Dears
I can load all of these links in arcmap. These links are WMS server.
I want to use these servers in WPF. I want to load a WMS server in WPF and use it.
this is my xaml code:
<Window x:Class="MAP_Mary.MainWindow" xmlns:esri="http://schemas.esri.com/arcgis/client/2009"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid x:Name="LayoutRoot" Background="White">
<esri:Map x:Name="MyMap" Extent="-130,10,-70,60" >
</esri:Map>
<Button Content="Button" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/>
</Grid>
</Window>
this is my background code:
var wmsLayer = new WmsLayer()
{
Url="http://openwms.statkart.no/skwms1/wms.sjo_hovedkart2?",
Layers = new string[] { "overview" },
};
MyMap.Layers.Add(wmsLayer);
this code works for links(1,2), but unfortunetly, it doesn`t work for links (3,4). it can`t show the layer in links (3,4).
please help me, I really need your help.
sincerely
Solved! Go to Solution.
Fortunately, I found the answer. I put a tile map server as background under the layer. It fixed the problem.
<esri:Map x:Name="MyMap" ZoomDuration="00:00:00" PanDuration="00:00:00">
<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>
Good Luck
Fortunately, I found the answer. I put a tile map server as background under the layer. It fixed the problem.
<esri:Map x:Name="MyMap" ZoomDuration="00:00:00" PanDuration="00:00:00">
<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>
Good Luck