[ios, macos] Snapshotter (runtime styling) delegates
Added a protocol and property for MGLMapSnapshotter’s delegate, which it uses for runtime styling. Generalized MGLStyle to be usable in the absence of MGLMapView. Moved MGLOpenGLStyleLayer code around to compile.
This commit is contained in:
committed by
Minh Nguyễn
parent
180ab72055
commit
63bf91125a
@@ -4,12 +4,12 @@
|
||||
#import "MGLFoundation.h"
|
||||
#import "MGLTypes.h"
|
||||
#import "MGLGeometry.h"
|
||||
#import "MGLStyle.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class MGLAnnotationImage;
|
||||
@class MGLMapCamera;
|
||||
@class MGLStyle;
|
||||
@class MGLShape;
|
||||
|
||||
@protocol MGLAnnotation;
|
||||
@@ -65,7 +65,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
ensuring that your use adheres to the relevant terms of use.
|
||||
*/
|
||||
MGL_EXPORT IB_DESIGNABLE
|
||||
@interface MGLMapView : NSView
|
||||
@interface MGLMapView : NSView <MGLStylable>
|
||||
|
||||
#pragma mark Creating Instances
|
||||
|
||||
|
||||
@@ -961,7 +961,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
self.style = [[MGLStyle alloc] initWithRawStyle:&_mbglMap->getStyle() mapView:self];
|
||||
self.style = [[MGLStyle alloc] initWithRawStyle:&_mbglMap->getStyle() stylable:self];
|
||||
if ([self.delegate respondsToSelector:@selector(mapView:didFinishLoadingStyle:)])
|
||||
{
|
||||
[self.delegate mapView:self didFinishLoadingStyle:self.style];
|
||||
|
||||
Reference in New Issue
Block a user