Skip to content

Function: setEntityDefaults()

ts
function setEntityDefaults(defaults): Promise<void>;

Set property-wide fallback entity styling/content.

The fields of defaults (notably name, html, marker, highlight) apply to every entity that has no explicit override set via setEntityData or setEntityDataById.

id is semantically ignored. The type requires it because MapEntity is shared with the per-entity setters, but property-wide defaults do not target a single entity. A common convention is to pass 0 (see the Applying a fallback template to all entities section of the customize-popups guide).

Parameters

ParameterType
defaultsMapEntity

Returns

Promise<void>