summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLForegroundStyleLayer.mm
blob: 6926dfac1f09a5d25cc29bfc9f53850571cf062c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#import "MGLForegroundStyleLayer.h"
#import "MGLForegroundStyleLayer_Private.h"
#import "MGLStyleLayer_Private.h"
#import "MGLSource.h"

@implementation MGLForegroundStyleLayer

- (instancetype)initWithRawLayer:(mbgl::style::Layer *)rawLayer source:(MGLSource *)source {
    if (self = [super initWithRawLayer:rawLayer]) {
        _sourceIdentifier = source.identifier;
    }
    return self;
}

- (instancetype)initWithPendingLayer:(std::unique_ptr<mbgl::style::Layer>)pendingLayer source:(MGLSource *)source {
    if (self = [super initWithPendingLayer:std::move(pendingLayer)]) {
        _sourceIdentifier = source.identifier;
    }
    return self;
}

- (NSString *)description {
    return [NSString stringWithFormat:
            @"<%@: %p; identifier = %@; sourceIdentifier = %@; visible = %@>",
            NSStringFromClass([self class]), (void *)self, self.identifier,
            self.sourceIdentifier, self.visible ? @"YES" : @"NO"];
}

@end