I'm doing some layout modifications and rendering using the CIM. The process starts with the importation of an existing layout (the "template") by reading a pagx file into a JSON string. We then call CIMLayoutDocument.FromJson() to get an in-memory representation of the entire Layout and its components.
This has been working as expected until I added a Feature Service layer (a Polyline layer) to a Map referenced by the Layout in question. Since this Map is referenced by the Layout, it gets included in the list of CIMMaps in the CIMLayoutDocument.
With that feature service layer added, the call to CIMLayoutDocument.FromJson() produces an error, "Value was either too large or too small for an Int32."
All the stack trace shows is that this is the result of a call to System.Convert.ToInt32(). Is this a bug?