Skip to content

How to implement MapTiler maps in MapController.customLayer?? #405

Closed Answered by Piotr-Wosinek
Piotr-Wosinek asked this question in Q&A
Discussion options

You must be logged in to vote

I found a problem, I need to write it like this:

controller = MapController.customLayer(
      initMapWithUserPosition: false,
      initPosition: GeoPoint(
        latitude: 47.4358055,
        longitude: 8.4737324,
      ),
      customTile: CustomTile(
        sourceName: "satellite-v2",
        tileExtension: ".jpg",
        minZoomLevel: 2,
        maxZoomLevel: 18,
        urlsServers: [
          TileURLs(
            url: "https://api.maptiler.com/maps/satellite-v2/",
            // subdomains: ['a', 'b', 'c'],
          ),
        ],
        tileSize: 512,
        keyApi: MapEntry(
          "key",
          dotenv.env['key_maptiler']!,
        ),
      ),
    );

key_maptiler - …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@liodali
Comment options

Answer selected by Piotr-Wosinek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants