Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.

titleLayer is not defined #4

Open
AteqEjaz opened this issue Jan 7, 2020 · 2 comments
Open

titleLayer is not defined #4

AteqEjaz opened this issue Jan 7, 2020 · 2 comments

Comments

@AteqEjaz
Copy link

AteqEjaz commented Jan 7, 2020

Hi,

I'm using flutter 1.12 stable and using Livemap (using master code to resolve dependencies)

Pubspec.yml

livemap:
git:
url: git@github.com:synw/livemap.git
ref: master

titleLayer: TileLayerOptions(
urlTemplate: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
subdomains: ['a', 'b', 'c']),
),

Error: titleLayer is not defined.
Any thoughts?

@synw
Copy link
Owner

synw commented Jan 7, 2020

Yes, this is an api change, sorry for the lack of documentation. This package has been heavily refactored using the Fluxmap library and the documentation currently lags behind. The tile layer management has been moved to the Map controller package with some predefined tile layers and a way to switch between them: example

To solve your problem just remove the tileLayer parameter and openstreetmap will be used by default

@synw synw added the api change label Jan 7, 2020
@synw
Copy link
Owner

synw commented Jan 9, 2020

Code snippet to define a tile layer:

final controller = LiveMapController(mapController: MapController())
  ..customTileLayer = TileLayerOptions(
      tileProvider: NetworkTileProvider(),
      urlTemplate: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
      subdomains: ['a', 'b', 'c'])
  ..tileLayerType = TileLayerType.custom;

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants