▾
Magnitude 4.0 earthquakes and greater from 1970 to 2019, with brighter areas indicating a greater concentration of earthquakes.
What is bloom?
Bloom is a layer effect that brightens symbols representing a layer’s features, making them appear to glow. This has an additive effect so areas where more features overlap will have a brighter and more intense glow. This makes bloom an effective way for visualizing dense datasets.
How bloom works
The bloom effect is controlled with three parameters and looks best on dark backgrounds.
bloom(strength, radius, threshold)
| Parameter | Description |
|---|---|
| strength | Determines the intensity of the bloom effect as a factor or percentage. The higher the strength, the brighter the glow. |
| radius | Determines the spread of light in the accepted range 0px-1px. Default value is 0. Negative values are not allowed. Leaves the features inside the radius untouched. |
| threshold | Colors with this brightness value or higher will have the bloom effect applied. |
The bloom effect can be sensitive to scale, density, and color. Effectively using bloom is often done through trial and error. The parameters that work well for one layer are often not suitable for other layers.
Examples
Points
20 collapsed lines
<!doctype html><html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <title>Bloom - magnitude 4.0 earthquakes</title>
<!-- Load the ArcGIS Maps SDK for JavaScript from CDN --> <script type="module" src="https://js.arcgis.com/5.2/"></script>
<style> html, body { height: 100%; margin: 0; } </style> </head>
<body> <arcgis-map item-id="39a036d7d762416e833499f94db679e5"> <arcgis-zoom slot="top-left"></arcgis-zoom> <arcgis-expand slot="top-right"> <arcgis-legend></arcgis-legend> </arcgis-expand> </arcgis-map>2 collapsed lines
</body></html>- Create a simple renderer with a very small symbol size and apply it to the layer.
- Set a bloom effect on the layer with values appropriate for the global view scale and symbol color.
37 collapsed lines
<html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <title>Bloom - magnitude 4.0 earthquakes</title>
<link rel="stylesheet" href="https://js.arcgis.com/5.2/esri/themes/dark/main.css" /> <!-- Load the ArcGIS Maps SDK for JavaScript from CDN --> <script type="module" src="https://js.arcgis.com/5.2/"></script>
<style> html, body { background-color: rgba(50, 50, 50, 1); height: 100%; margin: 0; } </style> </head>
<body> <arcgis-map> <arcgis-zoom slot="top-left"></arcgis-zoom> <arcgis-expand slot="top-right"> <arcgis-legend></arcgis-legend> </arcgis-expand> </arcgis-map>
<script type="module"> const [Map, SpatialReference, FeatureLayer] = await $arcgis.import([ "@arcgis/core/Map.js", "@arcgis/core/geometry/SpatialReference.js", "@arcgis/core/layers/FeatureLayer.js", ]);
const viewElement = document.querySelector("arcgis-map");
const earthquakesLayer = new FeatureLayer({ url: "https://services.arcgis.com/6DIQcwlPy8knb6sg/arcgis/rest/services/quakes/FeatureServer/0/", renderer: { type: "simple", symbol: { type: "simple-marker", color: "#fd7f6f", size: 1, outline: null, }, }, }); earthquakesLayer.effect = "bloom(1.3, 0.1px, 15%)";40 collapsed lines
const viewSpatialReference = new SpatialReference({ wkid: 8857, }); let centerPoint = { x: -857528.6949199289, y: -651011.7196924537, spatialReference: viewSpatialReference, };
const countriesLayer = new FeatureLayer({ portalItem: { id: "2b93b06dc0dc4e809d3c8db5cb96ba69", }, renderer: { type: "simple", symbol: { type: "simple-fill", color: "rgba(75,75,75,1)", outline: { color: [255, 255, 255, 0.1], width: 0.5, }, }, }, });
viewElement.spatialReference = viewSpatialReference; viewElement.center = centerPoint; viewElement.scale = 254586002; viewElement.constraints = { snapToZoom: false, minScale: 1100424194, }; viewElement.map = new Map({ layers: [countriesLayer, earthquakesLayer], }); </script> </body></html>Lines
20 collapsed lines
<!doctype html><html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <title>Bloom - Florida annual average daily traffic</title>
<!-- Load the ArcGIS Maps SDK for JavaScript from CDN --> <script type="module" src="https://js.arcgis.com/5.2/"></script>
<style> html, body { height: 100%; margin: 0; } </style> </head>
<body> <arcgis-map item-id="ef0cc5d2a7be4d76b10d438b8234fe9a"> <arcgis-zoom slot="top-left"></arcgis-zoom> <arcgis-expand slot="top-right"> <arcgis-legend></arcgis-legend> </arcgis-expand> </arcgis-map>2 collapsed lines
</body></html>- Create a simple, unique value, or class breaks renderer and set it on the layer.
- Set a bloom effect on the layer.
35 collapsed lines
<html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <title>Bloom - Florida annual average daily traffic</title>
<link rel="stylesheet" href="https://js.arcgis.com/5.2/esri/themes/dark/main.css" /> <!-- Load the ArcGIS Maps SDK for JavaScript from CDN --> <script type="module" src="https://js.arcgis.com/5.2/"></script>
<style> html, body { height: 100%; margin: 0; } </style> </head>
<body> <arcgis-map center="-81.723489, 28.166191" scale="2311162"> <arcgis-zoom slot="top-left"></arcgis-zoom> <arcgis-expand slot="top-right"> <arcgis-legend></arcgis-legend> </arcgis-expand> </arcgis-map>
<script type="module"> const [WebMap, FeatureLayer] = await $arcgis.import([ "@arcgis/core/WebMap.js", "@arcgis/core/layers/FeatureLayer.js", ]);
const viewElement = document.querySelector("arcgis-map");
const highwaysLayer = new FeatureLayer({ portalItem: { id: "cca8f554a0764b94b35f8b1781e399de", }, effect: "bloom(1, 0px, 1%)", });14 collapsed lines
viewElement.map = new WebMap({ portalItem: { id: "41b13aa63483457cafe2b40f38fa098c", }, layers: [highwaysLayer], }); viewElement.constraints = { snapToZoom: false, minScale: 11424194, }; </script> </body></html>Related samples and resources
API support
The following table describes the geometry and view types that are suited well for each visualization technique.
| 2D | 3D | Points | Lines | Polygons | Mesh | Client-side | Server-side | |
|---|---|---|---|---|---|---|---|---|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | ||||||
| | | | | | | | |
- Feature reduction selection not supported
- Only by feature reduction selection
- Only by scale-driven filter