POST
|
The terms of use for the ArcGIS Maps SDK for .NET don't permit building web APIs ("License may not be used to develop Internet or server-based Value-Added Applications"). The SDK is intended for creating end-user native apps that are installed on mobile, desktop, etc devices. It does support more than just Windows though, because you can also build for Android and iOS, using .NET MAUI. If you need to build a web service, perhaps you can use the Routing service available with ArcGIS Location Platform, and call the REST API from .NET? Routing | ArcGIS REST APIs | ArcGIS Developers If you have time, we are gathering requirements for a .NET API that would support building server/service-based apps, I'd love to hear more about your project: MBranscomb@esri.com. Thanks
... View more
yesterday
|
1
|
0
|
33
|
POST
|
Hi @BillFox @ShannonPugh Are you using Bing Maps for Enterprise Basic or Free, or do you have a paid Bing Maps for Enterprise license? Thanks
... View more
Tuesday
|
0
|
0
|
36
|
POST
|
Hi, You can find more information about the new 200.x samples in the app stores (Apple, Google, and Microsoft) here: Kotlin: ArcGIS Maps SDK for Kotlin samples | ArcGIS Maps SDK for Kotlin | Esri Developer Swift: ArcGIS Maps SDK for Swift sample code | ArcGIS Maps SDK for Swift | Esri Developer .NET: ArcGIS Maps SDK for .NET sample code | ArcGIS Maps SDK for .NET | Esri Developer Thanks
... View more
Tuesday
|
0
|
0
|
23
|
POST
|
Hi, There appear to be some discrepancy in the encoding of the symbols within the service, can you provide more info on how you published this service? (e.g. where did the symbology come from? e.g. the version of ArcGIS Pro did you use to publish?) Thanks Mike
... View more
Tuesday
|
0
|
0
|
23
|
BLOG
|
Version 100.15.6 of the ArcGIS Runtime SDKs for Android, iOS, Java, .NET, and Qt is now available. This patch includes bug fixes and 3rd party library updates. For more details, please see the SDK-specific Release Notes topics: ArcGIS Runtime SDK for Android ArcGIS Runtime SDK for iOS ArcGIS Runtime SDK for Java ArcGIS Runtime SDK for .NET ArcGIS Runtime SDK for Qt Get the update via the package manager for your chosen platform, or download from the Esri Developer site: Downloads | ArcGIS Runtime API for Android | Esri Developer Downloads | ArcGIS Runtime API for iOS | Esri Developer Downloads | ArcGIS Runtime API for Java | Esri Developer Downloads | ArcGIS Runtime API for .NET | Esri Developer Downloads | ArcGIS Runtime API for Qt | Esri Developer
... View more
2 weeks ago
|
2
|
0
|
143
|
POST
|
A couple more questions: When you're viewing the integrated mesh in the portal - do you mean it's a scene service hosted by ArcGIS Enterprise that you're viewing in the SceneViewer web app? What workflow are you following to create the scene layer package (slpk) from the service? Thanks
... View more
2 weeks ago
|
0
|
1
|
211
|
POST
|
Hi, That does look much coarser than I would expect. A few questions: What version of the Maps SDK for Unity are you using? (latest is v1.6) What VR headset is the app running on? What does the integrated mesh look like in the Unity Editor? What does the integrated mesh look like in another app e.g. try the free ArcGIS Earth Have you tried adjusting the Quality Scaling Factor property? (This option allows you to control the quality of the GIS content being rendered. A higher number indicates higher quality and a higher impact on performance. The default number is 2.) Thanks
... View more
2 weeks ago
|
0
|
3
|
248
|
POST
|
Hi, and welcome! For full offline workflows, Mobile Map Packages are usually the best approach - they're easy to create with ArcGIS Pro, self-contained, portable, and easy to work with in the SDK. But, some developers prefer the more granular approach of using individual data files and creating the map in code. If your app is fully offline and will never be connected to a server/service, AND you want to create/edit features then you could consider using both approaches - use a Mobile Map Package for all your background/context data, and in code create a mobile geodatabase and feature tables to add the features you want to create (custom geo-bodies). See these samples: Open mobile map package | ArcGIS Maps SDK for .NET | Esri Developer Create mobile geodatabase | ArcGIS Maps SDK for .NET | Esri Developer If you prefer to write code to add all the individual files that would be in a mobile map package, then see Work with data files | ArcGIS Maps SDK for .NET | Esri Developer.
... View more
3 weeks ago
|
1
|
1
|
123
|
POST
|
Here's an example using WebView2: public class OAuthAuthorizeHandlerWpf : IOAuthAuthorizeHandler
{
// Embedded Browser: Use a System.Windows.Window to host the sign-in UI provided by the server.
private Window? authWindow;
// Use a TaskCompletionSource to track the completion of the authorization.
private TaskCompletionSource<IDictionary<string, string>>? taskCompletionSource;
// URL for the authorization callback result (the redirect URI configured for your application).
private string? redirectUrl;
// Function to initiate an authorization request.
// It takes the URIs for: the secured service, the authorization endpoint, and the redirect URI.
public Task<IDictionary<string, string>> AuthorizeAsync(Uri serviceUri, Uri authorizeUri, Uri redirectUri)
{
// Don't start an authorization request if one is still in progress.
if (taskCompletionSource != null && !taskCompletionSource.Task.IsCompleted)
{ throw new Exception("Authentication request already in progress."); }
// Instantiate the TaskCompletionSource to track the completion of the authorization.
taskCompletionSource = new TaskCompletionSource<IDictionary<string, string>>();
// Store the authorization and redirect URLs.
redirectUrl = redirectUri.AbsoluteUri;
// Show the sign-in page (schedule to be run on the main UI thread).
Dispatcher? dispatcher = Application.Current.Dispatcher;
if (dispatcher == null || dispatcher.CheckAccess())
{
// Currently on the UI thread, no need to dispatch.
ShowLoginWindow(authorizeUri);
}
else
{
// AuthorizeAsync was called on a separate thread, dispatch to the UI thread.
Action? authorizeOnUIAction = () => ShowLoginWindow(authorizeUri);
dispatcher.BeginInvoke(authorizeOnUIAction);
}
// Return the task associated with the TaskCompletionSource.
return taskCompletionSource.Task;
}
// A function to show a sign-in page hosted at the specified Url.
private void ShowLoginWindow(Uri authorizeUri)
{
// Instantiate a Microsoft Edge (Chromium) WebView2 control.
// See: https://learn.microsoft.com/en-us/microsoft-edge/webview2/
// Note: When releasing an app that uses Microsoft Edge WebView2, you need distribute the WebView2 Runtime, either:
// - By distributing the automatically updated Evergreen Runtime or;
// - By distributing a Fixed Version of the Runtime.
// See-also: https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution
WebView2? webView2 = new();
// Display the web browser in a new window.
authWindow = new Window
{
Icon = null,
Title = authorizeUri.Authority,
Content = webView2,
Width = 400,
Height = 500,
WindowStartupLocation = WindowStartupLocation.CenterOwner
};
// Set the app as the owner of the authentication dialog window.
if (Application.Current != null && Application.Current.MainWindow != null)
{
authWindow.Owner = Application.Current.MainWindow;
}
// Handle the window closed event.
authWindow.Closed += OnWindowClosed;
// Set the Source property of the WebView2 to the Authorize URI (e.g. {https://www.arcgis.com/sharing/oauth2/authorize?response_type=code...).
webView2.Source = authorizeUri;
// Handle the WebView2 NavigationStarting event in which we'll check if the destination URL is our Redirect URI and then process.
webView2.NavigationStarting += WebView2_NavigationStarting;
// Show the dialog to the user.
authWindow.ShowDialog();
}
private void WebView2_NavigationStarting(object? sender, Microsoft.Web.WebView2.Core.CoreWebView2NavigationStartingEventArgs e)
{
// Check for nulls/empties.
if (sender == null || sender is not WebView2 || string.IsNullOrEmpty(e.Uri))
return;
if (redirectUrl != null)
{
// Check if browser was redirected to the Redirect URI (indicates successful authentication).
if (new Uri(e.Uri).AbsoluteUri.StartsWith(redirectUrl))
{
// Cancel the page navigation.
e.Cancel = true;
// Call a function to parse key/value pairs from the response URI and set the result for the task completion source with the returned dictionary.
taskCompletionSource?.SetResult(DecodeParameters(new Uri(e.Uri)));
// Close the window.
authWindow?.Close();
}
}
}
// A function to parse key/value pairs from the provided URI.
private static Dictionary<string, string> DecodeParameters(Uri uri)
{
string? str = string.Empty;
if (!string.IsNullOrEmpty(uri.Fragment))
str = uri.Fragment[1..];
else if (!string.IsNullOrEmpty(uri.Query))
str = uri.Query[1..]; ;
// Create new dictionary of key value string pairs to hold the return values.
Dictionary<string, string> keyValueDictionary = [];
/*
* .NET 6 and above includes convenient HttpUtility class.
*/
// Parse the URI query string into a collection.
NameValueCollection nameValueCollection = HttpUtility.ParseQueryString(str);
foreach (string key in nameValueCollection.Keys)
{
keyValueDictionary[key] = nameValueCollection[key] ?? string.Empty;
}
/*
* Use .NET Framework compatible pattern.
*/
// Parse parameters into key / value pairs.
//string[] keysAndValues = str.Split(new[] { '&' }, StringSplitOptions.RemoveEmptyEntries);
//foreach (string kvString in keysAndValues)
//{
// string[] pair = kvString.Split('=');
// string? key = pair[0];
// string? value = string.Empty;
// if (key.Length > 1)
// {
// value = Uri.UnescapeDataString(pair[1]);
// }
// keyValueDictionary.Add(key, value);
//}
return keyValueDictionary;
}
// Handle the browser window closing.
private void OnWindowClosed(object? sender, EventArgs? e)
{
// If the browser window closes, return the focus to the main window.
if (authWindow != null && authWindow.Owner != null)
{
authWindow.Owner.Focus();
}
// If the task wasn't completed, the user must have closed the window without logging in.
if (taskCompletionSource != null && !taskCompletionSource.Task.IsCompleted)
{
// Set the task completion source exception to indicate a canceled operation.
taskCompletionSource.SetCanceled();
}
authWindow = null;
}
}
... View more
3 weeks ago
|
1
|
0
|
367
|
POST
|
Hi, I'm not aware of any current issues ArcGIS Online, and having just tried the OAuth workflow with ArcGIS Online in a WPF app, it worked as expected. Can you share more info about your setup/project? Is it reproducible on multiple machines in your team/company? What version of the SDK are you referencing? Are you targeting .NET or .NET Framework? What version of the .NET platform/runtime you're using is on the machines where you see the issue? What embedded browser control are you using in your OAuth dialog? Thanks
... View more
3 weeks ago
|
0
|
0
|
391
|
POST
|
Hi, Can you share a bit more information about your project? It appears it might be a little outside what's considered normal/permitted usage of the SDK. As far as I'm aware, we haven't designed for, or tested, rendering to an embedded Web View and therefore may not technically be able to support Blazor Hybrid. Additionally the terms of use include "...may not be used to develop Internet or server-based Value-Added Applications". It's licensed per-user (and per-application if using the license string approach) and therefore the service/server usage limitation typically applies to server-side applications that can be accessed concurrently by multiple users. Thanks
... View more
3 weeks ago
|
1
|
1
|
202
|
POST
|
Hi, The first part of your approach is correct - basemaps for offline use are either a vector tile layer (.vtpk) containing features such as streets, etc, or an image tile layer (.tpkx) typically used for aerial/satellite imagery. Elevation is also an image tile layer, but the tiles need to be generated as a LERC-encoded. You'll need to follow the steps in this topic to create a tile package for elevation Share a tile package—ArcGIS Pro | Documentation, and specifically you're going to follow the section Create a tile package for a web elevation layer. Summary: To create a tile package that publishes an offline elevation layer, the following must be true: The input raster dataset must represent elevation data. The tiling scheme must use LERC compression. If you're not working in the coordinate system Web Mercator Auxiliary Sphere (i.e. ArcGIS Online, etc) and instead you're working in local/projected coordinate system then you'll need to use the Generate Tile Cache Tiling Scheme tool with Tile Format set to LERC Compression to generate a new LERC tiling scheme based on your elevation dataset. You should use the same spatial reference as the basemap vector tile package you're creating. Then create a tile package using the Manage Tile Cache tool to generate a LERC cache. For Input Tiling Scheme, use one of the following: Elevation tiling scheme matches the ArcGIS Online/Bing Maps/Google Maps tiling scheme used by ArcGIS Online basemaps (or basemaps extracted from ArcGIS Online) Elevation tiling scheme with two additional levels matches the ArcGIS Online/Bing Maps/Google Maps tiling scheme used by ArcGIS Online basemaps but has two additional levels for higher-resolution data. Import scheme uses the tiling scheme you created in the optional first step or the tiling scheme of an existing image service. If using this option, browse to the tiling scheme file or service for Import Tiling Scheme. And finally use the Export Tile Cache tool with the Export Cache As option set to Tile package (.tpkx). For example, the image below shows a raster dataset as an elevation surface layer I've added in ArcGIS Pro (and used 20x exaggeration for effect): And then I've used the Manage Tile Cache geoprocessing tool to create a new cache where the Input Tiling Scheme parameter is Elevation Tiling Scheme (which means it matches the ArcGIS Online/Bing Maps/Google Maps tiling scheme used by ArcGIS Online basemaps): And next I used the Export Tile Cache tool to create a tile package (.tpkx): I tested the new TPKX file while I was in ArcGIS Pro to ensure it worked there (the TOC shows the .tpkx file): And lastly, here it is in Unity (looked better in this case with the imagery basemap): I've opened an internal issue to update our documentation to assess how we can better describe this process for creating tile basemap and elevation tile packages for use with our SDKs. Thanks
... View more
4 weeks ago
|
1
|
1
|
193
|
POST
|
Hi, MediaLayer is on our roadmap for a future release (existing ArcGIS Idea / request). Unfortunately we currently don't have a timeline to share, but we have received a number of requests for this feature which will help us prioritize appropriately during our next planning phase. Regarding the broader roadmap, although we don't publicly document this, we do present the product roadmap at each Esri Dev Summit (Palm Springs in Q2, Berlin in Q4) and Esri User Conference (San Diego in Q3) in-person/virtual events, and recordings are later published. In those sessions we discuss the roadmap for the next release, which may be up to 3 months out. Occasionally, we're able to share news of the longer-term roadmap when we're working on epics that span multiple release cycles. We encourage you to use the ArcGIS Ideas section for the SDKs to upvote (kudo) ideas and submit new requests. Thanks
... View more
a month ago
|
0
|
2
|
190
|
POST
|
Hi, Update - we've just launched a beta of our new global elevation service/API. It's currently in beta, gathering feedback, before going general availability in 2025. More info about the new service: Elevation service (beta) | Esri Developer REST APIs documentation (arcgis.com) Sign-up to test: https://earlyadopter.esri.com/key/locationservices-elevation We'd love to get your feedback on this new service (e.g. results, performance, developer experience). Thanks
... View more
a month ago
|
0
|
0
|
89
|
POST
|
Do you have strong requirement to use File Geodatabase? If not, then I recommend changing to using mobile geodatabases and mobile map packages that are supported directly by the API. But, if you do need to continue supporting File Geodatabase, then the Local Server is currently your only option. You should be able to follow this sample: arcgis-maps-sdk-dotnet-samples/src/WPF/ArcGISRuntime.WPF.Viewer/Samples/Local Server/DynamicWorkspaceShapefile at v100.7.0 · Esri/arcgis-maps-sdk-dotnet-samples · GitHub (we removed the sample after 100.7 because it's no longer the promoted workflow). I've used code like this: ...
// Add the dataset to a new dynamic map service layer instance.
await AddDatasetToMapImageLayer(
WorkspaceType.FileGeodatabase,
SelectedGeodatabasePath,
SelectedDataset.Name);
... Which calls this function: private async Task AddDatasetToMapImageLayer(WorkspaceType workspaceType, string directoryPath, string fileName)
{
try
{
// Create a new LocalMapService instance using the empty Map Package.
LocalMapService localMapService = new LocalMapService(_emptyMapPackage);
// Create a new WorkspaceInfo object with a unique ID.
string uniqueId = Guid.NewGuid().ToString();
// Create a raster workspace or file geodatabase workspace.
DynamicWorkspace dynamicWorkspace = null;
switch (workspaceType)
{
case WorkspaceType.Raster:
dynamicWorkspace = new RasterWorkspace(uniqueId, directoryPath);
break;
case WorkspaceType.FileGeodatabase:
dynamicWorkspace = new FileGeodatabaseWorkspace(uniqueId, directoryPath);
break;
}
// Add the dynamic workspace to the new local map service.
localMapService.SetDynamicWorkspaces(new List<DynamicWorkspace> { dynamicWorkspace });
// Start the service.
await localMapService.StartAsync();
// Create a new ArcGISLocalDynamicMapServiceLayer from the local service.
ArcGISMapImageLayer arcGISMapImageLayer = new ArcGISMapImageLayer(localMapService.Url)
{
Id = "Workspace: " + (new DirectoryInfo(directoryPath)).Name,
};
// Clear any existing sub layers.
arcGISMapImageLayer.Sublayers.Clear();
// Create a sub layer source to represent the specific file/dataset in the workspace.
SublayerSource sublayerSource = null;
if (SelectedDataset.Datatype == "Feature Class")
{
sublayerSource = new TableSublayerSource(dynamicWorkspace.Id, fileName);
}
else
{
sublayerSource = new RasterSublayerSource(dynamicWorkspace.Id, fileName);
}
// Create a new map image sub layer referencing the source.
ArcGISMapImageSublayer arcGISMapImageSublayer = new ArcGISMapImageSublayer(0, sublayerSource);
// Add the sublayer to the sub layers collection on the map image layer
arcGISMapImageLayer.Sublayers.Add(arcGISMapImageSublayer);
// Set the top level name on the map image layer (for the TOC).
arcGISMapImageLayer.Name = arcGISMapImageLayer.Sublayers[0].Name;
// Add the sublayer to the operational layers collection on the map.
Map.OperationalLayers.Add(arcGISMapImageLayer);
// Load the raster sub layer to get the extent from the service info.
await arcGISMapImageSublayer.LoadAsync();
// Invoke the set viewpoint event to update the UI.
SetViewpointRequested?.Invoke(this, new Viewpoint(arcGISMapImageSublayer.MapServiceSublayerInfo.Extent));
}
catch (Exception ex)
{
DisplayStatus?.Invoke(this, ex.Message);
}
}
... View more
07-18-2024
07:04 AM
|
0
|
0
|
78
|
Title | Kudos | Posted |
---|---|---|
1 | yesterday | |
2 | 2 weeks ago | |
1 | 3 weeks ago | |
1 | 4 weeks ago | |
1 | 3 weeks ago |
Online Status |
Offline
|
Date Last Visited |
yesterday
|