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

Runtime changes to text-field are not immediate #6820

Closed
friedbunny opened this issue Oct 26, 2016 · 4 comments
Closed

Runtime changes to text-field are not immediate #6820

friedbunny opened this issue Oct 26, 2016 · 4 comments
Assignees
Labels
bug Core The cross-platform C++ core, aka mbgl runtime styling
Milestone

Comments

@friedbunny
Copy link
Contributor

On the current iOS release branch (dbfa8dc), changing the value of MGLStyleValue.textField (in this case, the language labels via #6819) is not reflected immediately on the map.

Instead, the labels go blank.

  • Zooming several levels (and triggering a [re]load?), then zooming back to the original zoom level will cause the labels to appear correctly at the original zoom level.
  • Panning outside of the viewport at the original zoom level (to an area that was not shown) will show the labels in those new areas.

asdf

/cc @boundsj @1ec5 @ivovandongen

@friedbunny friedbunny added bug iOS Mapbox Maps SDK for iOS runtime styling labels Oct 26, 2016
@friedbunny friedbunny added this to the ios-v3.4.0 milestone Oct 26, 2016
@1ec5
Copy link
Contributor

1ec5 commented Oct 26, 2016

This might affect all layout properties, not just text-field.

/cc @bsudekum @jfirebaugh

@1ec5 1ec5 changed the title Runtime changes to a layer’s text field are not immediate Runtime changes to a layer’s layout properties are not immediate Oct 26, 2016
@1ec5 1ec5 added Core The cross-platform C++ core, aka mbgl and removed iOS Mapbox Maps SDK for iOS labels Nov 3, 2016
@1ec5
Copy link
Contributor

1ec5 commented Nov 3, 2016

Given #6903, this is definitely affecting all layout properties on both iOS and Android. It’s a regression of #5701.

@jfirebaugh jfirebaugh self-assigned this Nov 3, 2016
@jfirebaugh
Copy link
Contributor

The bug in this case is specific to text-field, not all properties.

GeometryTileWorker expects to be notified when the main thread has loaded additional glyphs which may be needed in order to proceed with symbol layout. However the notification mechanism, GeometryTileWorker::setPlacementConfig, is overloaded. Its primary purpose is to notify GeometryTileWorker when the camera changes in a way that affects label placement, such as rotating. In order to avoid needless updates for camera changes that don't affect placement, the provided value for PlacementConfig is compared against the last used value, and short circuited if unchanged. This short circuiting conflicts with the use of GeometryTileWorker::setPlacementConfig as a notification that new glyphs have been loaded. That needs to be a separate notification pathway.

@jfirebaugh jfirebaugh changed the title Runtime changes to a layer’s layout properties are not immediate Runtime changes to text-field are not immediate Nov 3, 2016
@jfirebaugh
Copy link
Contributor

Related issues: #2851, #2511. This has perpetually been a problematic area of the code.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Core The cross-platform C++ core, aka mbgl runtime styling
Projects
None yet
Development

No branches or pull requests

3 participants