diff options
author | Nadia Barbosa <nadiabarbosa@me.com> | 2018-10-05 19:10:58 -0400 |
---|---|---|
committer | Nadia Barbosa <nadiabarbosa@me.com> | 2018-10-23 11:57:50 -0700 |
commit | 009082b6948ec31c01ea1e1b60937b76c33bee8e (patch) | |
tree | e98a9aa70eed980bd7830e873e706211bc962506 /platform/darwin/src/MGLTilePyramidOfflineRegion.mm | |
parent | 62af756ab8250e00a63776c2d32bf3123909eddb (diff) | |
download | qtlocation-mapboxgl-upstream/add-offline-event.tar.gz |
[ios] Log event when offline pack is createdupstream/add-offline-event
Only run MME code for iOS
Diffstat (limited to 'platform/darwin/src/MGLTilePyramidOfflineRegion.mm')
-rw-r--r-- | platform/darwin/src/MGLTilePyramidOfflineRegion.mm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLTilePyramidOfflineRegion.mm b/platform/darwin/src/MGLTilePyramidOfflineRegion.mm index 0766d224da..3a4f20bf51 100644 --- a/platform/darwin/src/MGLTilePyramidOfflineRegion.mm +++ b/platform/darwin/src/MGLTilePyramidOfflineRegion.mm @@ -9,6 +9,10 @@ #import "MGLGeometry_Private.h" #import "MGLStyle.h" +#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR +#import "MMEConstants.h" +#endif + @interface MGLTilePyramidOfflineRegion () <MGLOfflineRegion_Private, MGLTilePyramidOfflineRegion_Private> @end @@ -19,6 +23,17 @@ @synthesize styleURL = _styleURL; +#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR +-(NSDictionary *)offlineStartEventAttributes { + return @{ + MMEEventKeyShapeForOfflineRegion: @"tileregion", + MMEEventKeyMinZoomLevel: @(self.minimumZoomLevel), + MMEEventKeyMaxZoomLevel: @(self.maximumZoomLevel), + MMEEventKeyStyleURL: self.styleURL + }; +} +#endif + + (BOOL)supportsSecureCoding { return YES; } |