WMSTileLayer static method
TileLayer
WMSTileLayer(
- String templateUrl, {
- dynamic subdomains = subdomainsDef,
- LatLngBounds? bounds,
- double minZoom = minZoomDef,
- double maxZoom = maxZoomDef,
- double? minNativeZoom,
- double? maxNativeZoom,
- double zoomOffset = zoomOffsetDef,
- bool zoomReverse = false,
- bool crossOrigin = false,
- dynamic tileSize = tileSizeDef,
- double opacity = tileOpacityDef,
- String errorTileUrl = '',
- bool updateWhenZooming = true,
- int updateInterval = updateTileIntervalDef,
- int tileFadeInDuration = tileFadeInDurationDef,
- TileProvider tileProvider = tileProviderDef,
- int keepBuffer = keepBufferDef,
- bool tms = tmsDef,
- bool interactive = interactiveDef,
- String attribution = attributionDef,
- Crs? crs,
- dynamic layers = '',
- dynamic styles = '',
- String format = 'image/jpeg',
- String version = '1.1.1',
- bool transparent = false,
- bool uppercase = false,
- dynamic additionalOptions = const <String, dynamic>{},
Used to display WMS services as tile layers on the map.
Example:
U.WMSTileLayer(
'http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi',
attribution: 'Weather data © 2012 IEM Nexrad',
layers: 'nexrad-n0r-900913',
format: 'image/png',
transparent: true,
)
Alias: TileLayer with WMSTileLayerOptions as options
Example:
TileLayer(
options: WMSTileLayerOptions(
templateUrl: 'http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi',
attribution: 'Weather data © 2012 IEM Nexrad',
layers: 'nexrad-n0r-900913',
format: 'image/png',
transparent: true,
),
)
Implementation
// ignore: non_constant_identifier_names
static L.TileLayer WMSTileLayer(
String templateUrl, {
dynamic subdomains = subdomainsDef,
LatLngBounds? bounds,
double minZoom = minZoomDef,
double maxZoom = maxZoomDef,
double? minNativeZoom,
double? maxNativeZoom,
double zoomOffset = zoomOffsetDef,
bool zoomReverse = false,
bool crossOrigin = false,
dynamic tileSize = tileSizeDef,
double opacity = tileOpacityDef,
String errorTileUrl = '',
bool updateWhenZooming = true,
int updateInterval = updateTileIntervalDef,
int tileFadeInDuration = tileFadeInDurationDef,
L.TileProvider tileProvider = tileProviderDef,
int keepBuffer = keepBufferDef,
bool tms = tmsDef,
bool interactive = interactiveDef,
String attribution = attributionDef,
Crs? crs,
dynamic layers = '',
dynamic styles = '',
String format = 'image/jpeg',
String version = '1.1.1',
bool transparent = false,
bool uppercase = false,
dynamic additionalOptions = const <String, dynamic>{},
}) {
return L.TileLayer(
options: L.WMSTileLayerOptions(
templateUrl: templateUrl,
subdomains: subdomains,
minZoom: minZoom,
maxZoom: maxZoom,
zoomOffset: zoomOffset,
zoomReverse: zoomReverse,
tileSize: tileSize,
opacity: opacity,
updateInterval: updateInterval,
tileFadeInDuration: tileFadeInDuration,
minNativeZoom: minNativeZoom,
maxNativeZoom: maxNativeZoom,
tileProvider: tileProvider,
tms: tms,
keepBuffer: keepBuffer,
interactive: interactive,
attribution: attribution,
crs: crs,
layers: layers,
styles: styles,
format: format,
version: version,
transparent: transparent,
uppercase: uppercase,
additionalOptions: additionalOptions,
),
);
}