ArcGIS Maps SDKs Native Blog - Page 16

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Latest Activity

(224 Posts)
Nicholas-Furness
Esri Regular Contributor

The latest release of the Runtime SDK for iOS is here (see the release notes, and the general announcement over on the ArcGIS Blog), and it builds upon the foundations introduced in update 6.

Key highlights include adding a LOT of network utility functionality, so that you can now build really powerful field apps that include a full suite of network tracing and more. We've also added the ability to license runtime at all levels using a named user (previously you could only license at Lite or Basic). See the announcement for more details.

Of significance from the iOS perspective:

  • Support for iOS 11 is being deprecated. At the next Runtime update, a minimum of iOS 12 will be required.
  • Augmented Reality Scenes can be clipped to help them fit better onto a real-world surface.
  • The OAuth panel in ArcGIS Online now honors the iOS device's dark mode state.

The Toolkit has already been updated for 100.7.

Download Update 7 today, and let us know what you're building.

more
0 0 656
MarkDostal
Esri Regular Contributor

The latest release of the ArcGIS Runtime Toolkit for iOS is here. It has been updated to work with the 100.7 release of the Runtime SDK for iOS.

This release includes:

  • Bookmarks component and example - The Bookmarks component will display a list of bookmarks in a table view and allows the user to select a bookmark and perform some action.
  • Swift 5 - The Toolkit and Example app projects and code have been udpated to Swift 5. As a result, Xcode 10.2 is now required to build the Toolkit.
  • Unit Test target - A Unit Test target has been added to the Toolkit project. There are initial unit tests for the new Bookmarks component and a test covering component creation. The goal is for all future components to have unit tests, with tests for existing components being added over time.
  • ArcGISARView.clippingDistance - A clippingDistance property has been added to the ArcGISARView. The clippingDistance limits the data display to a radius around the origin camera. The Point Cloud - Tabletop and US - Mexico Border - Tabletop example scenes have been updated to include a clipping distance. Here's a screenshot of the updated Point Cloud - Tabletop scene:AR Clipping Distance

You can find the Toolkit here.

See this blog post for information on the SDK release.


We hope you enjoy the new release! Let us know what you're building with it.

more
0 0 664
LucasDanzinger
Esri Frequent Contributor

We are pleased to announce that Qt joins the other Runtime SDKs in supporting AR workflows for iOS and Android platforms. The primary workflows supported include displaying 3D scenes on a tabletop, exploring scenes in flyover mode, and displaying 3D GIS content in full scale. More details about the capabilities of AR in Runtime can be found in this blogpost. To get started, reference the details in our Toolkit's readme.

more
1 0 608
MarkDostal
Esri Regular Contributor

The latest release of the ArcGIS Runtime Toolkit for iOS is here. It has been updated to work with the 100.6 release of the Runtime SDK for iOS.
 
This release includes:
• Augmented reality component and example
• Carthage package manager support
• SwiftLint support for both Toolkit components and the Example app
• Cleanup of the JobManager component for code consistency and style
• Minor internal tweaks

You can find the Toolkit here.

See this blog post for information on the SDK release.

To read more about Augmented Reality in the ArcGIS Runtime, read Rex's ArcGIS Blog post here.
 
We hope you enjoy the new release! Let us know what you're building with it.

more
0 0 575
MichaelBranscomb
Esri Frequent Contributor

In ArcGIS Runtime SDK for .NET 100.6 we added a useful API enhancement that can improve the performance of your apps with the new Esri.ArcGISRuntime.RuntimeCollection.AddRange method. There are several classes in the API that derive from the base RuntimeCollection, making this method available on many commonly used types such as GraphicCollection, GraphicsOverlayCollection, LayerCollection, UniqueValueCollection, and ClassBreakCollection.

Read more...

more
2 0 748
MichaelBranscomb
Esri Frequent Contributor

Symbol files are now available for improved diagnosis of issues when working with ArcGIS Runtime SDK for .NET.

Read more...

more
4 0 2,866
JamesBallard1
Esri Regular Contributor

We're pleased to announce an update to the ArcGIS Runtime SDK for Qt Embedded Linux Beta program: Beta 2.

