diff options
Diffstat (limited to 'platform/darwin/src/MGLStyleLayer.mm.ejs')
-rw-r--r-- | platform/darwin/src/MGLStyleLayer.mm.ejs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLStyleLayer.mm.ejs b/platform/darwin/src/MGLStyleLayer.mm.ejs index 6d0c4bfdd9..b7be5fb9be 100644 --- a/platform/darwin/src/MGLStyleLayer.mm.ejs +++ b/platform/darwin/src/MGLStyleLayer.mm.ejs @@ -13,6 +13,7 @@ #import "MGLStyleLayer_Private.h" #import "MGLStyleValue_Private.h" #import "MGL<%- camelize(type) %>StyleLayer.h" +#import "MGLLoggingConfiguration_Private.h" #include <mbgl/style/transition_options.hpp> #include <mbgl/style/layers/<%- type.replace('-', '_') %>_layer.hpp> @@ -58,6 +59,7 @@ namespace mbgl { <% if (type == 'background') { -%> - (instancetype)initWithIdentifier:(NSString *)identifier { + MGLLogDebug(@"Initializing %@ with identifier: %@", NSStringFromClass([self class]), identifier); auto layer = std::make_unique<mbgl::style::<%- camelize(type) %>Layer>(identifier.UTF8String); return self = [super initWithPendingLayer:std::move(layer)]; } @@ -65,6 +67,7 @@ namespace mbgl { <% } else { -%> - (instancetype)initWithIdentifier:(NSString *)identifier source:(MGLSource *)source { + MGLLogDebug(@"Initializing %@ with identifier: %@ source: %@", NSStringFromClass([self class]), identifier, source); auto layer = std::make_unique<mbgl::style::<%- camelize(type) %>Layer>(identifier.UTF8String, source.identifier.UTF8String); return self = [super initWithPendingLayer:std::move(layer)]; } @@ -95,6 +98,7 @@ namespace mbgl { - (void)setSourceLayerIdentifier:(NSString *)sourceLayerIdentifier { MGLAssertStyleLayerIsValid(); + MGLLogDebug(@"Setting sourceLayerIdentifier: %@", sourceLayerIdentifier); self.rawLayer->setSourceLayer(sourceLayerIdentifier.UTF8String ?: ""); } @@ -102,6 +106,7 @@ namespace mbgl { - (void)setPredicate:(NSPredicate *)predicate { MGLAssertStyleLayerIsValid(); + MGLLogDebug(@"Setting predicate: %@", predicate); self.rawLayer->setFilter(predicate ? predicate.mgl_filter : mbgl::style::Filter()); } @@ -120,6 +125,7 @@ namespace mbgl { <% for (const property of layoutProperties) { -%> - (void)set<%- camelize(property.name) %>:(NSExpression *)<%- objCName(property) %> { MGLAssertStyleLayerIsValid(); + MGLLogDebug(@"Setting <%- objCName(property) %>: %@", <%- objCName(property) %>); <% if (property.tokens) { -%> if (<%- objCName(property) %> && <%- objCName(property) %>.expressionType == NSConstantValueExpressionType) { @@ -171,6 +177,7 @@ namespace mbgl { - (void)set<%- camelize(property.name) %>:(NSExpression *)<%- objCName(property) %> { MGLAssertStyleLayerIsValid(); + MGLLogDebug(@"Setting <%- objCName(property) %>: %@", <%- objCName(property) %>); <% switch (property['property-type']) { case 'color-ramp': -%> @@ -199,6 +206,7 @@ namespace mbgl { - (void)set<%- camelize(property.name) %>Transition:(MGLTransition )transition { MGLAssertStyleLayerIsValid(); + MGLLogDebug(@"Setting <%- objCName(property) %>Transition: %@", MGLStringFromMGLTransition(transition)); mbgl::style::TransitionOptions options { { MGLDurationFromTimeInterval(transition.duration) }, { MGLDurationFromTimeInterval(transition.delay) } }; self.rawLayer->set<%- camelize(originalPropertyName(property)) %>Transition(options); |