Esri / feedback-js-api-next

Try out the next release of the ArcGIS Maps SDK for JavaScript and share your feedback. Be warned: this release is still in development and is unstable.
87 stars 22 forks source link

Enhancement: IdentifyParameters.layerDefinitions is undocumented #17

Closed green3g closed 4 years ago

green3g commented 4 years ago

Enhancement category How would you categorize the enhancement? Layers

Enhancement short summary

Currently, layerDefinitions is undocumented. In previous versions of the api, layerDefinitions was a simple array that looked like this:

idParams.layerDefinitions = [];
idParams.layerDefinitions[100] = 'Status = \'Open\'';
//etc 

image

This appears to be broken in 4.13.1 and I was wondering what the appropriate fix is.

In 4.13 - an error is thrown in the Identify operation about an object not having a valid id. Is there a new structure for layerDefinitions that was not mentioned in the release notes?

API version (check your console)

Additional context Add any other context about the enhancement or suggestion here.

Edit: not breaking change.

odoe commented 4 years ago

This is currently undocumented, so not really a breaking change, but if you need it right now, you can do it by defining objects for the layerDefinitions instead of using a sparse array.

layerDefinitions = [ { id: 2, definitionExpression: "POP1999 > 75000" } ];

This will change in the future, but no timeframe on that.

green3g commented 4 years ago

Okay thanks!

green3g commented 4 years ago

I guess it wasn't documented/breaking change. I think I pulled the logic from a previous 3.x script and it worked in 4.x until 4.13.

juliepowell commented 4 years ago

Closing; workaround noted above.