NetworkTileProvider class
TileProvider to fetch tiles from the network
By default, a RetryClient
is used to retry failed requests. 'dart:http'
or 'dart:io' might be needed to override this.
On the web, the 'User-Agent' header cannot be changed as specified in TileLayer.tileProvider's documentation, due to a Dart/browser limitation.
- Inheritance
-
- Object
- TileProvider
- NetworkTileProvider
Constructors
-
NetworkTileProvider({Map<
String, String> headers = const {}, BaseClient? httpClient}) - TileProvider to fetch tiles from the network
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
↔ Map<
String, String> -
Custom headers that may be sent with each tile request, if the specific implementation supports it
getter/setter pairinherited
- httpClient → BaseClient
-
The HTTP client used to make network requests for tiles
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void -
Called when the
TileLayerWidget
is disposedinherited -
getImage(
TileCoordinates coordinates, TileLayer options) → ImageProvider< Object> -
Retrieve a tile as an image, based on it's coordinates and the current
TileLayerOptions
override -
getSubdomain(
TileCoordinates coordinates, TileLayer options) → String -
Get a subdomain value for a tile, based on it's coordinates and the current
TileLayerOptions
inherited -
getTileFallbackUrl(
TileCoordinates coordinates, TileLayer options) → String? -
Generates a valid URL for the
fallbackUrl
.inherited -
getTileUrl(
TileCoordinates coordinates, TileLayer options) → String -
Generate a valid URL for a tile, based on it's coordinates and the current
TileLayerOptions
inherited -
invertY(
int y, int z) → int -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited