Neseek77 / gwt-google-apis

Automatically exported from code.google.com/p/gwt-google-apis
1 stars 1 forks source link

Google Maps API server is rejecting request when invoking: Maps.loadMapsApi(resolveMapsApiKey(), "3", false, myRunner) #462

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Found in Release:
gwt-maps-1.0.4.jar
and also in current revision (1883) of svn:
http://code.google.com/p/gwt-google-apis/source/browse/trunk/maps/maps/src/com/g
oogle/gwt/maps/client/Maps.java?r=1883#106

Detailed description:
Maps.loadMapsApi() is implemented so, that parameter sensor is present in 
request only if has value true. But documentation 
(http://code.google.com/apis/maps/documentation/javascript/basics.html#Specifyin
gSensor) says:
  "Note that even if your device does not use a sensing device, you must still pass this parameter, setting its value to false."

And when I invoke Maps.loadMapsApi(resolveMapsApiKey(), "3", false, myRunner), 
I've got alert message:
  The Google Maps API server rejected your request. The "sensor" parameter specified in the request must be set to either "true" or "false".

Workaround if you have one:
 //use and prepare optional parameter AjaxLoaderOptions:
 AjaxLoaderOptions settings = AjaxLoaderOptions.newInstance();
 settings.setOtherParms("sensor=false");
 Maps.loadMapsApi(resolveMapsApiKey(), "3", false, settings, myRunner);

Links to the relevant GWT Developer Forum posts:

Original issue reported on code.google.com by milan.sk...@gmail.com on 21 Apr 2011 at 9:20

Attachments:

GoogleCodeExporter commented 9 years ago
The GWT Maps API bindings you are using are not compatible with the Maps v3 API.

Original comment by zundel@google.com on 21 Apr 2011 at 1:26

GoogleCodeExporter commented 9 years ago
Using gwt-maps-1.1.1.jar, I'm still getting this error.  My API key is 
provisioned for both Maps v2 and v3, but I will get an error when attempting to 
call Maps.loadMapsApi with version = "3" (with any combination of 
sensor=true/false via AjaxLoaderOptions or not).  I even tried turning off my 
API key's access to v2, to no avail.

Original comment by blue.tho...@gmail.com on 10 Jul 2012 at 7:35