Getting Start
Gio.js 2.0
Basic Elements
Object Design API
Color and Style API
Working with Data
Dependence Interface
Advanced Feature
Fired when selected country changes.
Pass two objects: selectedCountry and relatedCountries. Selected country is an country object for new selected country, relatedCountries are country objects for countries related to new selected country.
// use the onCountryPicked() to set callback when clicked country changed
controller.onCountryPicked( callback );

// defined a callback function, as a demo, this function simply output selectedCountry, relatedCountries which are passed parameters into console
function callback ( selectedCountry, relatedCountries ) {



CountryObject is a JSON object as defined below (the values of attribute varies):
        ISOCode: "AU"
        center: THREE.vector
        lat: -27
        lon: 133
        name: "AUSTRALIA"
Table of CountryObject parameters:
Parameter Description
ISOCode ISO code of country
center THREE.vector object in the scene of country
lat latitude of country
lon longitude of country
name country name