简体   繁体   English

如何在Phonegap中启动初始屏幕时加载索引页面

[英]How to load index page while splash screen loading in phonegap

I'm implementing app in phonegap. 我在phonegap中实现应用程序。 I'm using google map service in my application. 我在应用程序中使用了谷歌地图服务。

google map api script included in my index page. 我的索引页面中包含的Google Map API脚本。 when network slow, at the time showing white screen for 5 sec after splash screen. 当网络缓慢时,在启动屏幕后显示白色屏幕5秒钟。 because of problem with loading map api script. 由于加载地图API脚本时出现问题。

I tried to remove white screen in all possible ways but not possible, my requirement is, while splash screen loading i need to load index page. 我试图以所有可能的方式删除白屏,但不可能,我的要求是,在启动屏幕加载时,我需要加载索引页面。 after splash screen without white screen,open the main page. 闪屏无白屏后,打开主页。

I included map api in indea file bellow way 我将地图API包含在indea文件的下面

<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?libraries=places&sensor=false"></script>

config file for showing splash screen 用于显示启动画面的配置文件

 <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="5000" />

I'm using cordova 3.6.3 version. 我正在使用cordova 3.6.3版本。

Consider using Google Maps API plugin. 考虑使用Google Maps API插件。 https://github.com/wf9a5m75/phonegap-googlemaps-plugin https://github.com/wf9a5m75/phonegap-googlemaps-plugin

Sometimes is hard to configure, but I think it will resolve your problem. 有时很难配置,但是我认为它将解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM