Added an offline pack download manager to osxapp to demonstrate the use of MGLOfflineStorage with Cocoa Bindings. Like the Offline Packs view controller in iosapp, new packs are added based on the foremost map view’s current state. Double-clicking a complete offline pack opens a new map window to the pack’s bounds.
23 lines
931 B
Objective-C
23 lines
931 B
Objective-C
#import <Mapbox/Mapbox.h>
|
|
|
|
extern NSString * const MGLMapboxAccessTokenDefaultsKey;
|
|
|
|
@interface AppDelegate : NSObject <NSApplicationDelegate>
|
|
|
|
@property (weak) IBOutlet NSWindow *preferencesWindow;
|
|
|
|
// Normally, an application should respect the “Close windows when quitting an
|
|
// application” setting in the General pane of System Preferences. But the map
|
|
// would only be restored to its last opened location if the user quits the
|
|
// application using Quit and Keep Windows. An application that displays only a
|
|
// map should restore the last viewed map, like Maps.app does. These properties
|
|
// temporarily hold state for the next map window to be opened.
|
|
|
|
@property (assign) double pendingZoomLevel;
|
|
@property (copy) MGLMapCamera *pendingCamera;
|
|
@property (assign) MGLCoordinateBounds pendingVisibleCoordinateBounds;
|
|
@property (copy) NSURL *pendingStyleURL;
|
|
@property (assign) MGLMapDebugMaskOptions pendingDebugMask;
|
|
|
|
@end
|