Create a tile layer to append on a Map. Parameters ---------- tiles: str or :class:`xyzservices.TileProvider`, default 'OpenStreetMap' Map tileset to use. Folium has built-in all tilesets available in the ``xyzservices`` package. For example, you can pass an
| 22 | |
| 23 | |
| 24 | class TileLayer(Layer): |
| 25 | """ |
| 26 | Create a tile layer to append on a Map. |
| 27 | |
| 28 | Parameters |
| 29 | ---------- |
| 30 | tiles: str or :class:`xyzservices.TileProvider`, default 'OpenStreetMap' |
| 31 | Map tileset to use. Folium has built-in all tilesets |
| 32 | available in the ``xyzservices`` package. For example, you can pass |
| 33 | any of the following to the "tiles" keyword: |
| 34 | |
| 35 | - "OpenStreetMap" |
| 36 | - "CartoDB Positron" |
| 37 | - "CartoDB Voyager" |
| 38 | |
| 39 | Explore more provider names available in ``xyzservices`` here: |
| 40 | https://leaflet-extras.github.io/leaflet-providers/preview/. |
| 41 | |
| 42 | You can also pass a custom tileset by passing a |
| 43 | :class:`xyzservices.TileProvider` or a Leaflet-style |
| 44 | URL to the tiles parameter: ``https://{s}.yourtiles.com/{z}/{x}/{y}.png``. |
| 45 | min_zoom: int, optional, default 0 |
| 46 | Minimum allowed zoom level for this tile layer. Filled by xyzservices by default. |
| 47 | max_zoom: int, optional, default 18 |
| 48 | Maximum allowed zoom level for this tile layer. Filled by xyzservices by default. |
| 49 | max_native_zoom: int, default None |
| 50 | The highest zoom level at which the tile server can provide tiles. |
| 51 | Filled by xyzservices by default. |
| 52 | By setting max_zoom higher than max_native_zoom, you can zoom in |
| 53 | past max_native_zoom, tiles will be autoscaled. |
| 54 | attr: string, default None |
| 55 | Map tile attribution; only required if passing custom tile URL. |
| 56 | detect_retina: bool, default False |
| 57 | If true and user is on a retina display, it will request four |
| 58 | tiles of half the specified size and a bigger zoom level in place |
| 59 | of one to utilize the high resolution. |
| 60 | name : string, default None |
| 61 | The name of the Layer, as it will appear in LayerControls |
| 62 | overlay : bool, default False |
| 63 | Adds the layer as an optional overlay (True) or the base layer (False). |
| 64 | control : bool, default True |
| 65 | Whether the Layer will be included in LayerControls. |
| 66 | show: bool, default True |
| 67 | Whether the layer will be shown on opening. |
| 68 | When adding multiple base layers, use this parameter to select which one |
| 69 | should be shown when opening the map, by not showing the others. |
| 70 | subdomains: list of strings, default ['abc'] |
| 71 | Subdomains of the tile service. |
| 72 | tms: bool, default False |
| 73 | If true, inverses Y axis numbering for tiles (turn this on for TMS |
| 74 | services). |
| 75 | opacity: float, default 1 |
| 76 | Sets the opacity for the layer. |
| 77 | **kwargs : additional keyword arguments |
| 78 | Other keyword arguments are passed as options to the Leaflet tileLayer |
| 79 | object. |
| 80 | """ |
| 81 |