Monday, August 29, 2011

Re: Maps v3 + GWT using JSNI - Map showing problem -

If I use it directly in onModuleLoad method, in this way it looks
right:
***********************************************************************************************

private MapContainer mapContainer=null;
private SimplePanel container=new SimplePanel();
private JavaScriptObject mappa=null;

container.setSize("400px", "400px");
mappa=mapContainer.creaDipintoMap(container.getElement(),"/
path/","image",4, 0, true, true, true, true);
DockLayoutPanel layout=new DockLayoutPanel(Unit.EM);
layout.add(container);
RootLayoutPanel.get().add(layout);

************************************************************************************************
But if I use another class that returns a panel containing a map in
this way:
************************************************************************************************

public class getPanel {

public VerticalPanel getPanelMethod(String image){
VerticalPanel a=new VerticalPanel();
VerticalPanel container=new VerticalPanel();
MapWidget mc=new MapWidget();
container.setSize("400px", "400px");
JavaScriptObject mappa=mc.creaDipintoMap(container.getElement(),"/
path/", "image",4, 0, true, true, true, true);
a.add(container);
return a;
}

}
__________________________________________________________________________
RootLayoutPanel.get().add(new getPanel().getPanelMethod("imageName"));
********************************************************************************************************

my map doesn't work.

I also realized that in the second panel there is a listbox for the
map types and zoom control doesn't work.

How can I solve this problem?
Thanks for your help!!!

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment