Skip to content

BUG: Raster and Vector layers desynchronize during map interaction #4132

@UlysselaGlisse

Description

@UlysselaGlisse

Bug description

When interacting with the map, there is a desynchronisation between raster and vectors layers.

Where to find this bug

I've found this bug in many applications using MapLibre Native for map rendering across both IOS and Android.
The issue is more prononced on Android: the misalignment triggers immediately upon touching the screen.
On IOS, we have to move the map to see it.

For example :

  • CFF (Swiss train company):
    • Android:
CFF-Android.mp4
- IOS:
CFF-IOS.mov
  • Mappy:
    • Android:
Mappy-Android.mp4
  • IOS:
Mappy-IOS.mov

Proposed fix:

I've found a workaround to avoid this dealignment by deleting this condition:

// src/mbgl/renderer/layers/raster_layer_tweaker.cpp 
// l.97

matrix = getTileMatrix(
        tileID,
        parameters,
        {0.f, 0.f},
        TranslateAnchorType::Viewport,
        false,
        false,
        drawable,
        !parameters.state.isChanging()); // <- That one
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions