Search code examples
google-mapsgoogle-maps-api-3google-maps-api-2

Google Maps Sensor is specified yet still asking to require to select true of false


Hey eveyrone currently i have gotten a Google Maps key with the url http://localhost/

that went through fine but i get an error stating that i need to select a true or false sensor. i haev already chosen one and used it. tried both true and false. here is my code

<!DOCTYPE html>
<html>
<head>
<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="http://maps.googleapis.com/maps/api/js?key=API_KEY_IS_SPECIFIED_JUST_REMOVED_FOR_THIS_QUESTION&sensor=FALSE">
</script>
<script type="text/javascript">
  function initialize() {
    var latlng = new google.maps.LatLng(-34.397, 150.644);
    var myOptions = {
      zoom: 8,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("map_canvas"),
        myOptions);
  }

</script>
</head>
<body onload="initialize()">
  <div id="map_canvas" style="width:100%; height:100%"></div>
</body>
</html>

Solution

  • Maybe it's case sensitive (always assume things are unless you know otherwise). Try false instead of FALSE.