Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated service used in Identify WMS sample for all platforms #1395

Merged
merged 7 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Loading