Url Tile Provider
Abstract base class for TileProvider implementations that fetch tiles from URLs.
This class handles HTTP requests and tile downloading, while subclasses provide the URL template and optional customization.
URL templates use placeholders that are replaced with tile coordinates:
{z}- Zoom level{x}- Tile column{y}- Tile row
Example usage:
class CustomTileProvider : UrlTileProvider(
urlTemplate = "https://example.com/tiles/{z}/{x}/{y}.png"
) {
override fun getUserAgent(): String {
return "MyApp/1.0"
}
}Content copied to clipboard