Afternoon everyone, I was wondering if anyone has any vb.net examples of adding layers to a ArcGIS Pro Map that they could share. I need to add layers, but its not just as simple as adding from a file. However if anyone has any examples of the following for Pro I would be really grateful as it will help me debug. I haven't programmed using Async before so if anyone could share:
adding a layer from a flat file
adding a layer from a spatial SQL database
adding a layer when the name changes dynamically based on a user selection in a UI that would be great.
I keep getting a method wrong and I am trying to work out which one.
TIA
S*
Solved! Go to Solution.
Solved it. it was all about the QueuedTask.Run and when to use it.
Dim map As Map = MapView.Active.Map
QueuedTask.Run(
Sub()
Dim shelterslyr As Layer = LayerFactory.Instance.CreateLayer(New Uri("http://sampleserver6.arcgisonline.com/arcgis/rest/services/NapervilleShelters/FeatureServer/0"), map)
End Sub)
A working vb example for a change
Solved it. it was all about the QueuedTask.Run and when to use it.
Dim map As Map = MapView.Active.Map
QueuedTask.Run(
Sub()
Dim shelterslyr As Layer = LayerFactory.Instance.CreateLayer(New Uri("http://sampleserver6.arcgisonline.com/arcgis/rest/services/NapervilleShelters/FeatureServer/0"), map)
End Sub)
A working vb example for a change