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/MGLShapeOfflineRegion.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/MGLShapeOfflineRegion.mm')
-rw-r--r-- | platform/darwin/src/MGLShapeOfflineRegion.mm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLShapeOfflineRegion.mm b/platform/darwin/src/MGLShapeOfflineRegion.mm index e1393f1199..02ff2abfc5 100644 --- a/platform/darwin/src/MGLShapeOfflineRegion.mm +++ b/platform/darwin/src/MGLShapeOfflineRegion.mm @@ -12,6 +12,10 @@ #import "MGLShape_Private.h" #import "MGLStyle.h" +#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR +#import "MMEConstants.h" +#endif + @interface MGLShapeOfflineRegion () <MGLOfflineRegion_Private, MGLShapeOfflineRegion_Private> @end @@ -22,6 +26,17 @@ @synthesize styleURL = _styleURL; +#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR +-(NSDictionary *)offlineStartEventAttributes { + return @{ + MMEEventKeyShapeForOfflineRegion: @"shaperegion", + MMEEventKeyMinZoomLevel: @(self.minimumZoomLevel), + MMEEventKeyMaxZoomLevel: @(self.maximumZoomLevel), + MMEEventKeyStyleURL: self.styleURL + }; +} +#endif + + (BOOL)supportsSecureCoding { return YES; } |