Wicket and Gmap Gotcha
I am integrating the wicket gmap2 component into my application. There were two issues
- Do not put the gmap into a html table. If I did this, the google logo would display, but nothing else did. I don't think I had any table css styles, but once I converted my application to use div's, all was well.
- You can not put your gmap on an ajax panel. What I mean, you can have your gmap appear as an ajax update. I looked at the ajax console and I got a "channel is busy"

Comments
I had this problem as well.
I had this problem as well. Its not really about GMAP2, its about a panel trying to update itself after wicket has lost a reference to it, hence the 'Channel is Busy' (the panel is not there to respond).
The fix is to handle your ajaxevents in higher level components and let them sort it out. Since the higher level components don't change they can manipulate the child that holds your map.
Odd I know, here is an example
In my base page class (that all other panels extend for common wrapping) I put my ajaxness
{code}
AjaxFallbackLink residentialsitecheck = new AjaxFallbackLink(
"residentialsitecheck") {
@Override
public void onClick(AjaxRequestTarget target) {
mainPage.swapRightContent(new PublicServiceAreaPanel(
"rightmainbox", mainPage), target);
PublicServiceMapCheck thePanel = new PublicServiceMapCheck(
"centerbox");
mainPage.swapMainContent(thePanel, target);
}
{code}
swampMainContent and swapRightContent just swap common panels on the page out.
So, the key here is to make sure that the ajax swapping occurs in a parent component of the gmap (or any) ajax component.
Thats what I remember, you can see it in action at http://www.valleyinternet.com/ , click 'Site check'
Sorry, click 'Service Areas',
Sorry, click 'Service Areas', not site check :)
Post new comment