Kronnect

General => Developer's Corner => Topic started by: aberbery on September 09, 2021, 07:52:00 PM

Title: Question Regarding Partial Map Load/Render
Post by: aberbery on September 09, 2021, 07:52:00 PM
Hi,

Recently I purchased World Map Strategy kit 2. I was wondering if its possible to render only part of map. For example only USA with provinces? Something like in states.io android game.
(https://play-lh.googleusercontent.com/OCtQ7fl6Amy0_RVdNZLLqg2pxLm4Q23gmoTBnBtiEECv5vBAnqRq6RNAkyWOpnLBkw=w1920-h955)
Title: Re: Question Regarding Partial Map Load/Render
Post by: Kronnect on September 09, 2021, 10:29:21 PM
Hello,

There're a few ways to restrict the world map to an area:

1.- If you're using the viewport mode, you can specify the rectangle constraint for interaction. The map will still load completely but the user can only zoom/pan inside that location. The rectangle can be set in the inspector:
(https://i.imgur.com/qBEKro5l.png)

2.- Another way (or in addition to 1), you could remove any other map data from the geodata set by using the Map Editor. Open it and select any country from any other continent and click the button "Delete Continent". That wil get rid of all countries, provinces and cities of that continent. Repeat and also delete specific countries until you have only USA. Then remember to Save the changes. Check the documentation for more info about the Map Editor.

Regards

Title: Re: Question Regarding Partial Map Load/Render
Post by: aberbery on September 10, 2021, 01:30:39 PM
Hi Kronnect,

Thanks for quick reply.
I was not able to "Voxel Play Environment" Script. Do I miss something or I need another package?
Title: Re: Question Regarding Partial Map Load/Render
Post by: Kronnect on September 10, 2021, 02:15:06 PM
Sorry, I attached the wrong screenshot. I've updated it accordingly.
Title: Re: Question Regarding Partial Map Load/Render
Post by: aberbery on September 10, 2021, 03:41:10 PM
Thanks, that helps.