IdentifyParameters layerDefinitions property (API 4.12)

443
0
08-05-2019 11:57 PM
FreddyBroring
New Contributor III

I was looking for a method to filter the Identify results and after digging into the obfuscated code of the API I found out that there are some properties in the IdentifyParameters which are not documented. One of them is the property "layerDefinitions" and that was exactly what I was looking for!

Unfortunately the Typescript definitions do not expose these properties and also the documentation do not mention them. I was wondering why these properties are not documented and in the definition file.

My workaround for now is:

const params = new IdentifyParameters();
 params.width = this.view.width;
 params.height = this.view.height;
 params.mapExtent = this.view.extent;
 params.layerOption = 'visible';
 params.geometry = geometry;
 params.tolerance = 3;
 params.returnGeometry = true;
 params.returnFieldName = true;
 // Undocumented property...
 (params as any).layerDefinitions = myLayerDefinitions  // format: {layerId1: whereClause1, layerId2: whereClause2}

Hopefully the properties will soon be added to the definitions file and documentation.

0 Kudos
0 Replies