A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-binning-polylines/ below:

Binning polylines | Sample Code | ArcGIS Maps SDK for JavaScript 4.33

Binning is typically used to visualize the density of points in a layer. This sample demonstrates how to enable binning on a FeatureLayer with polyline geometries. Binning is configured in the featureReduction property of the layer and setting its type to binning.

Note

For an introduction to binning, see the Binning documentation and the Intro to binning sample.

This example aggregates the locations of bridges along rail networks in New Zealand. Each bridge feature is represented as a polyline. When zoomed out, it isn't easy to perceive individual bridge locations and the overall density of bridges in an area. By enabling binning, the bridges are aggregated into bins, visualized as circles of varying sizes and colors. The color represents the rail line of the bridges in the bin, and the size represents the total length of bridges in the bin. You could alternatively visualize the total number of bridges using size.

Note that while bridges are clearly visible without binning enabled, the visualization misrepresents the data. For example, the image on the left portrays rail networks as if they are completely comprised of bridges, when in reality bridges make up a very small portion of the rail network. With binning enabled, as shown in the image on the right, the visualization appropriately represents bridges as clusters of individual entities within the rail network and communicates their density throughout the network.

When zoomed in, polyline features are more clearly visible in full fidelity.

For that reason, you should set a maxScale in the feature reduction configuration to disable binning at larger scales where individual features can be viewed at an appropriate level of detail.

Best practices for binning lines and polygons

When binning lines and polygons, the feature centroid is used for the aggregation. As a result, you should use the following guidelines when binning lines or polygons:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4