javascript - Google Maps - 2 maps on the same page not working -
i need have 2 google maps on same page. however, reason, first map seems displayed. i've tried this topic without success, problem persists. my code looks this function initialize() { var mylatlng = new google.maps.latlng(41.560655,-8.386545); var mylatlng2 = new google.maps.latlng(41.560655,-8.386545); var mapoptions = { zoom: 5, center: mylatlng, maptypeid: google.maps.maptypeid.roadmap } var mapoptions2 = { zoom: 8, center: mylatlng2, maptypeid: google.maps.maptypeid.roadmap } var map = new google.maps.map(document.getelementbyid('map-canvas'), mapoptions); var map2 = new google.maps.map(document.getelementbyid('room-canvas'), mapoptions2); } and html <div class="g_12"> <div class="widget_header">...