AnsweredAssumed Answered

load a special wms server map in WPF

Question asked by spring2 on Dec 14, 2015
Latest reply on Dec 15, 2015 by spring2

Hi Dears

I can load all of these links in arcmap. These links are WMS server.

  1. http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi http://openwms.statkart.no/skwms1/wms.sjo_hovedkart2
  2. http://www.gebco.net/data_and_products/gebco_web_services/web_map_service/mapserv?request=getmap&service=wms&BBOX=-90,30…
  3. http://www.richlandmaps.com/geoserver/wms/
  4. MapServer Message

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

Outcomes