esri / arcgis-maps-sdk-dotnet-samples Goto Github PK
View Code? Open in Web Editor NEWSample code for ArcGIS Maps SDK for .NET – WPF, WinUI, .NET MAUI
License: Apache License 2.0
Sample code for ArcGIS Maps SDK for .NET – WPF, WinUI, .NET MAUI
License: Apache License 2.0
OAuth security sample for Quartz.
As Quartz Developer I expect identical SDK Object Model on Level of Data Access and Analysis for all platform specific Quartz SDKs. Where Do I find Attachments-API/Methods in Quarzt. NET?
Add a sample showing how to use the ModelMarkerSymbol type.
Once you have checked the "Enable message selection" checkbox and made selections if you then uncheck the "Enable message selection" checkbox and clear selections you are still in selection mode.
Hi!
How are relationships supported in Quartz (beta) for .NET for online FeatureServices/ ArcGISMapImageLayer and offline geodatabases ?
How can I generally acquire information about relationship defintions from offline geodatabase tables and feature services ?
I cannot find anything that corresponds to the implementation in
ArcGIS Runtime for .NET 10.2.7 (see images below), neither in the API, nor in the supplied ArcGISFeatureLayerInfo (ServiceInfo)
Thank you in advance.
To set the view point before these events have fired, you can use Map.InitialViewpoint instead. Otherwise, handle the Loaded or SpatialReferenceChanged events to call SetViewpoint.
This is a placeholder to make sure workarounds are removed from the samples when the problem is fixed.
Allow the user to make changes to the current map (basemap, operational layers, extent) then save it as a web map to their portal. The sample will require additional code to handle logging the user in to their portal (ArcGIS Online) using OAuth.
The user can continue to make changes and save them to the existing portal item, or clear the map and create a new map to save.
Add map with slider that rotates the MapView.
Change viewpoint
This sample should demonstrate how the current viewpoint can be changed. The Sample will open with a default service viewpoint. Each subsequent button click will change the viewpoint using different methods (one to a provided extent, another a point and scale, and another to rotate the viewpoint by 90 degrees
I'm trying to use the OAuth Authentication sample but it doesn't work on android.
The UWP works fine, but Android raised an error : Error 400 Invalid request.
The login UI appears, and the user can specify login and password. But clicking the connect button raises this error.
Trying to debug it, I used fiddler to trace network traffic between emulator and server.
It appears that the oauthorize request parameters contain "response_type=token" instead of "response_type=code" as mentionned in the doc (https://developers.arcgis.com/authentication/mobile-and-native-user-logins/#authorization-example)
Is it normal?
When using a challenge handler to let the user choose a client certificate (for accessing a PKI-secured portal, e.g.), AuthenticationManager
may prompt the user to choose the same certificate several times. While the certificate credential appears to be stored correctly, AuthenticationManager
may not corrrectly recognize an existing credential and therefore might challenge for it again.
A potential workaround is to pull the existing credential from the credentials collection and return it from the challenge handler method. If the app will be handling a variety of credentials (for various servers, e.g.), you will need additional logic to check the service URI.
credential = AuthenticationManager.Current.Credentials.FirstOrDefault();
if (credential != null)
{
if (credential.ServiceUri.AbsoluteUri.StartsWith(SecuredPortalUrl))
{
// Return the CertificateCredential for the secured portal
return credential;
}
}
// ... challenge for the credential by prompting the user to choose a client certificate ...
The guide doc tutorial is pretty long and it'd be nice if the completed code were available. This needs to be done for all platforms.
I am trying to load a tif file using below code.
var myRaster_left = new Raster(@"C:\2015\11.tif");
RasterLayer newRasterLayer_left = new Esri.ArcGISRuntime.Mapping.RasterLayer(myRaster_left);
MyMapViewLeft.Map.OperationalLayers.Add(newRasterLayer_left);// adding raster
I get the error "An exception of type 'System.NullReferenceException' occurred in MilitaryApp.exe but was not handled in user code"
The file and path are absolutely fine and I am able to view in ArcGIS Desktop.However, runtime is unable to load the raster.Debugging shows variable myRaster_left is set to null.
Platforms for this issue:
Open an existing map
This sample illustrates how to open an existing web map from a portal.
On creating new features in the local geodatabase, the creation time is in GMT. It would be helpful if the field name is "Date (in GMT)". Or if the sample is updated to display local time.
Add a sample that demonstrates how to use the recommended workflow for OAuth secured resources with Windows Phone 8.1 using WebAuthenticationBroker with IdentityManager in the ArcGIS Runtime SDK for .NET.
Microsoft is promoting the use of WebAuthenticationBroker with OAuth workflows. It's built into the ArcGIS Runtime SDK for .NET - Windows Store API. It is not in the Windows Phone API due to complexity of implementation. For sake of completeness we should include a sample. Note, the current OAuth samples show use of web views.
The WebAuthenticationBroker is limited by one issue, the domain in the authorize and approval urls must match. If during the OAuth login process a user chooses to change the url (eg enter an organization subdomain) the WebAuthenticationBroker will not work. The solution is either 1) use app logic to determine the organization url before the OAuth workflow starts or 2) Use a web view.
For discussion and background details see: http://blogs.msdn.com/b/thunbrynt/archive/2014/04/14/windows-phone-8-1-for-developers-web-authentication-broker.aspx
On Win 7 x64 in VS13, I opened, restored NuGet packs, and cleaned the solution. However, build yielded the following error.
Error 4 Method name expected ~\arcgis-runtime-samples-dotnet-master\src\WPF\ArcGISRuntime.WPF.Samples\Samples\Map\AuthorMap\AuthorMap.xaml.cs
435 54 ArcGISRuntime.WPF.Samples.CSharp
AuthorMap.xaml.cs lines 429-437:
var dispatcher = Application.Current.Dispatcher;
if (dispatcher == null || dispatcher.CheckAccess())
AuthorizeOnUIThread(_authorizeUrl);
else
{
var authorizeOnUIAction = new Action((() => AuthorizeOnUIThread(_authorizeUrl)));
dispatcher.BeginInvoke(authorizeOnUIAction);
}
Suggestions?
Thanks for considering,
Matthew
Add / standardize Windows Store geoprocessing task samples:
I am trying to use ArcGIS runtime nuget package in Xamarin iOS app. Once i add the NuGet package, build the app and publish it to TestFlight, I get the following errors. Does anyone have experience with this issue ?
ERROR ITMS-90086: "Missing 64-bit support. iOS apps submitted to the App Store must include 64-bit support and be built with the iOS 8 SDK or later. We recommend using the default "Standard Architectures" build setting for "Architectures" in Xcode, to build a single binary with both 32-bit and 64-bit support."
ERROR ITMS-90668: "Invalid Bundle Executable. The executable file '/Frameworks/ArcGIS-arm64.framework/ArcGIS-arm64' contains incomplete bitcode. To compile binaries with complete bitcode, open Xcode and choose Archive in the Product menu."
ERROR ITMS-90668: "Invalid Bundle Executable. The executable file '/Frameworks/ArcGIS-armv7.framework/ArcGIS-armv7' contains incomplete bitcode. To compile binaries with complete bitcode, open Xcode and choose Archive in the Product menu."
ERROR ITMS-90203: "Invalid architecture: Apps that include an app extension and framework must support arm64."
New symbology dictionary file(s) for v.next will require minor sample changes.
i have a viewmodel with a boolean value to switch off/on layers (ShowFietsknooppunten)
in xaml i declare the binding but i tried a lot of opties but it doesn't work
IsVisible="{Binding DataContext.ShowFietsknooppunten, ElementName=mainscreen}"
mainscreen is the name of the usercontrol on which the mapview resides. This usercontrol datacontext is set to the viewmodel.
On Win 7 x64 in VS13, initial build yielded the following error.
Error 2 Metadata file '~\arcgis-runtime-samples-dotnet-master\output\WPF\debug\ArcGISRuntime.WPF.Samples.dll' could not be found
ArcGISRuntime.WPF.Viewer
Is this file sold separately, or should I rename an assembly reference?
Curiously,
Matthew
Sample issue: DynamicLayerEditGeometry error when apply edits
When click Complete to Apply Edits back to the server we get error
Error Code "500": 'Unable to complete operation.' Unable to perform applyEdits operation.'
The other samples use the applyEdits operation without issues so I suspect it is a problem with the Wildfire service that is used in this sample.
http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/MapServer
In the section for Instructions of the README.md file, there is a little spelling mistake. Here is the sentence:
Place sample data contents in a folder named "sample-data" at the same level as the "src" folder for this repo.
If you make a folder named sample-data
the project will never work, should be samples-data
.
In the Project "ArcGISRuntime.Samples.Desktop", the resource "Assets\SampleDescriptions.xml" is not found, and the main Project "ArcGISRuntime.Samples.DesktopViewer" uses the file to classify by category.
ArcGIS map image layer (URL)
This is a simple sample sample loading an Image Layer from a URL using XAML
Add a map that sets the spatial reference. Layers that can be projected will draw in the new spatial reference, others will fail to display
ArcGIS tiled layer (URL)
This is a simple sample loading a Tiled Layer from a URL using XAML
Update the 10.2.7 ArcGIS Token security samples for Quartz (known user and challenge).
It seems that the current custom IOAuthAuthorizeHandler sample fails with NullReferenceException if its authentication process is called from UI thread. The following is where the exception occurs:
_tcs = new TaskCompletionSource<IDictionary<string, string>>();
// Call a function to show the login controls, make sure it runs on the UI thread for this app
var dispatcher = Application.Current.Dispatcher;
if (dispatcher == null || dispatcher.CheckAccess())
AuthorizeOnUIThread(_authorizeUrl);
else
{
var authorizeOnUIAction = new Action((() => AuthorizeOnUIThread(_authorizeUrl)));
dispatcher.BeginInvoke(authorizeOnUIAction);
}
// Return the task associated with the TaskCompletionSource
return _tcs.Task;
If AuthorizeOnUIThread is called without dispatcher.BeginInvoke, "return _tcs.Task" is called after all authentication process is completed. Since _tcs becomes null at the completion of authentication, "return _tcs.Task" throw NullReferenceException.
I'm simply setting the IOAuthAuthorizeHandler sample to AuthenticationManager.Current.OAuthAuthorizeHandler. Is there any specific way to avoid this exception?
*I believe that the following is custom IOAuthAuthorizeHandler sample from version 10.2.7 which does not have this issue.
// Create a task completion source
_tcs = new TaskCompletionSource<IDictionary<string, string>>();
var tcs = _tcs;
// Call a function to show the login controls, make sure it runs on the UI thread for this app
var dispatcher = Application.Current.Dispatcher;
if (dispatcher == null || dispatcher.CheckAccess())
AuthorizeOnUIThread(_authorizeUrl);
else
{
var authorizeOnUIAction = new Action((() => AuthorizeOnUIThread(_authorizeUrl)));
dispatcher.BeginInvoke(authorizeOnUIAction);
}
// Return the task associated with the TaskCompletionSource
return tcs.Task;
Problem
MessageProcessingSample
is designed to display military symbols on the map, using MIL-STD-2525C. But an error message displays when Process messages is clicked:
The Message could not be processed. MessageLayer must have been successfully loaded into a View (Map or Scene) before calling ProcessMessage.
Instead, the messages should display.
Cause
This sample requires the installed ArcGIS Runtime SDK for .NET. There are directions to reference the installed SDK, but I can't find documentation in this repository that states which samples require the installed SDK. The key step is to delete the arcgisruntime10.2.x
directory in output\Desktop\Debug
.
Possible Resolution
Please add documentation somewhere to indicate the need for MessageProcessingSample
to use the installed SDK.
DirectionsLanguage in German are not working , throws exception ...
routeParams.DirectionsLanguage = new CultureInfo("de");
working for English ..
routeParams.DirectionsLanguage = new CultureInfo("de");
Update the 10.2.7 IWA security sample for Quartz.
Update samples to use geometry builders and/or constructors instead of creating new instances of geometry objects then explicitly setting geometry property. Note do not use constructors if the geometry may be invalid - use Builder instead.
On initial page load the Mapping > Show Mouse coordinates sample throws an unhanded exception until the MapView has finished initialization.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.