Tuesday, December 19, 2023
HomeiOS Developmentandroid - flutter_map: TileLayer with WMTS not displaying clear background

android – flutter_map: TileLayer with WMTS not displaying clear background


I am making an attempt so as to add layer to my map, utilizing bundle flutter_map. When utilizing WMS, it really works nice utilizing WMSTileLayerOptions. However for WMTS, i take advantage of immediately urlTemplate however cannot add clear background, there’s at all times white background.

Did i miss one thing ? Is it in regards to the url ?

    class Map extends StatelessWidget {
      const Map({tremendous.key});
    
      @override
      Widget construct(BuildContext context) {
        return FlutterMap(
          choices: MapOptions(
            backgroundColor: Colours.clear,
            initialZoom: 7,
          ),
          youngsters: [
            TileLayer(
              urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
            ),
            TileLayer(
              urlTemplate:
                  "https://wxs.ign.fr/pratique/geoportail/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&TILEMATRIXSET=PM&LAYER=GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2&STYLE=normal&FORMAT=image/png&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}",
            ),
          ],
        );
      }
    }

Result



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments