CircleMarker Class¶
- class BeastBytes\Yii\Leaflet\Layers\Vector\CircleMarker¶
Represents a circle on the map with its centre at a geographical location with a radius given in pixels
@template T of array{float, float}|array{float, float, float}|array{lat: float, lng: float}|array{lat: float, lng: float, alt: float}|LatLng
- __construct(array|LatLng $location, array $options)¶
Create a new CircleMarker instance
- Parameters:
$location (
T) – The geographical location - centre - of the circle$options (
array<string, mixed>.) – CircleMarker options. ‘radius’ is required and must be a positive integer
- Returns:
A new CircleMarker instance
- Return type:
Inherited from Layer¶
- BeastBytes\Yii\Leaflet\Layers\Vector\CircleMarker::popup(string $content, array $options = [])¶
Binds a popup to the layer
- Parameters:
$content (
string) – The popup content$options (
array<string, mixed>.) – Popup options- Returns:
A new instance of CircleMarker with the popup
- Return type:
CircleMarker
- BeastBytes\Yii\Leaflet\Layers\Vector\CircleMarker::tooltip(string $content, array $options = [])¶
Binds a tooltip to the layer
- Parameters:
$content (
string) – The tooltip content$options (
array<string, mixed>.) – Tooltip options- Returns:
A new instance of CircleMarker with the tooltip
- Return type:
CircleMarker
Inherited from Component¶
- BeastBytes\Yii\Leaflet\Layers\Vector\CircleMarker::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 CircleMarker with the addToMap parameter set
- Return type:
CircleMarker
- BeastBytes\Yii\Leaflet\Layers\Vector\CircleMarker::getJsVar()¶
Returns the JavaScript variable name
- Returns:
The JavaScript variable name
- Return type:
string
- BeastBytes\Yii\Leaflet\Layers\Vector\CircleMarker::jsVar(string $jsVar)¶
Set the JavaScript variable name
- Parameters:
$jsVar (
string) – The JavaScript variable name- Returns:
A new instance of CircleMarker with the JavaScript variable name set
- Return type:
CircleMarker
See also