mustardBees / cmb_field_map

Google Maps field type for Custom Metaboxes and Fields for WordPress
120 stars 49 forks source link

Google Map not shown correctly in Bootstrap modal #50

Closed rabillion closed 8 years ago

rabillion commented 8 years ago

i have a form inside a bootstrap modal to create posts from the frontend. The google map field works not correctly only inside the modal. The map is not displaying and autocomplete is also not working.

Any ideas?

google_map_modal

rabillion commented 8 years ago

i've solved it

$('.google-modal').on('shown.bs.modal', function () {
            google.maps.event.trigger(map, "resize");
});

autocomplete box

.pac-container {
    background-color: #FFF;
    z-index: 20;
    position: fixed;
    display: inline-block;
    float: left;
}

.modal {
    z-index: 20;
}

.modal-backdrop {
    z-index: 10;
}