VisioMove SDK (Android)  2.1.22
 All Classes Functions Variables Pages
VgIDatabase Class Reference

Public Member Functions

boolean loadConfiguration (String pConfigFilename, long pSecretKey, String pLicenseGeneratorURL)
 
boolean loadConfiguration (String pConfigFilename, long pSecretKey)
 
void unloadConfiguration ()
 
boolean getCachedLicenseFilenameForConfiguration (String pConfigFilename, java.lang.String[] pOutLicenseFilename)
 
boolean selectDataset (String pDatasetName)
 
boolean selectDataset (int pIndex)
 
VgIDatabaseDatasetDescriptor getCurrentDatasetDescriptor ()
 
VgIDatabaseDatasetDescriptorVector getDatasetDescriptors ()
 

Detailed Description

The VgIDatabase interface is used to load and select the data that will be displayed in the 3D view.

This interface depends on how databases are bundled. First, the data structure, with all available datasets, is described in a configuration file. This file must be loaded (using the VgIDatabase::loadConfiguration method), then a particular dataset can be selected to be displayed in the 3D view (using the VgIDatabase::selectDataset method).

Example:

...
editEngine()->editDatabase()->loadConfiguration("vg_config.xml", 0, "http://license.visioglobe.com/renew/secret-string-to-retrieve-my-license");
...
if (pUserSelectedWashington) {
editEngine()->editDatabase()->selectDataset("Washington");
} else if (pUserSelectedParis) {
editEngine()->editDatabase()->selectDataset("Paris");
}
editEngine()->editDatabase()->getCurrentDatasetDescriptor();
...

Member Function Documentation

boolean VgIDatabase.getCachedLicenseFilenameForConfiguration ( String  pConfigFilename,
java.lang.String[]  pOutLicenseFilename 
)

returns the name of the cached license path for a given configuration filename.

Remarks
this function is used to cleanup after removing a locally stored map.
Parameters
pConfigFilenamepath to vg_config file. must be an absolute filename
pOutLicenseFilenamereference to a string, will receive the license file path if there is one.
Returns
true if a cached license exists for the given configuration, in which case it fills the pOutLicenseFilename parameter.
VgIDatabaseDatasetDescriptor VgIDatabase.getCurrentDatasetDescriptor ( )

Retrieves the descriptor of the current dataset.

Returns
Descriptor of the currently loaded dataset. If there isn't a valid current database dataset descriptor, then NULL will be returned.
VgIDatabaseDatasetDescriptorVector VgIDatabase.getDatasetDescriptors ( )

Retrieves the vector of all available datasets.

Returns
Vector of descriptors for all available datasets.
boolean VgIDatabase.loadConfiguration ( String  pConfigFilename,
long  pSecretKey,
String  pLicenseGeneratorURL 
)

Loads a database configuration from a mass storage.

Remarks
If loadConfiguration() returns false, the VgIEngine::getLastError() and VgIEngine::getErrorString() can be used in conjunction to find the reason.
If loadConfiguration() needs to update the license file from the network it will create a cached license. This filename can be retrieved with bool getCachedLicenseFilenameForConfiguration()
Parameters
pConfigFilenameThe path of the configuration file to be loaded. This parameter may be either an abosolute path or (on iOS only) it may be a path relative to the application directory: {APPLICATIONS_DIRECTORY}/{GUID_DIRECTORY}/{NAME_OF_APP}.app/
pSecretKeyThe secret key that matches the secret key that was used to generate the associated licence xml file's hash code.
pLicenseGeneratorURLThe URL that will be reached to get the license if missing.
Returns
true if the configuration file was loaded successfully, otherwise false.
boolean VgIDatabase.loadConfiguration ( String  pConfigFilename,
long  pSecretKey 
)
boolean VgIDatabase.selectDataset ( String  pDatasetName)

Selects a dataset using its name. Visual data will be rendered on the view during the preceding display.

Parameters
pDatasetNameThe name of the dataset. Needs to match the name of a dataset defined within the currently loaded configuration file.
Returns
true if a new dataset was loaded, otherwise false. In case of failure, the previous dataset remains active.
boolean VgIDatabase.selectDataset ( int  pIndex)

Selects a dataset using its index. Visual data will be rendered on the view during the preceding display.

Parameters
pIndexIndex of dataset, indicated by it's position relative to other datasets within the configuration file (starting at 0).
Returns
true if a new dataset was loaded, otherwise false. In case of failure, the previous dataset is still active.
void VgIDatabase.unloadConfiguration ( )

unloads the current configuration if there is one. It releases the resources and stops any threads created

Version
2.0.7865

The documentation for this class was generated from the following file:
VisioMove 2.1.22, Visioglobe® 2016