Javascript 谷歌地图没有';我不会出现在一个房间里
我一直在通过以下方式将谷歌地图集成到我的爱奥尼亚应用程序中 本教程。我已经将地图整合到一个没有问题的视图中,并且它正在检测位置。但是当我尝试将贴图添加到一个模态中时,我得到的是一个没有贴图的空白模态 我已经检查过了,当我在加载HTML模板之后加载地图时,我认为这不会有什么帮助 这是我的模态代码,包括mapJavascript 谷歌地图没有';我不会出现在一个房间里,javascript,angularjs,twitter-bootstrap,ionic-framework,cordova-plugins,Javascript,Angularjs,Twitter Bootstrap,Ionic Framework,Cordova Plugins,我一直在通过以下方式将谷歌地图集成到我的爱奥尼亚应用程序中 本教程。我已经将地图整合到一个没有问题的视图中,并且它正在检测位置。但是当我尝试将贴图添加到一个模态中时,我得到的是一个没有贴图的空白模态 我已经检查过了,当我在加载HTML模板之后加载地图时,我认为这不会有什么帮助 这是我的模态代码,包括map <script id="location.html" type="text/ng-template"> <ion-modal-view> &
<script id="location.html" type="text/ng-template">
<ion-modal-view>
<ion-content>
<div>
<div id="map" data-tap-disabled="true"></div>
</div>
<button class="button button-block button-dark " ng-click="closeModal()"> Close</button>
</ion-content>
</ion-modal-view>
</script>
当我打开模型时,我没有得到任何错误。只需通过关闭按钮(我已经包含在模式中)获取模式
地图没有加载到模式中的原因可能是什么。我做错了什么?有人能帮我吗?添加以下CSS规则:
ion-app._gmaps_cdv_ .ion-page:not(._gmaps_cdv_),
ion-app._gmaps_cdv_ ion-modal:not(._gmaps_cdv_) {
display: none;
}
在模态分量中:
ionViewWillLeave() {
const nodeList = document.querySelectorAll('._gmaps_cdv_');
for (let k = 0; k < nodeList.length; ++k) {
nodeList.item(k).classList.remove('_gmaps_cdv_');
}
}
ionViewWillLeave(){
const nodeList=document.queryselectoral('.\u gmaps\u cdv');
for(设k=0;k
添加以下CSS规则:
ion-app._gmaps_cdv_ .ion-page:not(._gmaps_cdv_),
ion-app._gmaps_cdv_ ion-modal:not(._gmaps_cdv_) {
display: none;
}
在模态分量中:
ionViewWillLeave() {
const nodeList = document.querySelectorAll('._gmaps_cdv_');
for (let k = 0; k < nodeList.length; ++k) {
nodeList.item(k).classList.remove('_gmaps_cdv_');
}
}
ionViewWillLeave(){
const nodeList=document.queryselectoral('.\u gmaps\u cdv');
for(设k=0;k
我猜地图在模态之外工作?昨天,我在谷歌地图上也遇到了类似的情况(虽然不是在模态中,但它不会显示出来——只是有一个空白)。看看这是否有帮助我猜地图在模态之外工作?昨天,我在谷歌地图上也遇到了类似的情况(虽然不是在模态中,但它不会显示出来——只是有一个空白)。看看这是否有帮助