andy
andy

Reputation: 2081

Google Maps V3 Rejecting My request

AM trying to load google maps in the browser it keeps saying that

The Google Maps API server rejected your request. The "sensor" parameter specified in the request must be set to either "true" or "false".

What could be possibly wrong with my code?

 <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <style type="text/css">
      html { height: 100% }
      body { height: 100%; margin: 0; padding: 0 }
      #map-canvas { height: 100% }
    </style>

    <script type="text/javascript" 
    src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDHlCzPPFeUds2erogWbvRZreRC3PX-BJE&sensor=FALSE">
    </script>

      <script type="text/javascript">
      function initialize() {
        var mapOptions = {
          center: new google.maps.LatLng(-34.397, 150.644),
          zoom: 8,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        };
        var map = new google.maps.Map(document.getElementById("map-canvas"),
            mapOptions);
      }
      google.maps.event.addDomListener(window, 'load', initialize);
    </script>

</head>
<body>
<div id="map-canvas">

</div>

</body>
</html>

Upvotes: 1

Views: 149

Answers (1)

SoWhat
SoWhat

Reputation: 5622

I am going on a limb here, but have you tried changing it to https://maps.googleapis.com/maps/api/js?key=AIzaSyDHlCzPPFeUds2erogWbvRZreRC3PX-BJE&sensor=false<-- small case

Upvotes: 1

Related Questions