diff options
-rw-r--r-- | platform/darwin/src/MGLCircleStyleLayer.mm | 7 | ||||
-rw-r--r-- | platform/darwin/src/MGLFillStyleLayer.mm | 7 | ||||
-rw-r--r-- | platform/darwin/src/MGLLineStyleLayer.mm | 7 | ||||
-rw-r--r-- | platform/darwin/src/MGLRasterStyleLayer.mm | 7 | ||||
-rw-r--r-- | platform/darwin/src/MGLStyleLayer.mm.ejs | 12 | ||||
-rw-r--r-- | platform/darwin/src/MGLSymbolStyleLayer.mm | 7 |
6 files changed, 45 insertions, 2 deletions
diff --git a/platform/darwin/src/MGLCircleStyleLayer.mm b/platform/darwin/src/MGLCircleStyleLayer.mm index 266f2d836e..25dd859606 100644 --- a/platform/darwin/src/MGLCircleStyleLayer.mm +++ b/platform/darwin/src/MGLCircleStyleLayer.mm @@ -54,6 +54,13 @@ namespace mbgl { super.rawLayer = rawLayer; } +- (NSString *)sourceIdentifier +{ + MGLAssertStyleLayerIsValid(); + + return @(self.rawLayer->getSourceID().c_str()); +} + - (NSString *)sourceLayerIdentifier { MGLAssertStyleLayerIsValid(); diff --git a/platform/darwin/src/MGLFillStyleLayer.mm b/platform/darwin/src/MGLFillStyleLayer.mm index 891ab85d0b..204a4e92cb 100644 --- a/platform/darwin/src/MGLFillStyleLayer.mm +++ b/platform/darwin/src/MGLFillStyleLayer.mm @@ -49,6 +49,13 @@ namespace mbgl { super.rawLayer = rawLayer; } +- (NSString *)sourceIdentifier +{ + MGLAssertStyleLayerIsValid(); + + return @(self.rawLayer->getSourceID().c_str()); +} + - (NSString *)sourceLayerIdentifier { MGLAssertStyleLayerIsValid(); diff --git a/platform/darwin/src/MGLLineStyleLayer.mm b/platform/darwin/src/MGLLineStyleLayer.mm index 48164ed0c8..ab58a35f7f 100644 --- a/platform/darwin/src/MGLLineStyleLayer.mm +++ b/platform/darwin/src/MGLLineStyleLayer.mm @@ -61,6 +61,13 @@ namespace mbgl { super.rawLayer = rawLayer; } +- (NSString *)sourceIdentifier +{ + MGLAssertStyleLayerIsValid(); + + return @(self.rawLayer->getSourceID().c_str()); +} + - (NSString *)sourceLayerIdentifier { MGLAssertStyleLayerIsValid(); diff --git a/platform/darwin/src/MGLRasterStyleLayer.mm b/platform/darwin/src/MGLRasterStyleLayer.mm index e61532773c..ebe9e5f8f0 100644 --- a/platform/darwin/src/MGLRasterStyleLayer.mm +++ b/platform/darwin/src/MGLRasterStyleLayer.mm @@ -41,6 +41,13 @@ super.rawLayer = rawLayer; } +- (NSString *)sourceIdentifier +{ + MGLAssertStyleLayerIsValid(); + + return @(self.rawLayer->getSourceID().c_str()); +} + #pragma mark - Adding to and removing from a map view - (void)addToMapView:(MGLMapView *)mapView belowLayer:(MGLStyleLayer *)otherLayer diff --git a/platform/darwin/src/MGLStyleLayer.mm.ejs b/platform/darwin/src/MGLStyleLayer.mm.ejs index 6178eaad51..30bec0c79e 100644 --- a/platform/darwin/src/MGLStyleLayer.mm.ejs +++ b/platform/darwin/src/MGLStyleLayer.mm.ejs @@ -89,7 +89,15 @@ namespace mbgl { super.rawLayer = rawLayer; } -<% if (type !== 'background' && type !== 'raster') { -%> +<% if (type !== 'background') { -%> +- (NSString *)sourceIdentifier +{ + MGLAssertStyleLayerIsValid(); + + return @(self.rawLayer->getSourceID().c_str()); +} + +<% if (type !== 'raster') { -%> - (NSString *)sourceLayerIdentifier { MGLAssertStyleLayerIsValid(); @@ -119,7 +127,7 @@ namespace mbgl { return [NSPredicate mgl_predicateWithFilter:self.rawLayer->getFilter()]; } -<% } -%> +<% }} -%> #pragma mark - Adding to and removing from a map view - (void)addToMapView:(MGLMapView *)mapView belowLayer:(MGLStyleLayer *)otherLayer diff --git a/platform/darwin/src/MGLSymbolStyleLayer.mm b/platform/darwin/src/MGLSymbolStyleLayer.mm index 31c584b473..464a3d9505 100644 --- a/platform/darwin/src/MGLSymbolStyleLayer.mm +++ b/platform/darwin/src/MGLSymbolStyleLayer.mm @@ -108,6 +108,13 @@ namespace mbgl { super.rawLayer = rawLayer; } +- (NSString *)sourceIdentifier +{ + MGLAssertStyleLayerIsValid(); + + return @(self.rawLayer->getSourceID().c_str()); +} + - (NSString *)sourceLayerIdentifier { MGLAssertStyleLayerIsValid(); |