Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blurred and Overly-Shadowed Sprites #210

Open
joris-prl opened this issue Aug 6, 2024 · 1 comment
Open

Blurred and Overly-Shadowed Sprites #210

joris-prl opened this issue Aug 6, 2024 · 1 comment

Comments

@joris-prl
Copy link

Description

Hello,

I'm currently using the flutter-vector-map-tiles package to display a vector map with Maptiler's "streets" style. However, I'm encountering a rendering issue with the sprites, which appear blurred and have an overly strong shadow.

Code

  void _readStyle() async {
    Style lightStyle = await StyleReader(
      uri: 'https://api.maptiler.com/maps/streets-v2/style.json?key={key}',
      apiKey: 'XXXXXXXX',
    ).read();
    this.lightStyle = lightStyle;
  }

        final VectorTileLayer tileLayer = VectorTileLayer(
          theme: lightStyle.theme,
          sprites: lightStyle.sprites,
          tileOffset: TileOffset.DEFAULT,
          tileProviders: lightStyle.providers,
          layerMode: VectorTileLayerMode.vector,
        );

pubspec.yaml
(Relevant dependencies only)

dependencies:
  flutter_map: ^6.0.0
  vector_map_tiles: ^7.3.1

Expected Behavior

I expect the sprites to be displayed sharply, without blur or excessive shadow, consistent with the standard appearance of Maptiler's "streets" style.

Screenshot

Capture d’écran 2024-08-06 à 11 19 54

Question: Do you have any suggestions for resolving this rendering issue? Is this a known problem, or are there specific settings I could adjust to improve the appearance of the sprites?

Thank you in advance for your help!

@greensopinion
Copy link
Owner

I'm not sure what's happening here. It's working better with the mapbox streets theme, see https://github.com/greensopinion/flutter-vector-map-tiles-examples

image

To troubleshoot you could look into what's different between the two themes. E.g. does the theme you're using have a different sprites json?
This could be a good place to start: https://github.com/greensopinion/dart-vector-tile-renderer/blob/85261f80344ca1d521bacfcb0ef58040720662f7/lib/src/themes/sprite_reader.dart#L8

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

No branches or pull requests

2 participants