ThunderforestTileLayer static method

TileLayer ThunderforestTileLayer({
  1. required ThunderforestType type,
  2. TileLayerOptions? options,
  3. required String apikey,
})

Used to load and display tile layers from Thunderforest servers.

Example:

U.ThunderforestTileLayer(
  type: ThunderforestType.Outdoors,
  options: TileLayerOptions(
    opacity: 0.9,
  ),
)

@param: type

enum to define the type of Thunderforest Map tiles to load.

Available values: ThunderforestType.Cycle ThunderforestType.Transport ThunderforestType.TransportDark ThunderforestType.Spinal ThunderforestType.Landscape ThunderforestType.Outdoors ThunderforestType.Pioneer ThunderforestType.MobileAtlas ThunderforestType.Neighbourhood

@param: options

Parameter to override the default value of TileLayerOptions Default value: TileLayerOptions()

Implementation

// ignore: non_constant_identifier_names
static L.TileLayer ThunderforestTileLayer({
  required ThunderforestType type,
  L.TileLayerOptions? options,
  required String apikey,
}) {
  return L.TileLayer(
    options: thunderforest(
      type: type,
      apikey: apikey,
      options: options ?? L.TileLayerOptions(),
    ),
  );
}