flutter-vector-map-tiles icon indicating copy to clipboard operation
flutter-vector-map-tiles copied to clipboard

Transit icons only visible in the Maputnik editor

Open galgyozo opened this issue 2 years ago • 3 comments

Hey, I downloaded the osm-bright style json and also uploaded it to the Maputnik editor and I found a strange thing. While there are icons in the editor, in the app I only see the names of the POIs.

App Editor
Simulator Screenshot - iPhone 14 Pro - 2023-06-07 at 16 20 35 Screenshot 2023-06-07 at 16 14 53

Do you know what could be the reason behind this?

galgyozo avatar Jun 07 '23 14:06 galgyozo

I don't know what the issue is, but icons are a new feature released in version 4 of this library. It's possible that there is a defect.

I recommend:

  1. make sure you are using the latest version
  2. try different zoom levels
  3. check that the icon atlas is loaded correctly in the app
  4. debug icon rendering

relevant code:

https://github.com/greensopinion/dart-vector-tile-renderer/blob/main/lib/src/features/icon_renderer.dart https://github.com/greensopinion/flutter-vector-map-tiles/blob/main/lib/src/style/style.dart#L77

greensopinion avatar Jun 09 '23 14:06 greensopinion

Thank you for your response!

I wasn't using the latest version so I had to update first, but it's still not working. Different zoom levels didn't help either.

I did debug the style and found out that the content of the sprite is null even though the sprite json and image content is loaded in the style.dart. Screenshot 2023-06-13 at 9 24 05

I also tried to debug the icon renderer but somehow it wasn't called once. Could that be the issue? If yes, do you know what could be the cause?

galgyozo avatar Jun 13 '23 09:06 galgyozo

It's fine for the content property to be null, so likely the problem is something else.

On Tue, Jun 13, 2023 at 2:18 AM Győző Gál @.***> wrote:

Thank you for your response!

I wasn't using the latest version so I had to update first, but it's still not working. Different zoom levels didn't help either.

I did debug the style and found out that the content of the sprite is null even though the sprite json and image content is loaded in the style.dart https://github.com/greensopinion/flutter-vector-map-tiles/blob/main/lib/src/style/style.dart#L77 . [image: Screenshot 2023-06-13 at 9 24 05] https://user-images.githubusercontent.com/17298968/245399661-04154a25-74f4-4de7-acd4-a91bb7162265.png

I also tried to debug the icon renderer but somehow it wasn't called once. Could that be the issue? If yes, do you know what could be the cause?

— Reply to this email directly, view it on GitHub https://github.com/greensopinion/flutter-vector-map-tiles/issues/159#issuecomment-1588888641, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEKDQ7UX74WUHHXDZAL6ZFLXLAV4RANCNFSM6AAAAAAY56UCFY . You are receiving this because you commented.Message ID: @.***>

greensopinion avatar Jun 13 '23 13:06 greensopinion