Using latest arcgis python libs and jupyter etc...
Has anyone successfully called GIS().map().add_layer(feature class object) when the feature class object creation specified a drawing_info=?
Everything succeeds until the map is rendered and then the following error is triggererd: TypeError: undefined is not an object (evaluating 'x.drawingInfo.renderer.type')
Solved! Go to Solution.
The "solution" (in my case) is:
temp = fc_m.properties["layerDefinition"]["drawingInfo"]
fc_m.properties["layerDefinition"]["drawingInfo"] = {"renderer": ""}
fc_m.properties["layerDefinition"]["drawingInfo"]["renderer"] = temp
where "fc_m" is
fc_m = sdf_m.spatial.to_feature_collection(name="foobar")
This appears to be a BUG since "drawing_info=" option to "to_feature_collection()" does NOT create the "renderer" tag but ONLY "drawingInfo"
The "solution" (in my case) is:
temp = fc_m.properties["layerDefinition"]["drawingInfo"]
fc_m.properties["layerDefinition"]["drawingInfo"] = {"renderer": ""}
fc_m.properties["layerDefinition"]["drawingInfo"]["renderer"] = temp
where "fc_m" is
fc_m = sdf_m.spatial.to_feature_collection(name="foobar")
This appears to be a BUG since "drawing_info=" option to "to_feature_collection()" does NOT create the "renderer" tag but ONLY "drawingInfo"