Beta 2 is now based on the 100.6 Runtime release, so you can use all the great new features from 100.5 and 100.6 on your Embedded Linux devices. We've also done some internal build improvements and optimizations which should result in better performance for your apps.

Since the Beta 1 release we've tested on even lower-end devices. We've deployed apps to the NVIDIA® Jetson Nano™ developer kit, which is a $99 device.

As before, we're interested to see what types of solutions you're going to build. We're available on the early adopter forums, so feel free to reach out with any questions. We want to know what types of devices you want to target, or if there are devices we don't support yet that you want.

Head over to https://earlyadopter.esri.com/key/runtimeqtembeddedlinux to get started.

more
0 0 609
JoeHershman
MVP Alum

We needed a solution to connect to an external high accuracy GPS from an iOS application being developed in Xamarin Forms.  As it was being done through Collector I knew there there had to be a solution out there.  But I was having a hard time figuring out how the devices (non-BLE bluetooth device) connected to iOS.  I finally started to find some information on Stack Overflow that pointed me towards using  EAAccessoryManager.SharedAccessoryManager to get the connected devices.  Some other searching got me to this post How to use external gps location data which went into detail on an iOS specific solution.

In order to do in Forms and then use from a .Net Standard library a little more plumbing is required than the straight iOS solution.  First an interface is needed that will be developed in the main shared assembly.  I kept this is simple, and also thought in terms of a pure iOS implementation and not a pluigin that could be used cross platform

public interface IAccessorySessionController
{
	event EventHandler<NmeaSentenceEventArgs> OnNmeaSentenceReceived;

