Can't add layers from WMS Request in ArcGIS map

435
0
07-10-2020 12:13 AM
NenkoPakov
New Contributor

Hi, can somebody show me how to create Xamarin mobile app with map and to add on it two layers from this "http://anta.nat.bg:8080/cgi-bin/mapserv.exe?map=/ms4w/maps/map.map&SERVICE=WMS&VERSION=1.1.1&REQUEST..."
request.

I use the example in ArcGISRuntime Samples:

-----------------------------------------------------------------------

private readonly Uri _wmsUrl = new Uri(
"http://anta.nat.bg:8080/fcgi-bin/mapserv.exe?map=/ms4w/maps/map.map&SERVICE=WMS&request=getcapabilities&service=WMS");


private readonly List<string> _wmsLayerNames = new List<string> { "bnd_lines" };

public MapPage()
{
InitializeComponent();

Initialize();
}

private void Initialize()
{
Map myMap = new Map(Basemap.CreateLightGrayCanvas())
   {
   InitialViewpoint = new Viewpoint(
   new Envelope(-19195297.778679, 512343.939994, -3620418.579987, 8658913.035426, 0.0, 0.0,    SpatialReferences.WebMercator))
   };


MyMapView.Map = myMap;


WmsLayer myWmsLayer = new WmsLayer(_wmsUrl, _wmsLayerNames);


myMap.OperationalLayers.Add(myWmsLayer);
}

---------------------------------------------------------------------

But nothing is showing on the map.


I am new in programming and can't do it for days.
Many thanks!

0 Kudos
0 Replies