DantSu\OpenStreetMapStaticAPI\TileLayer define tile server url and related configuration
- Full name:
\DantSu\OpenStreetMapStaticAPI\TileLayer
See Also:
- https://github.com/DantSu/php-osm-static-api - Github page of this project
- (static) defaultTileLayer
- __construct
- setOpacity
- setMaxZoom
- getMaxZoom
- setMinZoom
- getMinZoom
- checkZoom
- getTileUrl
- getAttributionText
- getTile
Default tile server. OpenStreetMaps with related attribution text
- This method is static.
\DantSu\OpenStreetMapStaticAPI\TileLayer : default tile server
TileLayer constructor
Parameter | Type | Description |
---|---|---|
url |
string | tile server url with placeholders (x , y , z , r , s ) |
attributionText |
string | tile server attribution text |
subdomains |
string | tile server subdomains |
curlOptions |
array | Array of curl options |
failCurlOnError |
bool | If true, curl will throw an exception on error. |
Set opacity of the layer
Parameter | Type | Description |
---|---|---|
opacity |
float | Opacity value (0 to 1) |
$this : Fluent interface
Set a max zoom value
Parameter | Type | Description |
---|---|---|
maxZoom |
int |
$this : Fluent interface
Get max zoom value
int :
Set a min zoom value
Parameter | Type | Description |
---|---|---|
minZoom |
int |
$this : Fluent interface
Get min zoom value
int :
Check if zoom value is between min zoom and max zoom
Parameter | Type | Description |
---|---|---|
zoom |
int | Zoom value to be checked |
int :
Get tile url for coordinates and zoom level
Parameter | Type | Description |
---|---|---|
x |
int | x coordinate |
y |
int | y coordinate |
z |
int | zoom level |
string : tile url
Get attribution text
string : Attribution text
Get an image tile
Parameter | Type | Description |
---|---|---|
x |
float | |
y |
float | |
z |
int | |
tileSize |
int |
\DantSu\PHPImageEditor\Image : Image instance containing the tile
Automatically generated from source code comments on 2023-07-30 using phpDocumentor