	IEnumerable<string> AvailableAccessories { get; }
	Task OpenSession(string protocal);
	bool CloseSession();
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

This interface was then implemented in the iOS project.

The main piece is the OpenSession method.  This is where the one connects to the device and starts getting data.  

public Task OpenSession(string protocal)
{
	try
	{
		EAAccessory connectedAccessory = null;

		/* Get list of ConnectedAccessories
		//These must be defined as UISupportedExternalAccessoryProtocols in Info.plist */
		foreach (var accessory in EAAccessoryManager.SharedAccessoryManager.ConnectedAccessories)
		{
			if (accessory.ProtocolStrings.Contains(protocal))
			{
				connectedAccessory = accessory;
				break;
			}
		}

		if ( connectedAccessory == null ) return Task.FromResult(false);

		connectedAccessory.Disconnected += ConnectedAccessoryOnDisconnected;

		if ( _session != null ) return Task.FromResult(true);

		try
		{
			//protacal here also must be UISupportedExternalAccessoryProtocols
			_session = new EASession(connectedAccessory, protocal);
		}
		catch (Exception e)
		{
			Console.WriteLine(e);
			return Task.FromResult(false);
		}

		//Set delegate for callback
		_session.InputStream.Delegate = this;
		_session.InputStream.Schedule(NSRunLoop.Current, NSRunLoopMode.Default);
		_session.InputStream.Open();  //start receiving data

		//not writing in this case but still best to open
		_session.OutputStream.Delegate = this;
		_session.OutputStream.Schedule(NSRunLoop.Current, NSRunLoopMode.Default);
		_session.OutputStream.Open();

		return Task.FromResult(true);
	}
	catch (Exception)
	{
		return Task.FromResult(false);
	}
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Not being an iOS developer I didn't really understand the part about needing the protocols in info.plist and spent a good amount of time banging my head on the table as to why I was not seeing the devices I knew were connected

<key>UISupportedExternalAccessoryProtocols</key>
<array>
	<string>com.comany.device</string>
</array>‍‍‍‍‍‍‍‍

Then it's just a matter of handling the callback and parsing the data...

public override void HandleEvent(NSStream theStream, NSStreamEvent streamEvent)
{
	Console.WriteLine("Arrived HandleEvent");
	switch (streamEvent)
	{
		case NSStreamEvent.None:
			Console.WriteLine("StreamEventNone");
			break;
		case NSStreamEvent.HasBytesAvailable:
			Console.WriteLine("StreamEventHasBytesAvailable");
			ReadData();
			break;
		case NSStreamEvent.HasSpaceAvailable:
			Console.WriteLine("StreamEventHasSpaceAvailable");
			// Do write operations to the device here
			break;
		case NSStreamEvent.OpenCompleted:
			Console.WriteLine("StreamEventOpenCompleted");
			break;
		case NSStreamEvent.ErrorOccurred:
			Console.WriteLine("StreamEventErroOccurred");
			break;
		case NSStreamEvent.EndEncountered:
			Console.WriteLine("StreamEventEndEncountered");
			break;
		default:
			Console.WriteLine("Stream present but no event");
			break;

	}
}

private void ReadData()
{
	uint size = 128;
	byte[] bytesReceived = new byte[size];
	_result = string.Empty;

	while ( _session.InputStream.HasBytesAvailable() )
	{
		var bytes = _session.InputStream.Read(bytesReceived, size);

		_result += Encoding.ASCII.GetString(bytesReceived, 0, (int)bytes);
		if ( bytes < 10 ) continue;

		string[] lines = _result.Split(new[] { "\n" }, StringSplitOptions.RemoveEmptyEntries);

		for (var index = 0; index < lines.Length - 1; index++)
		{
			var line = lines[index];

			OnNmeaSentenceReceived(new NmeaSentenceEventArgs(line));
		}

		_result = lines.Last();
	}
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

The NmeaSentenceReceived event is used to forward on the nmea sentence back to the custom LocationDataSource.  Once all that was done it was a almost trivial matter to implement the LocationDataSource in the shared project.

public class ExternalGpsLocationDataSource : LocationDataSource
{
	private MapPoint _mapPoint;
	private double _velocity, _course, _accuracy;

	private readonly IAccessorySessionController _accessorySessionController;

	public ExternalGpsLocationDataSource (IAccessorySessionController accessorySessionController)
	{
		_accessorySessionController = accessorySessionController;
	}

	protected override Task OnStartAsync()
	{
		_accessorySessionController.NmeaSentenceReceived += OnNmeaSentenceReceived;
		return _accessorySessionController.OpenSession("com.company.protocal");
	}

	protected override Task OnStopAsync()
	{
		_accessorySessionController.CloseSession();
		return Task.FromResult(true);
	}

	private void OnNmeaSentenceReceived(object sender, NmeaSentenceEventArgs e)
	{
		var line = e.NmeaSentence;
		try
		{
			line = line.TrimEnd('\n', '\r');

			var message = NmeaMessage.Parse(line);

			ReadLocationAttributesFromMessage(message);
		}
		catch (Exception)
		{
			//
		}

		if (_mapPoint == null || double.IsNaN(_mapPoint.X) || double.IsNaN(_mapPoint.Y))
		{
			UpdateLastKnownLocation();
			return;
		}

		UpdateLocation(new Esri.ArcGISRuntime.Location.Location(_mapPoint, _accuracy, _velocity, _course, false));

	}

	private void ReadLocationAttributesFromMessage(NmeaMessage message)
	{
		switch (message)
		{
			case Gpgga gpgga:
				_mapPoint = new MapPoint(gpgga.Longitude, gpgga.Latitude, SpatialReference.Create(4326));
				break;
			case Gpgsa gpgsa:

				break;
			case Gprmc gprmc:
				_velocity = double.IsNaN(gprmc.Speed) ? 0 : gprmc.Speed * 0.5144; //knots to m\s
				_course = double.IsNaN(gprmc.Course) ? 0 : gprmc.Course;
				_mapPoint = new MapPoint(gprmc.Longitude, gprmc.Latitude, SpatialReference.Create(4326));

				break;
			case Gpgsv gpgsv:
				break;
			case Gpgst gpgst:
				double latError = gpgst.SigmaLatitudeError;
				double lonError = gpgst.SigmaLongitudeError;
                                
				_accuracy = Math.Sqrt(0.5 * (Math.Pow(latError, 2) + Math.Pow(lonError, 2)));

				break;
		}
	}

	private void UpdateLastKnownLocation()
	{
		//If latest point not valid send previous point as LastKnown
		if (_mapPoint == null)
		{
			_mapPoint = new MapPoint(double.NaN, double.NaN, SpatialReferences.Wgs84);
		}

		UpdateLocation(new Esri.ArcGISRuntime.Location.Location(_mapPoint, _accuracy, _velocity, _course, true));
	}
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

I use a NMEA parser that Morten Nielsen‌ wrote so no need to spend any time on the parsing GitHub - dotMorten/NmeaParser: Library for handling NMEA message in Windows Desktop, Store, Phone, U... 

Beyond that it is just replacing the DataSource property on the MapView:LocationDisplay to the custom LocationDataSource and setting Enabled = true;

Cheers!

more
2 0 1,276
Nicholas-Furness
Esri Regular Contributor

The latest release of the Runtime SDK for iOS is here (see the release notes, and the general announcement over on the ArcGIS Blog), and it introduces some significant new functionality that will be built upon over the next few releases.

Some key highlights include Utility Network and the Navigation API, both of which merely scratch the surface of what we have in store. See the announcement for more details.

Some highlights from the iOS perspective:

  • You should now migrate to using the Dynamic Framework if you had not already. We had previously deprecated the Static Framework and it is now not even included in the SDK installer. This is Apple's preferred approach and simplifies the integration of the Runtime into your projects. See the release notes for how to migrate over.
  • We've prepared the SDK for iOS 13's Dark Mode by ensuring that UI elements like pop-ups and the attribution bar adapt correctly.
  • We've improved 3D Scene interaction and included some configuration options.

The SDK also adds the foundations for leveraging ARKit experiences into your mobile location/GIS apps. We will shortly be releasing open source components as part of the Toolkit that build upon these foundations to make great AR integration into your apps even easier.

So, download Update 6, dive in, and let us know what you're building.

more
1 6 1,643
MichaelBranscomb
Esri Frequent Contributor

The Runtime .NET team is excited to announce the release of ArcGIS Runtime SDK for .NET 100.6. This release includes significant new features, performance improvements, and bug fixes you can read about here… and for our .NET community we have some even more exciting news: this release includes a preview of our support for WPF for .NET Core 3.0.


WPF for .NET Core marks a significant step for the popular WPF UI framework for desktop apps by liberating it from the system-wide .NET Framework on which it currently depends and enabling you to:

  • Build a completely self-contained executable with your application and all dependencies
  • Update your target.NET version without imposing any system-wide .NET updates on your users
  • Benefit from future enhancements and performance improvements beyond .NET Framework 4.8

To try the Preview of Support for WPF for .NET Core:

Note:- To use the .NET Core SDK 3.0 Preview with Visual Studio 2019 you must be running 16.2 or later and enable the preview through Tools > Options > Preview Features.

Starting a new app

To try a new project from scratch using the .NET Core project templates, choose the `WPF App (.NET Core)` template from the new project dialog (tip: use the search or filters to narrow the list). In the Solution Explorer window for your new project instead of `References` you’ll now see `Dependencies` > `Frameworks` under which .NET Core is listed and if you open the project properties dialog you’ll see the Target framework is `.NET Core 3.0`. To add a reference to ArcGIS Runtime, right click Dependencies and choose `Manage NuGet Packages...` then browse for `Esri.ArcGISRuntime.WPF` from NuGet.org (or your local Esri package source) and install version 100.6.

Upgrading an existing app

To try upgrading one of your existing apps we recommend following this Microsoft docs article How to: Port a WPF desktop app to .NET Core which provides detailed instructions on porting your WPF desktop apps.

To see an example of a WPF desktop app ported to .NET Core 3.0 see this PR for our public samples.

Note:- The Preview of ArcGIS Runtime SDK for .NET with support for WPF for .NET Core 3.0 cannot be used in production (which differs from the status of .NET Core 3.0 Preview 8). When building, you’ll see a friendly reminder in your Error List “.NET Core support for ArcGIS Runtime is in Preview and not fully supported”.

When will the preview become available for use in production? That depends on the progress of .NET Core SDK v3.0 and v3.1 over the next few months but we hope it could be as soon as Q4 2019 or Q1-Q2 2020.


We’re truly excited about the direction WPF is taking with the support for.NET Core and hope one day it may even allow us to deprecate support for .NET Framework…

We look forward to any feedback you have on your experience using this preview.

Thanks

The Runtime .NET Team

more
0 0 2,177
118 Subscribers