Show Map on bootstrap modal

倾然丶 夕夏残阳落幕 提交于 2019-12-25 05:18:23

问题


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:


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.



来源:https://stackoverflow.com/questions/43401812/show-map-on-bootstrap-modal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!