PolygonLayer
A layer to display PolygonMarkers.
Inherits: MapLayer
Properties
draw_labels_last- Whether to draw labels last and thus over all the polygons.polygon_culling- Whether to cull polygons and polygon sections that are outside of the viewport.polygon_labels- Whether to draw per-polygon labels.polygons- A list of PolygonMarkers to display.simplification_tolerance- The tolerance value used to simplify polygon outlines before rendering.use_alternative_rendering- Whether to use an alternative rendering pathway to draw polygons onto the underlyingCanvas, which can be more performant in 'some' circumstances.
Properties
draw_labels_lastclass-attributeinstance-attribute
draw_labels_last: bool = FalseWhether to draw labels last and thus over all the polygons.
polygon_cullingclass-attributeinstance-attribute
polygon_culling: bool = TrueWhether to cull polygons and polygon sections that are outside of the viewport.
polygon_labelsclass-attributeinstance-attribute
polygon_labels: bool = TrueWhether to draw per-polygon labels.
simplification_toleranceclass-attributeinstance-attribute
simplification_tolerance: Number = 0.3The tolerance value used to simplify polygon outlines before rendering.
Higher values will result in polygons with fewer points, which can improve rendering performance at the cost of reduced geometric accuracy. Lower values preserve more detail but may decrease performance, especially with complex polygons.
Set to 0 to disable simplification.
use_alternative_renderingclass-attributeinstance-attribute
use_alternative_rendering: bool = FalseWhether to use an alternative rendering pathway to draw polygons onto the
underlying Canvas, which can be more performant in 'some' circumstances.
This will not always improve performance, and there are other important considerations before enabling it. It is intended for use when prior profiling indicates more performance is required after other methods are already in use. For example, it may worsen performance when there are a huge number of polygons to triangulate - and so this is best used in conjunction with simplification, not as a replacement.