Adding new map to current project using ArcGIS Pro .NET SDK?

المشرف العام

Administrator
طاقم الإدارة
The new ArcGIS Pro SDK for .NET is currently in beta for ArcGIS Pro 1.1, and I'm having trouble with map/project objects.

I can add layers to an existing map, but I can't seem to figure out how to add a new map to the project:

public async void AddMapToProject(){ //create new map and set basemap layer Map mymap = new Map("MapName"); mymap.SetBasemapLayers(Basemap.Oceans); //there's also Map.Create("MapName"), not sure which to use //access current project Project myproject = Project.Current; //this doesn't work await myproject.AddAsync(mymap); //project has AddAsync(Item item) method, but I don't think //this is for adding maps as it doesn't accept a map object and //ArcGIS.Desktop.Core.Item.Create(map.uri) doesn't work}Any ideas? Can't seem to find an example or the correct method anywhere. The API reference for the SDK is here but doesn't offer many examples. Couldn't find much in the github samples / community samples either.



أكثر...
 
أعلى