-
Generic Event type used to notify an
See moreobserver
.Declaration
Objective-C
@interface MBMEvent : NSObject
Swift
class Event : NSObject
-
List of supported event types by the
map
andmap snapshotter
objects, and event data format specification for each event.
See moreSimplified 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 │ │ │ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ │ │ │ │
Declaration
Objective-C
@interface MBMMapEvents : NSObject
Swift
class MapEvents : NSObject
-
The
See moreobservable
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.Declaration
Objective-C
@interface MBMObservable : NSObject
Swift
class Observable : NSObject
-
An
See moreobserver
interface used to subscribe for anobservable
events.Declaration
Objective-C
@protocol MBMObserver
Swift
protocol Observer