Hi there,
In my current project I try to programatically creating a CIMMapDocument definition using CIMMap.ToJson() method. It seems that the configured Datum and GeoTransformations are not properly serialized. See example below..
"datumTransforms": [
{
"type": "CIMDatumTransform",
"forward": true
},
{
"type": "CIMDatumTransform",
"forward": false
}
]
Some Information about the GeoTransformation are completely emitted. The json should look like this:
"datumTransforms" : [
{
"type" : "CIMDatumTransform",
"forward" : true,
"geoTransformation" : {
"geoTransforms" : [
{
"wkid" : 15749,
"latestWkid" : 15929,
"transformForward" : true,
"name" : "Belge_1972_To_WGS_1984_3"
}
]
}
}
]
I did a bit of testing and found this. When calling the .ToJson() method on a GeoTransformation object a NotImplementedException is thrown >
cimMapDefinition.DatumTransforms[0].GeoTransformation.ToJson();
Someone got an idea how a GeoTransformation can be serialized properly?
Solved! Go to Solution.
Sorry about that, somebody from Product Development will look at this issue and try to fix the problem with an upcoming 3.2 patch.
Sorry about that, somebody from Product Development will look at this issue and try to fix the problem with an upcoming 3.2 patch.
@marco_vertigis the developer is not able to duplicate your issue using the following code snippet in an add-in:
return QueuedTask.Run(() =>
{
var map = MapView.Active.Map;
var mapDef = map.GetDefinition();
var json = mapDef.DatumTransforms[0].GeoTransformation.ToJson();
});
Can you send us a .mapx? We don’t need the actual data, so it’s OK if the layer connections are all broken.
Maybe the cause is data related. You can use the 'Esri Communities' messages to keep the mapx confidential.
Thanks,
Wolf
I sent you the maps as private message.