TransWikia.com

ESRI JavaScript 4 - Shouldn't the editor widget honor definition expression?

Geographic Information Systems Asked by AliWieckowicz on July 26, 2021

If a feature layer has a definition expression defined, as in the code pen example, shouldn’t you only be able to see and edit (select for editing) features that meet the definition expression?

It seems that the widget tool doesn’t honor the definition expression and its quite confusing.

I need a work around.

Example: You have a feature layer in a web map, there are two features in the data source that over lap, the definition expression is true for 1 and false for the other (so you can’t see the second in the web map), if you select the edit tool and click on the one that is visible, both are queried from the feature service and both are displayed in the edit widget results.

Is there something I’m not configuring correctly?

Here is a code pen example. Click on the pink zigzag patrol line with the edit tool active

https://codepen.io/AliWieck/pen/ExaMWJq?editors=1000

Line 91 of this codepen example applies a definition query that should limit display of any police route lines like so

layer.definitionExpression = "PatrolType = 'Segway patrol'"

yet when I click on a location where I know there are Segway and other types of routes that are overlapping, I get all features returned and displayed in the editor widget even though only one is visible on the map. Click the button for any feature that doesn’t meet the definition expression does nothing.

enter image description here

One Answer

Esri confirmed it's a bug. Should be fixed in 4.17 release scheduled for March.

Answered by AliWieckowicz on July 26, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP