OpenWeatherMapTileLayer static method
TileLayer
OpenWeatherMapTileLayer({
- required OpenWeatherMapType type,
- TileLayerOptions? options,
- required String apikey,
Used to load and display tile layers from Open Weather Map servers.
Example:
U.OpenWeatherMapTileLayer(
type: OpenWeatherMapType.Clouds,
options: TileLayerOptions(
opacity: 0.9,
),
)
@param: type
enum to define the type of Open Weather Map tiles to load.
Available values:
OpenWeatherMapType.Clouds
OpenWeatherMapType.CloudsClassic
OpenWeatherMapType.Precipitation
OpenWeatherMapType.PrecipitationClassic
OpenWeatherMapType.Rain
OpenWeatherMapType.RainClassic
OpenWeatherMapType.Pressure
OpenWeatherMapType.PressureContour
OpenWeatherMapType.Wind
OpenWeatherMapType.Temperature
OpenWeatherMapType.Snow
@param: options
Parameter to override the default value of TileLayerOptions Default value: TileLayerOptions()
Implementation
// ignore: non_constant_identifier_names
static L.TileLayer OpenWeatherMapTileLayer({
required OpenWeatherMapType type,
L.TileLayerOptions? options,
required String apikey,
}) {
return L.TileLayer(
options: openweather(
type: type,
apikey: apikey,
options: options ?? L.TileLayerOptions(),
),
);
}