onCountryPicked
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.
Usage:
// 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 ) {
console.log(selectedCountry);
console.log(relatedCountries);
}
CountryObject
CountryObject is a JSON object as defined below (the values of attribute varies):
{
ISOCode: "AU"
center: THREE.vector
lat: -27
lon: 133
name: "AUSTRALIA"
}
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 |
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论