• Generic Event type used to notify an observer.

    See more

    Declaration

    Objective-C

    
    @interface MBMEvent : NSObject

    Swift

    class Event : NSObject
  • List of supported event types by the map and map snapshotter objects, and event data format specification for each event.

     Simplified diagram for events emitted by the map object.
    
     ┌─────────────┐               ┌─────────┐                   ┌──────────────┐
     │ Application │               │   Map   │                   │ResourceLoader│
     └──────┬──────┘               └────┬────┘                   └───────┬──────┘
            │                           │                                │
            ├───────setStyleURI────────▶│                                │
            │                           ├───────────get style───────────▶│
            │                           │                                │
            │                           │◀─────────style data────────────┤
            │                           │                                │
            │                           ├─parse style─┐                  │
            │                           │             │                  │
            │      StyleDataLoaded      ◀─────────────┘                  │
            │◀────{"type": "style"}─────┤                                │
            │                           ├─────────get sprite────────────▶│
            │                           │                                │
            │                           │◀────────sprite data────────────┤
            │                           │                                │
            │                           ├──────parse sprite───────┐      │
            │                           │                         │      │
            │      StyleDataLoaded      ◀─────────────────────────┘      │
            │◀───{"type": "sprite"}─────┤                                │
            │                           ├─────get source TileJSON(s)────▶│
            │                           │                                │
            │     SourceDataLoaded      │◀─────parse TileJSON data───────┤
            │◀──{"type": "metadata"}────┤                                │
            │                           │                                │
            │                           │                                │
            │      StyleDataLoaded      │                                │
            │◀───{"type": "sources"}────┤                                │
            │                           ├──────────get tiles────────────▶│
            │                           │                                │
            │◀───────StyleLoaded────────┤                                │
            │                           │                                │
            │     SourceDataLoaded      │◀─────────tile data─────────────┤
            │◀────{"type": "tile"}──────┤                                │
            │                           │                                │
            │                           │                                │
            │◀────RenderFrameStarted────┤                                │
            │                           ├─────render─────┐               │
            │                           │                │               │
            │                           ◀────────────────┘               │
            │◀───RenderFrameFinished────┤                                │
            │                           ├──render, all tiles loaded──┐   │
            │                           │                            │   │
            │                           ◀────────────────────────────┘   │
            │◀────────MapLoaded─────────┤                                │
            │                           │                                │
            │                           │                                │
            │◀─────────MapIdle──────────┤                                │
            │                    ┌ ─── ─┴─ ─── ┐                         │
            │                    │   offline   │                         │
            │                    └ ─── ─┬─ ─── ┘                         │
            │                           │                                │
            ├─────────setCamera────────▶│                                │
            │                           ├───────────get tiles───────────▶│
            │                           │                                │
            │                           │┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─   │
            │◀─────────MapIdle──────────┤   waiting for connectivity  │  │
            │                           ││  Map renders cached data      │
            │                           │ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘  │
            │                           │                                │
    
    See more

    Declaration

    Objective-C

    
    @interface MBMMapEvents : NSObject

    Swift

    class MapEvents : NSObject
  • The observable interface provides basic Publish&Subscribe functionality. Classes that extend this functionality and capable of generating events, have to specify event types and corresponding data format for an event.

    See more

    Declaration

    Objective-C

    
    @interface MBMObservable : NSObject

    Swift

    class Observable : NSObject
  • An observer interface used to subscribe for an observable events.

    See more

    Declaration

    Objective-C

    @protocol MBMObserver

    Swift

    protocol Observer