Maria GDK 5.0.0.753
Documentation of native code in develop branch
Loading...
Searching...
No Matches
MariaQt::MapDataManager Class Reference

#include <MQMapDataManager.h>

Public Member Functions

 MapDataManager (std::shared_ptr< STK::ShaderProgramManager > shaderManager, std::shared_ptr< STK::TextureManager > textureManager, std::shared_ptr< STK::FontManager > fontManager)
 
bool initialize (const Maria::MapDataConfig &mapConfig)
 Initialize the map engine. This method will scan for map and elevation data, and set up the geographical layers and elevation data. This method must be called successfully before any geographical data can be displayed.
 
void shutdown ()
 Shut down the map engine.
 
std::shared_ptr< Maria::MapTemplateManagermapTemplateManager () const
 Direct access to the map template manager. The map template manager contains all the available map templates that were found in the search paths during initializtion.
 
std::shared_ptr< Maria::TileCacheManagertileCacheManager () const
 
std::shared_ptr< Maria::SystemTickersystemTicker () const
 
std::shared_ptr< STK::FontManagerfontManager () const
 
std::shared_ptr< STK::TextureManagertextureManager () const
 
std::shared_ptr< STK::ShaderProgramManagershaderManager () const
 
std::shared_ptr< Maria::DrawObjectManagerdrawObjectManager () const
 Direct access to the draw object manager.
 
std::shared_ptr< Maria::ISymbolProvidersymbolProvider () const
 
std::shared_ptr< Maria::ElevationDataelevationData () const
 Direct access to the elevation data interface.
 
const Maria::MapTemplategetElevationTemplate () const
 
bool needsRedraw () const
 Check if any of the map data structures have been updated so that the map data layers should be refreshed.
 
bool frameCleanup ()
 Frame cache/rendering data cleanup.
 

Detailed Description

MapDataManager - Manages data sources for maps and elevation data that can be shared between different map widgets, both 2D and 3D.

Member Function Documentation

◆ frameCleanup()

bool MapDataManager::frameCleanup ( )

Frame cache/rendering data cleanup.

Should be called after each frame redraw to clean up tile caches and other transient data caches.

Returns
true if any data was cleaned. This can be used to clean up derived data structures, such as for example map tile render data.

◆ initialize()

bool MapDataManager::initialize ( const Maria::MapDataConfig mapConfig)

Initialize the map engine. This method will scan for map and elevation data, and set up the geographical layers and elevation data. This method must be called successfully before any geographical data can be displayed.

Parameters
searchPathA semicolon-separated list of directories in which to search for map data.
maxConcurrentTileReqsMaximum number of concurrent asynchronous tile requests to allow. Higher numbers mean faster loading, but too high may cause the display to stutter.
maxTileCacheSizeMaximum size of the tile data cache (in bytes). Keep this number high enough to include all the data needed for a full map screen with all layers, else you will get "thrashing" and poor performance due to tiles constantly being discarded and re-loaded.
Returns
True on success, false on failure. If the initialization failed, an error message is logged to the standard logging facilities.

◆ mapTemplateManager()

std::shared_ptr< Maria::MapTemplateManager > MariaQt::MapDataManager::mapTemplateManager ( ) const
inline

Direct access to the map template manager. The map template manager contains all the available map templates that were found in the search paths during initializtion.

Returns
The current map template manager, or nullptr if the map engine has not been initialized yet.

◆ needsRedraw()

bool MapDataManager::needsRedraw ( ) const

Check if any of the map data structures have been updated so that the map data layers should be refreshed.

Returns
True if any associated map renderers should be redrawn().

◆ shutdown()

void MapDataManager::shutdown ( )

Shut down the map engine.

This includes stopping any loading threads and cleaning up resources. Should be called before quitting the application.


The documentation for this class was generated from the following files: