How to create Mapview/Map in API

733
1
07-06-2017 08:50 PM
jackpearson
New Contributor II

I'm sure this should be easy but i have not been able to find a solution / example :

In my add-in I am bringing in and displaying a new XY point feature layer, with a well known spatial ref.

If the project does not currently have an open map/mapview (eg if a new blank project) then i need to create one - how do i do that via API ?

0 Kudos
1 Reply
Wolf
by Esri Regular Contributor
Esri Regular Contributor

You can look at these snippets:  https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-Content#new-project 

these will create a new 'empty' project.  Additional snippets allow you to create a new project using a template.

Also you can use the following snippet to add a new map (if the project doesn't contain a map) using this snippet: https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-MapAuthoring#create-a-new-map-with-a-default...

0 Kudos