diff --git a/lib/src/layer/tile_layer.dart b/lib/src/layer/tile_layer.dart index 709dbe98c..a5acd776e 100644 --- a/lib/src/layer/tile_layer.dart +++ b/lib/src/layer/tile_layer.dart @@ -349,6 +349,9 @@ class WMSTileLayerOptions { /// tile transparency flag final bool transparent; + /// Encode boolean values as uppercase in request + final bool uppercaseBoolValue; + // TODO find a way to implicit pass of current map [Crs] final Crs crs; @@ -366,6 +369,7 @@ class WMSTileLayerOptions { this.format = 'image/png', this.version = '1.1.1', this.transparent = true, + this.uppercaseBoolValue = false, this.crs = const Epsg3857(), this.otherParameters = const {}, }) { @@ -383,7 +387,8 @@ class WMSTileLayerOptions { ..write('&format=${Uri.encodeComponent(format)}') ..write('&$projectionKey=${Uri.encodeComponent(crs.code)}') ..write('&version=${Uri.encodeComponent(version)}') - ..write('&transparent=$transparent'); + ..write( + '&transparent=${uppercaseBoolValue ? transparent.toString().toUpperCase() : transparent}'); otherParameters .forEach((k, v) => buffer.write('&$k=${Uri.encodeComponent(v)}')); return buffer.toString();