1

I have a problem with Google Maps not showing when I click the "About" tab:

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>
duncan
  • 31,401
  • 13
  • 78
  • 99
Arun Pandey
  • 19
  • 1
  • 5
  • Google map example: https://jsfiddle.net/ps74h8sr/1/ https://developers.google.com/maps/documentation/javascript/examples/map-simple – lastboy Apr 18 '16 at 10:29
  • dear i have copy map from there but my problem is that when i try to use it on framework7 its not working go through link mentioned – Arun Pandey Apr 18 '16 at 10:47
  • I cannot see any effort from your code. There's no problem integrating google maps with framework 7. updated https://jsfiddle.net/ps74h8sr/2/ – lastboy Apr 18 '16 at 11:22
  • initMap function is undefined. – user5200704 Apr 20 '16 at 12:06

2 Answers2

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.

dhruv jadia
  • 1,684
  • 2
  • 15
  • 28
user3683675
  • 125
  • 10
0

Try adding event listener i.e.:

myApp.onPageInit('map', function(page) {
    document.addEventListener("deviceready", onDeviceReady, false);
    function onDeviceReady() { 
        [google maps js]
    }
}
Lukas C
  • 393
  • 1
  • 2
  • 15