Note that there are some explanatory texts on larger screens.

plurals
  1. POImproper google map display
    primarykey
    data
    text
    <p>I'm creating a view with a google map in it when a certain click from a li element event is triggered. For the first time the map is shown ok. And the result is this:</p> <p><img src="https://i.stack.imgur.com/91APP.png" alt="enter image description here"> <em><a href="http://postimg.org/image/eolnn0411/" rel="nofollow noreferrer">http://postimg.org/image/eolnn0411/</a></em></p> <p>but when I click in another li element to create a new map it is shown like this:</p> <p><img src="https://i.stack.imgur.com/bFUGi.png" alt="enter image description here"> <em><a href="http://postimg.org/image/576um203l/" rel="nofollow noreferrer">http://postimg.org/image/576um203l/</a></em></p> <p>I've noticed a strange behavior that if I resize the browser window the map turns to display ok after that.</p> <p>I'm using the following code:</p> <pre><code>var latlng = new google.maps.LatLng(coordinates[0], coordinates[1]); var myOptions = { zoom: 16, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map; map = new google.maps.Map(node, myOptions); var marker = new google.maps.Marker({ map: map, position: latlng }); </code></pre> <p>Edit: Related posts <a href="https://stackoverflow.com/questions/6642788/how-do-i-add-a-google-map-to-a-dojox-mobile-view">here</a>, and <a href="https://stackoverflow.com/questions/10598680/google-maps-on-dojox-mobile-view">here</a>.</p> <p>Edit 2: By using the workaround of using setInterval() works sometimes. SO it seems that the problem is the map not being ready for the event.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload