Author Topic: Borders change over time - howto  (Read 23 times)

Hoisann

  • Newbie
  • *
  • Posts: 3
    • View Profile
Borders change over time - howto
« on: October 11, 2021, 04:23:58 PM »
Hi!

If i wanted to create many (say 100) different arrangements of world borders, and thus enable animation of borders over time (years), what is the best way to go about this here? Would i have to manually rearrange borders and create 100 geodata country files? any tips appreciated.


Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
    • View Profile
Re: Borders change over time - howto
« Reply #1 on: October 11, 2021, 06:11:06 PM »
Do you need to morph/animate the polygon-based frontiers or just the world texture?
Are you referring to the globe asset or world map strategy kit?

Hoisann

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Borders change over time - howto
« Reply #2 on: October 12, 2021, 10:30:36 AM »
This is the globe i'm working on. No need to animate the changes, really, although that might be nice addition later on. For now, primarily looking for an efficient way to manage a large number of border variations.

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
    • View Profile
Re: Borders change over time - howto
« Reply #3 on: October 12, 2021, 08:31:06 PM »
Hi!

The asset uses a public field called geodataResourcesPath which defaults to "Geodata" as the folder where the geographic data is stored.
You can store the different maps in subfolders inside the Resources folder, ie "Geodata1", "Geodata2", etc. and load the desired map using:

Code
map.geodataResourcesPath = "Geodata1";
map.ReloadData();

Alternatively, you can also load specific geodata files directly from a string (ie. if you download it from somewhere else and you have a string to pass) using:
map.SetCountriesGeoData(countriesData);
map.SetCountriesAttributes(countriesAttributesData); // optional
...

Same for provinces, cities and mount points but using SetProvincesGeoData(..) etc
...
and update the rendering using map.Redraw(true);


Hoisann

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Borders change over time - howto
« Reply #4 on: October 14, 2021, 11:14:30 AM »
thanks!