WmsTileLayer Class¶
- class BeastBytes\Yii\Leaflet\Layers\Raster\WmsTileLayer¶
WmsTileLayer is used to display WMS services as tile layers on the map
- __construct(string $url, array $options = [])¶
Create a new WmsTileLayer instance
- Parameters:
$url (
string) – Base URL of the WMS service$options (
array<string, mixed>.) – WmsTileLayer options
- Returns:
A new WmsTileLayer instance
- Return type:
Inherited from Layer¶
- BeastBytes\Yii\Leaflet\Layers\Raster\WmsTileLayer::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 WmsTileLayer with the popup
- Return type:
WmsTileLayer
- BeastBytes\Yii\Leaflet\Layers\Raster\WmsTileLayer::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 WmsTileLayer with the tooltip
- Return type:
WmsTileLayer
Inherited from Component¶
- BeastBytes\Yii\Leaflet\Layers\Raster\WmsTileLayer::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 WmsTileLayer with the addToMap parameter set
- Return type:
WmsTileLayer
- BeastBytes\Yii\Leaflet\Layers\Raster\WmsTileLayer::getJsVar()¶
Returns the JavaScript variable name
- Returns:
The JavaScript variable name
- Return type:
string
- BeastBytes\Yii\Leaflet\Layers\Raster\WmsTileLayer::jsVar(string $jsVar)¶
Set the JavaScript variable name
- Parameters:
$jsVar (
string) – The JavaScript variable name- Returns:
A new instance of WmsTileLayer with the JavaScript variable name set
- Return type:
WmsTileLayer