skip to Main Content

Loading/Saving Data

Often you will need to modify data in runtime and need to store those modifications somewhere.

The API provides you the following methods to get / set geodata information on the fly.

Check demo scene “15 Custom Attributes” for an example about storing/reading custom country attributes.

When using Set**GeoData methods, call Redraw() to update the representation.

Countries

  • GetCountryGeoData(): returns all country geodata information in a packed string with same format as the geodata files.
  • SetCountryGeoData(string s): sets the country geodata from a packed string.
  • GetCountriesAttributes(): returns all custom attributes of all countries.
  • SetCountriesAttributes(string s): sets all countries attributes.

Provinces

  • GetProvinceGeoData() / SetProvincesGeoData(): similar to above methods for countries, but for provinces: gets / sets provines geodata.
  • GetProvincesAttributes() / SetProvincesAttributes(string s): gets / sets all custom attributes of all provinces.

Cities

  • GetCitiesGeoData() / SetCitiesGeoData(string s): same for cities.
  • GetCitiesAttributes() / SetCitiesAttributes(string s): gets / sets cities attributes.

Mount Points

  • GetMountPointsGeoData() / SetMountPointsGeoData(): same for mount points.
  • GetMountPointsAttributes() / SetMountPointsAttributes(string s): gets / sets mount points attributes.
Back To Top