Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I keep getting the error trying to load googlemaps?

I am trying to migrate from v2 to v3 in google maps API and I keep getting this error: The Google Maps API server rejected your request. The "sensor" parameter specified in the request must be set to either "true" or "false".

Here is the tutorial I am using: https://developers.google.com/maps/documentation/javascript/tutorial

In the javascript I have changed src to

<script type="text/javascript"
  src="http://maps.googleapis.com/maps/api/js?key=AIzaSyDzGdafsdfdfgoO4cHbfRGL8W23dgfafJKnA&sensor=TRUE">
</script>

but I keep getting the following error: The Google Maps API server rejected your request. The "sensor" parameter specified in the request must be set to either "true" or "false".

What does the error mean and how can I fix it?

like image 421
Stagleton Avatar asked Jul 31 '26 16:07

Stagleton


1 Answers

Use: sensor=true instead of sensor=TRUE

It is case-sensitive.

like image 138
stewe Avatar answered Aug 03 '26 07:08

stewe