I have been coding up some map functionality. In the last few days, I have been restricted from making calls to my browsers navigator.geolocation.getCurrentPosition. I am not sure why, but when I run the following code:
navigator.geolocation.getCurrentPosition(
function(){
console.log("success",arguments);
},function(){
console.log("fail",arguments);
}
);
I get the following error:
fail {"code":2,"message":"Network location provider at 'https://maps.googleapis.com/maps/api/browserlocation/json?browser=chromium&sensor=true&wifi=mac%3A00-24-aBunchOfCrapAboutMyNetworkingMacIDStuff' : Response was malformed."}
Can anyone tell me what this means? This response is the response that Chromium gives me. Firefox gives me something different when I run the same code:
fail [
0:GeoPositionError{
"PERMISSION_DENIED":1,
"POSITION_UNAVAILABLE":2,
"TIMEOUT":3,
"code":2
}
]
Any ideas? Am I simply hitting their API too much that they are rejecting my mac address? Or is there something else that someone can think of. I have uninstalled my browsers and tried again. I created a new user profile on my machine and tried it with that, and it failed. I swapped my harddrive into another identical machine, and it still failed. I have no idea why it is failing, but it was working yesterday. Let me know.
I have exactly the same issue. But it’s not yet recovered after few hours. The situation did not change ater I insert the Google API key. I’ve check the quote page and my account has not reach the daily quote.
Found out the reason. Google recently start enforcing the use of googleapi key. You can no longer access the service if you do not supply the key to access geolocation. The daily quote is also enforced. The key addition will not take effect until after more than few hours (one day in my case).
Details:
This call will work in the past:
http://maps.google.com/maps/api/js?sensor=true
Now you need to do this:
http://maps.google.com/maps/api/js?key=&sensor=true