街景占位符在这里,但街景小人不见了

Streetview placeholder is here, but Pegman is missing

我已经整合了 googlemaps api 但是街景小白方块(右下角)中缺少街景小人

我注意到一些 div 在 googlemaps 代码中包含街景小人图标的高度和宽度等于 0px 我该怎么做才能解决这个问题?

这是我调用和启动地图的示例

  <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=API_KEY"></script>

这是我的地图组件:

<div class="map-box" id="map" #map></div>

与 css.js 看起来像

.map-box {
    height: 100%;
    width: 100%;
}

以及我是如何创建它的:

    var ownPos = {lat: -4.85, lng: 2.35};
    this.mapDisplay = new google.maps.Map(document.getElementById('map'), {zoom: 4, center: ownPos, streetViewControl: true});

包装器高度的修复解决了同样的错误

agm-map {
  height: 425px;
  & /deep/ .gm-svpc { //dispayed pegman's icon on map
    div {
      height: 40px;
    }
  }
}

我遇到了同样的问题并通过 CSS:

解决了
/* Force position to show pegman */
.gm-svpc div img {
    position: relative !important;
}
 /* there are actually two `<div>`s, with the 2nd one actually holding the symbol */
.gm-svpc > div:last-of-type {
  /* same dimensions as symbol child element */
  width: 32px;
  height: 32px;
}