ArcGIS Runtime SDK for .NET: Building Desktop and Mobile Apps ·...

Preview:

Citation preview

David CardellaMike Branscomb

ArcGIS Runtime SDK for .NET: Building Desktop and Mobile Apps

Agenda

• Overview• ArcGIS Runtime Architecture• Current Release Highlights• Resources• Troubleshooting• .NET Core

ArcGIS Runtime SDK for .NETOverview

Overview

• Develop native mapping and location analysis apps with .NET• 2D and 3D Visualization• Ready to use maps and data• Search and geocode• Directions and routing• Demographics data• Spatial analysis• Hosted data• Offline workflows

Apps

DesktopAPIs

Online

Enterprise

Overview• APIs

- Windows Presentation Foundation (WPF)- .NET Framework- .NET Core (Preview at 100.6)

- Universal Windows Platform (UWP)- Xamarin.Android- Xamarin.iOS- Xamarin.Forms (Android, iOS, and UWP)

• SDK- Templates, Toolkit controls, Doc, Sample code, Tutorials, Open Source Apps

• Cross-platform- Share your .NET C# business logic code across Android, iOS, and Windows

Requirements for development• System requirements depends on the apps you plan to build• Building Xamarin.iOS projects requires an associated Mac computer as a build host

Installing ArcGIS Runtime SDK for .NET

• NuGet packages on NuGet.org - WPF - UWP - Xamarin.Android- Xamarin.iOS- Xamarin.Forms (Android, iOS, UWP)- Toolkit- AR Toolkit

• Visual Studio extension (VSIX)- developers.arcgis.com/downloads- Project templates for each supported platform- Local NuGet package source for offline development

ArcGIS Runtime SDK for .NETArcGIS Runtime Architecture

Overview – ArcGIS RuntimeAn Architecture Designed to Maximize Performance and Reuse

C++ runtime core

WinLinux macOSAndroid iOS UWP

x86 x64 ARM64DirectXOpenGLOpenGL ES

Overview – ArcGIS Runtime SDK for .NETAn Architecture Designed to Maximize Performance and Reuse

C++ runtime core

x86 x64 ARM64DirectXOpenGLOpenGL ES

WPFUWPiOSAndroid

Xamarin.Forms

WinAndroid iOS UWP

ArcGIS Runtime SDK for .NETRelease Highlights: 2019

100.5 – April 2019

• Mobile scene packages • Layers: Group, Point Cloud, Point scene, & Integrated Mesh• Subsurface navigation• 3D performance improvements• KML Tours & Refresh overrides• WFS• New raster tile package (.TPKX) and locator (.LOZ) formats• Enhanced symbology support and API for greater parity with ArcGIS Pro• Reference scale for text and symbols • Annotation layers

• Utility network- Services only- View definitions, associations, properties- Connected trace, start points, and barriers

• AR on mobile platforms (iOS, Android)• Offline map workflows

- Preplanned, scheduled updates

• Navigation API- Off-route detection, recalculate, and voice commands

• Annotation- API for sublayers- Download only, delta sync

100.6 – August 2019Utility – Phase 1

• Dictionary renderer to support new ArcGIS platform (Arcade based) styles

- Military symbology (MIL-STD-2525, APP-6)- Supports custom advanced symbology requirements

• KML- Create, edit, save

• OGC- Custom parameters- Web map support for WFS

• General improvements- Group layer in MMPK- Offsets for feature and scene layers, graphics overlays- Identify and select on point scene layers

100.6 – August 2019

Sample Viewer Apps in App Stores

Current Release HighlightsDemo

100.5 .NET SDK-Specific Enhancements

• Serialize credentials for persisting between sessions- As the developer you must store securely on the device

• Mouse / trackpad navigation improvements for WPF/UWP• ARM64 support for UWP• WPF honors software rendering if set at a system-wide or app-wide level

- e.g. RenderOptions.ProcessRenderMode = System.Windows.Interop.RenderMode.SoftwareOnly;

• WPF increased default number of concurrent network requests- Significantly improved tile performance- Override via ServicePointManager- Default is 6

• Improved template discoverability in Visual Studio 2019 for Windows

…WPF increased default number of concurrent network requests

