laptop and a wrench

不具合

The renderer being generated via the 'colorRendererCreator.createClassBreaksRenderer()' method shows inconsistent behavior in ArcGIS Maps SDK for JavaScript 4.30.

ArcGIS Maps SDK for JavaScript
不具合 ID 番号 BUG-000169933
送信されましたAugust 13, 2024
最終更新日December 6, 2024
適用対象ArcGIS Maps SDK for JavaScript
見つかったバージョン4.30
オペレーティング システムWindows OS
オペレーティング システムのバージョン10.0 64 Bit
ステータスKnown Limit

参考情報

This is by design for performance reasons. Arcade is used as the data input for generating the renderer. Arcade executes client-side and therefore all data referenced in Arcade expressions should be available on the client. On the first pass of generating the renderer, the client does not have the attributes required for executing the expression. So the generate renderer function samples features from the service that includes the required data. The expression then executes client-side and a renderer is generated for the entire renderer. On the second pass, the data is already available on the client. For that reason, there is no need to query a sample of features for generating the renderer. The data is queried client-side using a layer view query and breaks are generated from that result. Unfortunately layer view queries only consider data that is visible in the view. In this case, only four features are available in the view and therefore the function cannot generate five class breaks. It can only generate a max of four breaks. It also only considers those four features in generating those breaks, so the breaks themselves are different than when sampling from the whole dataset. To observe this, zoom out and all other features are excluded from the class breaks. Generally speaking, always author a renderer at the scale the renderer is most likely to be viewed at. For this reproduction case, if the renderer for a layer representing U.S. States is generated, then the interface zoomed to the extent of the U.S. states when creating the renderer.

対処法

There are a couple of ways to work around this issue. If using a basic expression like the one provided, set field and normalizationField in the function, and the renderer generates consistently every time because server queries are always used against the whole dataset. If Arcade is required, zoom to the widest extent where the data is most likely to be viewed.

In the example provided, it is supposed to be zoomed to the extent of the United States (since it is a state layer). Regenerate the renderer there and breaks consistent with the first generation can be seen. Generally speaking, it is not a good practice to generate styles at very large scales (zoomed in) when it is possible to view more data at smaller scales.

再現の手順

不具合 ID: BUG-000169933

ソフトウェア:

  • ArcGIS Maps SDK for JavaScript

バグのステータスが変更されたときに通知を受け取る

Esri Support アプリのダウンロード

このトピックについてさらに調べる

ArcGIS エキスパートのサポートを受ける

テクニカル サポートへのお問い合わせ

Esri Support アプリのダウンロード

ダウンロード オプションに移動