Saturday, March 31, 2012

call google places service error:invalid label:“html_attributions”

This question has been asked here(and several other places): google
places api error with jquery ajax call... html_attributions same as his
case,I can see response coming back fine in firbug's json tab,and
difference is I do add "callback",but still I got this error,this is my

public native static void getJson(int requestId, AroundInfoHandler
handler) /*-{
var callback = "callback" + requestId;
// [1] Create a script element.
var script = document.createElement("script");
script.setAttribute("type", "text/javascript");

// [2] Define the callback function on the window object.
window[callback] = function(jsonObj) {
// [3]
console.log("Succeed to call google places service");
//call java method here
window[callback + "done"] = true;

// [4] JSON download has 1-second timeout.
setTimeout(function() {
if (!window[callback + "done"]) {
console.log("Failed to call google places service");
//call java method here;

// [5] Cleanup. Remove script and callback elements.
delete window[callback];
delete window[callback + "done"];
}, 1000);

// [6] Attach the script element to the document body.
Even change window/document to $wnd/$doc,same problem as before,Can
anybody help me?Thanks!

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment