AnsweredAssumed Answered

Error: "Invalid argument : wkt.size() == 0" when open shapefile

Question asked by bertolini on Nov 10, 2015
Latest reply on Nov 10, 2015 by FGibson-esristaff

The code that raises the exception:


   private async Task LoadShapefile(string path)




  FeatureOverlay.Visibility = Visibility.Collapsed;


   // open shapefile table


   var shapefile = await ShapefileTable.OpenAsync(path);


   // clear existing map and spatial reference


   if (Map1.Map.Layers.Any())


  Map1.Map = new Map();


   // create feature layer based on the shapefile


   var flayer = new FeatureLayer(shapefile)


   // Add the feature layer to the map


  txtInfo.Visibility = Visibility.Visible;


   catch (Exception ex)


   MessageBox.Show("Error creating feature layer: " + ex.Message, "Sample Error");


  txtInfo.Visibility = Visibility.Collapsed;




Any idea ?