Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Google Maps JavaScript API v3 Example: Map Simple&lt;/title&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"&gt; &lt;meta charset="utf-8"&gt; &lt;script src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;sensor=false"&gt;&lt;/script&gt; &lt;style&gt; #map_canvas { height: 200px; width: 400px; overflow: visible; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="map_canvas"&gt;&lt;/div&gt; &lt;script&gt; var myLatlng = new google.maps.LatLng(-34.397, 150.644); var mapOptions = { zoom: 8, center: myLatlng, mapTypeId: google.maps.MapTypeId.HYBRID }; var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>This works for me.</p> <p>There is a big difference between </p> <pre><code>var maptype = 'google.maps.MapTypeId.HYBRID'; var mapInitOpts = { mapTypeId: maptype }; </code></pre> <p>and</p> <pre><code>var mapInitOpts = { mapTypeId: google.maps.MapTypeId.HYBRID }; </code></pre> <p>In 1 instance you are asigning to mapTypeId the text 'google.maps.MapTypeId.HYBRID' and the other you are assigning to mapTypeId the value of the variable google.maps.MapTypeId.HYBRID.</p> <p>For your example to work you should at least put</p> <pre><code>var maptype = google.maps.MapTypeId.HYBRID; </code></pre> <p>not </p> <pre><code>var maptype = 'google.maps.MapTypeId.HYBRID'; </code></pre> <p>Also I cannot make my example to work without zoom: and center: . Those might be required.</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.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      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