Show Map on bootstrap modal

2019-09-14 10:42发布

I want to show a new google map on a bootstrap modal but it doesnt seem to work. please help

$scope.show = function (lat, long) {
        $('#body').append('<div id="map"></div>')
        enter code here$scope.newMap=new google.maps.Map(document.getElementById('map'), {
            zoom: 14,
            center: {lat: 37.77, lng: -122.447},
            mapTypeId:'roadmap'
        });

1条回答
仙女界的扛把子
2楼-- · 2019-09-14 11:31

Not my code but here's a working example of what you want - plnkr

This example uses the module 'ngMap' which has the directive 'map', For more you can see the ngMap home page.

查看更多
登录 后发表回答