Skip to content

Issues when change map tiles URL dynamically #583

@jesusrp98

Description

@jesusrp98

First thing, congratulation! The v0.9.0 release include really nice features!

Since this new update, when I try to change the map tiles URL while running the app, it takes a couple seconds, after to start navigating the mapo with the finger, until all tiles are updated. Before, this change was instantly performed.

Here's how I change the URL dynamically:

FlutterMap(
  mapController: _mapController,
  options: MapOptions(
    ...
  ),
  layers: <LayerOptions>[
    TileLayerOptions(
      urlTemplate: context.watch<MapProvider>().mapUrl,
      backgroundColor: Theme.of(context).canvasColor,
    ),
    MarkerLayerOptions(
      ...
    ),
  ],
),

Is this a bug, or is there a better method to update the map URL, for example using the MapController class? Thank!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions