How to check for presence of the google earth plugin using JavaScript?

我的梦境 提交于 2019-12-12 05:38:44

问题


How can I determine whether the Google Earth Plugin is installed in the browser using JavaScript?


回答1:


You can use the isInstalled method:

google.load("earth", "1");
if(google.earth.isInstalled()) {
    //Installed!
}

However, note that if the plugin is not installed, the user will be automatically prompted to download it. So this is only really of use if you want to only display certain content to users who already have the plugin.



来源:https://stackoverflow.com/questions/10346751/how-to-check-for-presence-of-the-google-earth-plugin-using-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!