Urban visualizations with polygon patterns

This sample shows how to set pattern fills to polygons. When rendering multiple overlapping polygons representing different types of areas using only color to encode the information, it can become difficult to distinguish between the areas. In urban planning for example, there are areas representing different zones and other overlapping areas representing parcels.

In this example we are using a polygon pattern fill to render the urban renewal area overlay for an urban development plan.

The pattern style is set on the FillSymbol3DLayer on a PolygonSymbol3D:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
const symbol = {
  type: "polygon-3d",
  symbolLayers: [{
    type: "fill",
    material: { color: "red" },
    outline: { color: "red" },
    pattern: {
      type: "style",
      style: "cross"
    }
  }]
};

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.