Select to view content in your preferred language

Loading a GeoPackage with Runtime 100

547
0
01-20-2017 05:03 AM
ChrisBarrington_Brown
New Contributor II

Can anyone give me the syntax for loading a GeoPackage in Runtime 100 .NET?  The only sample on GiTHub is in Java 10.2 and had a GeoPackage class which seems not to exist any longer. Code such as:

String path = "e:\\GeoPackage\\SU.gpkg";
var gdb = await Geodatabase.OpenAsync(path);

foreach (var table in gdb.GeodatabaseFeatureTables.ToList())
{
   var layer = new FeatureLayer
   {
      Id = table.TableName,
      FeatureTable = table
   };
   _map.OperationalLayers.Add(layer);
}

yields an empty list of tables so no layers are created, and I can't get an error from OpenAsync to find out what is going wrong.

Many thanks

Chris

0 Kudos
0 Replies