• Try experimenting with increasing the maximum connections using the .NET Framework• Set via the DefaultConnectionLimit property on the static ServicePointManager class

(System.Net) namespace• e.g. System.Net.ServicePointManager.DefaultConnectionLimit = 10;• Must be made before any underlying connections are created

- Implement this in application initialization logic

100.6 .NET specific enhancements

• *Preview* of support for *WPF* for .NET Core 3.0- Included in 100.6 WPF NuGet package- Build warning reminder for Preview

• Performance benchmarking using https://github.com/dotnet/BenchmarkDotNet• Public API method AddRange on RuntimeCollection

- Graphics, GraphicsOverlays, Layers, UniqueValues, ClassBreaks- Batches internal ArcGIS Runtime logic for error handling and collection changed events- 10-15% reduction in execution time when adding large numbers of Graphics to a GraphicsOverlay- 85-90% reduction in temporary allocations

- Reduces the memory consumed and reduces the workload for garbage collection

• Internal Graphic instance ID handling- Adding/removing a Graphic from a GraphicOverlay allocates ~18% less memory- Retrieving selected Graphics allocates ~50% less memory and is faster- Identifying on a GraphicsOverlay allocates ~70% less memory

ArcGIS Runtime SDK for .NETTroubleshooting

Troubleshooting – ArcGIS Runtime Exceptions

• Check ArcGISRuntimeException errors• Platform error codes in the Guide doc• https://developers.arcgis.com/net/latest/wpf/guide/platform-error-codes.htm

Troubleshooting – Logging

• ArcGIS Runtime uses System.Diagnostics.Trace to provide errors and information- ArcGISRuntime initialization info- Rendering mode (if using Windows software rendering)- DirectX rendering errors

• By default `DefaultTraceListener` will write to Visual Studio Output window• If debugging

- Check the Visual Studio Output window

• Add SystemDiagnostics.TraceListener(s)- EventLog TraceListener- TextWriter TraceListener

Troubleshooting – Debugging Crashes• ArcGIS Runtime debug symbols (.pdb files) available on Esri symbol server

- WPF & UWP

• Add the esri symbol server:- In Visual Studio: Navigate to Tools > Options > Debugging > Symbols- Add a `New Location` & specify the esri symbol server - URL: http://downloads2.esri.com/support/symbols- Ensure the checkbox is checked next to the new URL in the list of `Symbol file (.pdb) locations`

• Enable native code debugging:- In Visual Studio: Navigate to Project > Properties > Debug- Under the section `Debugger engines` check the box to `Enable native code debugging`

• When debugging the app or a crash dump file (.dmp) locate the following modules then right click > Choose `Load Module`:

- RuntimeCoreNet.dll- runtimecore.dll

ArcGIS Runtime SDK for .NETRoad Ahead

Road Ahead : .NET Core

• .NET Core 3.0 added support for Windows Desktop apps on .NET Core- WPF - *Windows Only*

• Removes dependency on system-wide .NET Framework- Self-contained app folders- Deploys .NET Core to your app publish folder- Benefit from .NET Core performance improvements

• Single File executables• Packages your app, any native libraries (like ArcGIS Runtime) and .NET Core• ArcGIS Runtime 100.6 included preview of support for WPF for .NET Core 3.0• ArcGIS 100.7 planned to include support for WPF for .NET Core 3.1

WPF for .NET Core 3.xDemo

https://github.com/Esri/arcgis-runtime-samples-dotnet/tree/DotNetCore

ArcGIS Runtime SDK for .NETSummary

• ArcGIS Runtime 10.2.x retires in Dec 2019 - https://support.esri.com/en/Products/Developers/native-runtime-sdks/arcgis-runtime-sdk-for-dotNET

• Windows 7 support will end on January 14, 2020- https://support.microsoft.com/en-us/help/4057281- Now is the time to upgrade to Windows 10!

Lifecycle information

Summary

• ArcGIS for Developers site is your development dashboard• Guide doc & API ref doc• Sample code• Open Source Apps• Toolkit

• Plus- .NET Team Demos repo

• Get involved with the community on Geonet!

Complete answersand select “Submit”

Scroll down to find the feedback section

Select the session you attended

Download the Esri Events app and find your event

Please complete a session survey in the Esri events app

Recommended