Skip to content

Rects

Example usage of RectLayer with different unit modes for both the rect size (data_unit_mode_x/data_unit_mode_y) and the border stroke width (stroke_width_unit_mode). The first rect has its size and stroke width both defined in data units, so the border scales with the rect when zoomed. The second rect has its size in data units but a stroke width fixed in pixels, so the border stays a constant width on screen. The third rect has its size and stroke width both defined in pixels, so the whole rect stays a fixed size on screen regardless of the data domain.