Skip to content
Tomáš Malý edited this page Dec 5, 2019 · 3 revisions

Map Callbacks

Callbacks are accessed as Map::callbacks.

Some callbacks are required: MapCallbacks::loadTexture, MapCallbacks::loadMesh, MapCallbacks::loadFont, MapCallbacks::loadGeodata. See rendering for more information on their usage.

All other callbacks are optional.

The MapCallbacks::mapconfigAvailable is the first one to be called. This is called immediately when the mapconfig is downloaded and successfully parsed, but before any other resources are requested. It is suitable place to change view or initial position. Moreover, SRS conversions are available now. It is called from inside Map::renderUpdate.

The MapCallbacks::mapconfigReady is called when all other parts of the map configuration (eg. virtual surface tileset mapping, bound layer snippets, etc.) are downloaded. At this point, the map is fully initialized and may start rendering (although, more resources will be needed for a complete render). It is called from inside Map::renderUpdate.

Clone this wiki locally