title: Google Maps hide controls on small screens
body: <p>I want to hide Google Maps controls on small screens. By default Google Maps hides them at 320px width i think, but i need them to hide on bigger width, around 400px. <a href="https://stackoverflow.com/questions/34105189/hide-google-maps-controls-on-small-screens-mobiles-etc">Here is one working example</a>, but i am using different code so it is not working, i just get syntax errors. Here is my code:</p>
  
  <pre><code>var map = new google.maps.Map(document.getElementById('map-canvas'), {
       center: {
         lat: 52.00,
         lng: 10.00
       },
       zoom: 4,
        zoomControlOptions: {
                position: google.maps.ControlPosition.LEFT_TOP
            },
          mapTypeControl: true,
          mapTypeControlOptions: {
                position: google.maps.ControlPosition.TOP_RIGHT
            }
     });
  </code></pre>
  
  <p>This is code which captures width and disables controls, and it works with most Google Maps codes, but not with my...</p>
  
  <pre><code>$(window).width()       
  var width = window.innerWidth;
   if(width &lt; 400){
              mapOptions.mapTypeControl = false;
              mapTypeControl: false
              disableDefaultUI: true
              delete mapOptions.mapTypeControlOptions;
          }
  </code></pre>
  
  <p>Please show me how to combine these two codes so they work, i tryed doing something on my own, but im just getting syntax errors.</p>