如何在离子卡中添加Google地图?

时间:2019-03-05 06:07:54

标签: typescript ionic-framework

我试图在离子卡中添加Google地图,但该地图没有显示。如果它不在离子卡中,则该图会显示出来。你能帮忙吗?

HTML:

</ion-content>
  <ion-card class="transparent-card">
    <div #map id="map"></div>
  </ion-card> 
</ion-content>

SCSS:

ion-card {
  position: relative;
  text-align: left;
}

.card-title {
  position: absolute;
  top: 36%;
  font-size: 2.0em;
  width: 100%;
  font-weight: bold;
  color: #fff;
}

.card-subtitle {
  font-size: 1.0em;
  position: absolute;
  top: 52%;
  width: 100%;
  color: #fff;
}

.transparent-card{
    background-color: transparent;
}

#map{
  height: 100%;
  width: 100%;
}

1 个答案:

答案 0 :(得分:1)

您可以尝试一下!。

How many glasses are on the tab ?
What does the sign say ?
Has the pizza been baked ?
Do you think the boy on the ground has broken legs ?
Is this man crying ?
How many pickles are on the plate ?
What is the shape of the plate?
…