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 ?
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...