1

当我点击“关于”标签时,我遇到了 Google 地图不显示的问题:

http://paybulls.com/dist/

 <div id="map" style="height:400px; width:400px;"></div>

 <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&    amp;sensor=false&libraries=places"></script>
<script>
  var map = new google.maps.Map(document.getElementById('map'), {
    center: {lat: -34.397, lng: 150.644},
    zoom: 8
  });
</script>
4

2 回答 2

4

I had the same problem a few months ago when using framework7 and could not fix it.

I instead used this https://hpneo.github.io/gmaps/ which is basically google maps wrapped up into a easier to use library.

It worked like a charm.

于 2016-05-25T12:12:50.977 回答
0

尝试添加事件监听器,即:

myApp.onPageInit('map', function(page) {
    document.addEventListener("deviceready", onDeviceReady, false);
    function onDeviceReady() { 
        [google maps js]
    }
}
于 2018-02-16T10:48:47.753 回答