addGeoDataFile()

The function adds offline map material into the Maps Widget.

Synopsis

string addGeoDataFile(string filePath)

Parameter

Parameter Description
filePath Path to the offline file

Description

The function adds the offline map material located in the stated path to the Maps Widget. Please note that map files with more than 300MB cannot be loaded.

If the file has been loaded successfully the event geoDataFileAdded of the Widget is triggered.

If addGeoDataFile() is used when the specified file is already loaded, the file is removed and reloaded again.

addGeoDataFile() returns the absolute path of the offline map file under which it is saved in the Maps Widget. This exact path must be used to remove the offline map file with removeGeoDataFile().

For distributing the offline map material to all clients the corresponding path must be available for download from the HTTP server. For this the getPath() function can be used, e.g.

Maps_ewo1.addGeoDataFile(getPath(DATA_REL_PATH, "maps/eisenstadt.osm"));

Assignment

Maps Widget

See also

-