I too faced this issue, I solved it by triggering the Google maps resize
event.
google.maps.event.trigger(map, 'resize');
Updates:
var map;
function initializeNewMap() {
// add your code
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
google.maps.event.trigger(map, 'resize');
}
Hope you understand.
Related Contents:
- Google Maps API v3: How to remove all markers?
- How can I check whether Google Maps is fully loaded?
- Google Maps API v3: InfoWindow not sizing correctly
- Google Maps: How to create a custom InfoWindow?
- Do I need to hide API key when using google maps js API? If so, how?
- Getting “Uncaught ReferenceError: google is not defined” error using Google Maps API
- Form the the table with json data
- Why is “element.innerHTML+=” bad code?
- How to get the raw value an field?
- How to use Checkbox inside Select Option
- Encode HTML entities in JavaScript
- HTML Script tag: type or language (or omit both)?
- OnChange event handler for radio button (INPUT type=”radio”) doesn’t work as one value
- Using HTML script tags to code while they have a source
- Change :hover CSS properties with JavaScript
- Capture key press (or keydown) event on DIV element
- Calling a JavaScript function in another js file
- How to read text file in JavaScript
- Disable Interpolation when Scaling a
- Pass a string parameter in an onclick function
- Google maps Places API V3 autocomplete – select first option on enter
- Prevent form redirect OR refresh on submit?
- How to add a element to the DOM and execute its code?
- Can I load an entire HTML document into a document fragment in Internet Explorer?
- Alternative for deprecated SVG pathSegList
- Node.js can’t create Blobs?
- Any way to clone HTML5 canvas element with its content?
- What is the best way to parse html in google apps script
- Drop-down box dependent on the option selected in another drop-down box
- Bootstrap 4 Dropdown Menu not working?
- Template does not update when using ui-router and ion-tabs
- Find all text nodes in HTML page [duplicate]
- Bootstrap 4 navbar not collapsing on large screen
- Is innerHTML asynchronous?
- How to check “checkbox” dynamically – jQuery Mobile
- DOMException: Failed to load because no supported source was found
- How do I put codes from jsfiddle.net into my website?
- jQuery – Sticky header that shrinks when scrolling down
- event.offsetX in Firefox
- contentDocument for an iframe
- converting a javascript string to a html object [duplicate]
- Change the style of :before and :after pseudo-elements? [duplicate]
- HTML5 Canvas set z-index
- Is there a way to get a element to link to a location without wrapping it in an
- How can I add multiple sources to an HTML5 audio tag, programmatically?
- Check if element is between 30% and 60% of the viewport
- HTML5 callbacks?
- Google maps API V3 method fitBounds()
- checked = “checked” vs checked = true
- how to save canvas data to file