Select to view content in your preferred language

How do I set a map empty in a map frame using C# SDK?

850
2
12-13-2019 09:16 AM
AnandhaSudhan
Occasional Contributor

I would like to programatically set a map to be empty in a mapframe (similar to choosing "<None>" option in a MapFrame). I tried to use mapFrame.SetMap(null) but ArcGIS Pro complains about a null reference object. How do I set the Map to be empty?

Tags (5)
0 Kudos
2 Replies
UmaHarano
Esri Regular Contributor

When you create a Map frame, if you don't pass in the map, it creates an empty empty map frame.

var mf = LayoutElementFactory.Instance.CreateMapFrame(layout, mf_envelope);
0 Kudos
AnandhaSudhan
Occasional Contributor

I would like to set the map empty in an existing map frame. And that doesn't seem possible.

0 Kudos