fixes #5957: automatically call update() for iOS runtime style API
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#import "MGLBaseStyleLayer.h"
|
||||
|
||||
#import "MGLBaseStyleLayer_Private.hpp"
|
||||
#import "MGLStyleLayer_Private.hpp"
|
||||
#import "MGLMapView_Private.hpp"
|
||||
|
||||
@@ -16,7 +17,10 @@
|
||||
|
||||
- (void)update
|
||||
{
|
||||
self.mapView.mbglMap->update(mbgl::Update::RecalculateStyle | mbgl::Update::Classes);
|
||||
// A style layer's map view can be nil when first created at runtime
|
||||
// before being added to a map style. In these cases, just no-op since
|
||||
// the addition of the layer will trigger a visual refresh.
|
||||
if (self.mapView) self.mapView.mbglMap->update(mbgl::Update::RecalculateStyle | mbgl::Update::Classes);
|
||||
}
|
||||
|
||||
- (void)setVisible:(BOOL)visible
|
||||
|
||||
Reference in New Issue
Block a user