Skip to content

Commit

Permalink
Updated service used in Identify WMS sample for all platforms (#1395)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgutierrez-gis authored Mar 21, 2024
1 parent 2438668 commit 98a1e46
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using Esri.ArcGISRuntime.Data;
using Esri.ArcGISRuntime.Mapping;
using Esri.ArcGISRuntime.Ogc;
using Esri.ArcGISRuntime.UI;

namespace ArcGIS.Samples.WmsIdentify
{
Expand All @@ -22,10 +23,10 @@ namespace ArcGIS.Samples.WmsIdentify
public partial class WmsIdentify : ContentPage
{
// Create and hold the URL to the WMS service showing EPA water info
private Uri _wmsUrl = new Uri("https://watersgeo.epa.gov/arcgis/services/OWPROGRAM/SDWIS_WMERC/MapServer/WMSServer?request=GetCapabilities&service=WMS");
private Uri _wmsUrl = new Uri("https://sampleserver6.arcgisonline.com/arcgis/services/SampleWorldCities/MapServer/WMSServer?request=GetCapabilities&service=WMS");

// Create and hold a list of uniquely-identifying WMS layer names to display
private List<String> _wmsLayerNames = new List<string> { "4" };
private List<String> _wmsLayerNames = new List<string> { "1" };

// Hold the WMS layer
private WmsLayer _wmsLayer;
Expand All @@ -46,6 +47,9 @@ private async Task Initialize()
// Provide used Map to the MapView
MyMapView.Map = myMap;

// Disabling the WrapAroundMode property for the Mapview
MyMapView.WrapAroundMode = WrapAroundMode.Disabled;

// Create a new WMS layer displaying the specified layers from the service
_wmsLayer = new WmsLayer(_wmsUrl, _wmsLayerNames);

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using Esri.ArcGISRuntime.Data;
using Esri.ArcGISRuntime.Mapping;
using Esri.ArcGISRuntime.Ogc;
using Esri.ArcGISRuntime.UI;
using System;
using System.Collections.Generic;
using System.Linq;
Expand All @@ -28,10 +29,10 @@ public partial class WmsIdentify
{
// Create and hold the URL to the WMS service showing EPA water info.
private readonly Uri _wmsUrl = new Uri(
"https://watersgeo.epa.gov/arcgis/services/OWPROGRAM/SDWIS_WMERC/MapServer/WMSServer?request=GetCapabilities&service=WMS");
"https://sampleserver6.arcgisonline.com/arcgis/services/SampleWorldCities/MapServer/WMSServer?request=GetCapabilities&service=WMS");

// Create and hold a list of uniquely-identifying WMS layer names to display.
private readonly List<string> _wmsLayerNames = new List<string> {"4"};
private readonly List<string> _wmsLayerNames = new List<string> {"1"};

// Hold the WMS layer.
private WmsLayer _wmsLayer;
Expand All @@ -49,6 +50,9 @@ private async void Initialize()
// Apply an imagery basemap to the map.
MyMapView.Map = new Map(BasemapStyle.ArcGISImageryStandard);

// Disabling the WrapAroundMode property for the Mapview
MyMapView.WrapAroundMode = WrapAroundMode.Disabled;

// Create a new WMS layer displaying the specified layers from the service.
_wmsLayer = new WmsLayer(_wmsUrl, _wmsLayerNames);

Expand Down
Binary file modified src/WPF/WPF.Viewer/Samples/Layers/WmsIdentify/WmsIdentify.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using Esri.ArcGISRuntime.Data;
using Esri.ArcGISRuntime.Mapping;
using Esri.ArcGISRuntime.Ogc;
using Esri.ArcGISRuntime.UI;
using System;
using System.Collections.Generic;
using System.Linq;
Expand All @@ -28,10 +29,10 @@ public partial class WmsIdentify
{
// Create and hold the URL to the WMS service showing EPA water info.
private readonly Uri _wmsUrl = new Uri(
"https://watersgeo.epa.gov/arcgis/services/OWPROGRAM/SDWIS_WMERC/MapServer/WMSServer?request=GetCapabilities&service=WMS");
"https://sampleserver6.arcgisonline.com/arcgis/services/SampleWorldCities/MapServer/WMSServer?request=GetCapabilities&service=WMS");

// Create and hold a list of uniquely-identifying WMS layer names to display.
private readonly List<String> _wmsLayerNames = new List<string> { "4" };
private readonly List<String> _wmsLayerNames = new List<string> { "1" };

// Hold the WMS layer.
private WmsLayer _wmsLayer;
Expand All @@ -52,6 +53,9 @@ private async Task Initialize()
// Create a new WMS layer displaying the specified layers from the service.
_wmsLayer = new WmsLayer(_wmsUrl, _wmsLayerNames);

// Disabling the WrapAroundMode property for the Mapview
MyMapView.WrapAroundMode = WrapAroundMode.Disabled;

try
{
// Load the layer.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using Esri.ArcGISRuntime.Data;
using Esri.ArcGISRuntime.Mapping;
using Esri.ArcGISRuntime.Ogc;
using Esri.ArcGISRuntime.UI;
using Microsoft.UI.Xaml;
using System;
using System.Collections.Generic;
Expand All @@ -28,10 +29,10 @@ public partial class WmsIdentify
{
// Create and hold the URL to the WMS service showing EPA water info.
private readonly Uri _wmsUrl = new Uri(
"https://watersgeo.epa.gov/arcgis/services/OWPROGRAM/SDWIS_WMERC/MapServer/WMSServer?request=GetCapabilities&service=WMS");
"https://sampleserver6.arcgisonline.com/arcgis/services/SampleWorldCities/MapServer/WMSServer?request=GetCapabilities&service=WMS");

// Create and hold a list of uniquely-identifying WMS layer names to display.
private readonly List<string> _wmsLayerNames = new List<string> { "4" };
private readonly List<string> _wmsLayerNames = new List<string> { "1" };

// Hold the WMS layer.
private WmsLayer _wmsLayer;
Expand All @@ -49,6 +50,9 @@ private async Task Initialize()
// Apply an imagery basemap to the map.
MyMapView.Map = new Map(BasemapStyle.ArcGISImageryStandard);

// Disabling the WrapAroundMode property for the Mapview
MyMapView.WrapAroundMode = WrapAroundMode.Disabled;

// Create a new WMS layer displaying the specified layers from the service.
_wmsLayer = new WmsLayer(_wmsUrl, _wmsLayerNames);

Expand Down Expand Up @@ -102,6 +106,9 @@ private async void MyMapView_GeoViewTapped(object sender, Esri.ArcGISRuntime.UI.
return;
}


await ResultWebView.EnsureCoreWebView2Async();

// Show the result.
ResultWebView.NavigateToString(htmlContent);
ResultWebView.Visibility = Visibility.Visible;
Expand Down

0 comments on commit 98a1e46

Please sign in to comment.