SVG Class

class BeastBytes\Yii\Leaflet\Renderers\Svg

Represents a SVG renderer

__construct(array $options)

Create a new Svg renderer

Parameters:
  • $options (array<string, mixed>.) – Renderer options

Returns:

A new instance of the renderer

Return type:

Svg

Inherited from Component

BeastBytes\Yii\Leaflet\Renderers\Svg::addToMap(bool $addToMap)

Whether to add the component to the map

By default, a component is added to the map.

Parameters:
  • $addToMap (bool) – Whether the component is added to the map

Returns:

A new instance of Svg with the addToMap parameter set

Return type:

Svg

BeastBytes\Yii\Leaflet\Renderers\Svg::getJsVar()

Returns the JavaScript variable name

Returns:

The JavaScript variable name

Return type:

string

BeastBytes\Yii\Leaflet\Renderers\Svg::jsVar(string $jsVar)

Set the JavaScript variable name

Parameters:
  • $jsVar (string) – The JavaScript variable name

Returns:

A new instance of Svg with the JavaScript variable name set

Return type:

Svg