Protocols

The following protocols are available globally.

  • Snapshot Delegate

    Snapshots can be run as callbacks after the rendering.  If you keep your area
    small enough you can even do it every frame.  This is the protocol for
    snapshot delegates.
    
    See more

    Declaration

    Objective-C

    @protocol MaplySnapshotDelegate

    Swift

    protocol MaplySnapshotDelegate
  • Render Controler Protocol defines the methods required of a render controller.

    The view controllers and offscreen rendere implement this protocol.

    See more

    Declaration

    Objective-C

    @protocol MaplyRenderControllerProtocol

    Swift

    protocol MaplyRenderControllerProtocol
  • The update delegate is called if the viewer moves, but not too often.

    Use this delegate to generate features around the viewer when they move. You can control how far they have to move (in display coordinates) and how often you’ll receive updates.

    See more

    Declaration

    Objective-C

    @protocol MaplyUpdateDelegate

    Swift

    protocol MaplyUpdateDelegate
  • An animation delegate that can be set on a MaplyViewController to control the view over time.

    Filling out these methods will get you animation callbacks at the proper time to control position, heading and height on a frame basis.

    You pass the resulting object in to

    See more

    Declaration

    Objective-C

    @protocol MaplyViewControllerAnimationDelegate <NSObject>

    Swift

    protocol MaplyViewControllerAnimationDelegate : NSObjectProtocol
  • A protocol to fill out for selection and tap messages from the MaplyViewController.

    Fill out the protocol when you want to get back selection and tap messages. All the methods are optional.

    See more

    Declaration

    Objective-C

    @protocol MaplyViewControllerDelegate <NSObject>

    Swift

    protocol MaplyViewControllerDelegate : NSObjectProtocol
  • An animation delegate that can be set on a WhirlyGlobeViewController to control the view over time.

    Filling out these methods will get you animation callbacks at the proper time to control position, heading, tilt, and height on a frame basis.

    You pass the resulting object in to

    See more

    Declaration

    Objective-C

    @protocol WhirlyGlobeViewControllerAnimationDelegate <NSObject>

    Swift

    protocol WhirlyGlobeViewControllerAnimationDelegate : NSObjectProtocol
  • Globe View Controller Delegate protocol for getting back selection and tap events.

    Fill out the methods in this protocol and assign yourself as a delegate in the WhirlyGlobeViewController to get selection and tap events.

    See more

    Declaration

    Objective-C

    @protocol WhirlyGlobeViewControllerDelegate <NSObject>

    Swift

    protocol WhirlyGlobeViewControllerDelegate : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol Maply3dTouchPreviewDatasource <NSObject>
    
    @required
    /** 
        Asks the data source for a view controller to display as a preview for a selected object
     
        @param viewC the map requesting the view controller;
     
        @param selectedObj The object a preview is being requested for.
     
        @return a UIViewController, or nil if no preview should be displayed.
     */
    - (UIViewController * _Nullable)maplyViewController:(MaplyBaseViewController * _Nonnull)viewC
                      previewViewControllerForSelection:(NSObject * _Nonnull)selectedObj;
    
    /** 
        Asks the data source to present a preview view controller.
     
        the most likely implementation of this is [self show:previewViewC sender:self];
     
        @param viewC the map requesting the view controller;
     
        @param previewViewC the view controller to present.
     */
    - (void)maplyViewController:(MaplyBaseViewController * _Nonnull)viewC
      showPreviewViewController:(UIViewController * _Nonnull)previewViewC;
    
    @end

    Swift

    protocol Maply3dTouchPreviewDatasource
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol MaplyLocationTrackerDelegate
    
    - (void) locationManager:(CLLocationManager * __nonnull)manager didFailWithError:(NSError * __nonnull)error;
    
    - (void) locationManager:(CLLocationManager * __nonnull)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status;
    
    @optional
    
    - (void) updateLocation:(CLLocation * __nonnull)location;
    
    - (MaplyLocationTrackerSimulationPoint)getSimulationPoint;
    
    @end

    Swift

    protocol MaplyLocationTrackerDelegate
  • Loader Interpreter converts raw data into images and objects.

    Converts data returned from a remote source (or cache) into images and/or MaplyComponentObjects that have already been added to the view (disabled).

    See more

    Declaration

    Objective-C

    @protocol MaplyLoaderInterpreter <NSObject>

    Swift

    protocol MaplyLoaderInterpreter : NSObjectProtocol
  • If you provide LocalStore the RemoteTileFetcher will look for data in local storage first, then try the local file cache and lastly go to the network.

    You can provide the local storage by filling out this protocol and passing it to the RemoteTileFetcher.

    Expect to be called on a random thread and block appropriately.

    See more

    Declaration

    Objective-C

    @protocol MaplyTileLocalStorage <NSObject>

    Swift

    protocol MaplyTileLocalStorage : NSObjectProtocol
  • If a tile fetch request fails, this object allows you second change to provide the data. Maybe you have an old version in a cache somewhere. Provide that. Or fail and the tile fetch will continue to fail.

    See more

    Declaration

    Objective-C

    @protocol MaplyTileSecondChance <NSObject>

    Swift

    protocol MaplyTileSecondChance : NSObjectProtocol
  • Tile Info Protocol.

    This describes a single source of data tiles. A uses these to figure out what to load when and where. The loader passes the result of fetchInfoForTile to a MaplyTileFetcher to get the data it wants.

    See more

    Declaration

    Objective-C

    @protocol MaplyTileInfoNew <NSObject>

    Swift

    protocol MaplyTileInfoNew : NSObjectProtocol
  • Tile Fetcher protocol.

    The tile fetcher interacts with loaders that want tiles, as demanded by samplers. A given data source (e.g. remote URL, MBTiles) needs one of these to fetch and return data.

    See more

    Declaration

    Objective-C

    @protocol MaplyTileFetcher <NSObject>

    Swift

    protocol MaplyTileFetcher : NSObjectProtocol
  • Protocol for styling the vectors.

    You pass in an object which adheres to this protocol and will style the vectors read by a MaplyMapnikVectorTiles object. In general, this will be a parsed Mapnik vector file, but you can substitute your own logic as well.

    See more

    Declaration

    Objective-C

    @protocol MaplyVectorStyleDelegate <NSObject>

    Swift

    protocol MaplyVectorStyleDelegate : NSObjectProtocol
  • Base protocol for the vector styles.

    Maply Vector Style is the protocol the your vector style needs to implement for the vector tile parsers to recognize it.

    See more

    Declaration

    Objective-C

    @protocol MaplyVectorStyle <NSObject>

    Swift

    protocol MaplyVectorStyle : NSObjectProtocol
  • Fill in this protocol to provide images when individual markers/labels are clustered.

    This is the protocol for marker/label clustering. You must fill this in and register the cluster

    See more

    Declaration

    Objective-C

    @protocol MaplyClusterGenerator <NSObject>

    Swift

    protocol MaplyClusterGenerator : NSObjectProtocol