I have noticed that using a SimplePanel can affect things in a positive way when clipping issues come up - thanks for the tip, I'll give different containers a try when I get home and post my results either way.
On Feb 23, 6:19 am, Eric Ayers <[email protected]> wrote: > This has come up before, but outside of UiBinder. Try a container other > than a dock panel and check the archives of the gwt-google-apis group for > other suggestions. > > > > > > On Tue, Feb 23, 2010 at 2:07 AM, Lypheus <[email protected]> wrote: > > Having some issues with Composite/UIBinder - the following will show > > the map but it clips the image and things disappear when moved about > > (see below). If I ditch uibinder then it renders and behaves as > > expected. Am I missing anything here that would cause this behavior? > > I'm thinking it could be in how I'm defining the MapWidget field, but > > whatever is wrong is not obvious to me. > > > import com.google.gwt.core.client.GWT; > > import com.google.gwt.maps.client.InfoWindowContent; > > import com.google.gwt.maps.client.MapWidget; > > import com.google.gwt.maps.client.control.LargeMapControl; > > import com.google.gwt.maps.client.geom.LatLng; > > import com.google.gwt.maps.client.overlay.Marker; > > import com.google.gwt.uibinder.client.UiBinder; > > import com.google.gwt.uibinder.client.UiField; > > import com.google.gwt.user.client.ui.Composite; > > import com.google.gwt.user.client.ui.Widget; > > > public class HelloWidgetWorld > > extends Composite > > { > > interface MyUiBinder extends UiBinder<Widget, HelloWidgetWorld> { > > } > > private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class); > > > �...@uifield > > MapWidget map; > > > public HelloWidgetWorld(String... names) > > { > > initWidget(uiBinder.createAndBindUi(this)); > > setSize( "600px", "600px" ); > > LatLng cawkerCity = LatLng.newInstance(39.509, -98.434); > > map = new MapWidget(cawkerCity, 2); > > map.setSize("600px", "600px"); > > map.addControl(new LargeMapControl()); > > map.addOverlay(new Marker(cawkerCity)); > > map.getInfoWindow().open(map.getCenter(), new > > InfoWindowContent("World's Largest Ball of Sisal Twine")); > > } > > } > > > <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' > > xmlns:g='urn:import:com.google.gwt.user.client.ui' > > xmlns:gm='urn:import:com.google.gwt.maps.client'> > > <ui:style> > > .bodyPanel { border: 4px solid black; } > > .mapStyle { border: 2px dashed red; width: 100%; height: > > 100%; } > > </ui:style> > > <g:HTMLPanel styleName="{style.bodyPanel}"> > > <g:DockLayoutPanel styleName="{style.mapStyle}" unit='PX'> > > <g:center> > > <gm:MapWidget ui:field='map' /> > > </g:center> > > </g:DockLayoutPanel> > > </g:HTMLPanel> > > </ui:UiBinder> > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google Web Toolkit" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<google-web-toolkit%2Bunsubs > > [email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-web-toolkit?hl=en. > > -- > Eric Z. Ayers > Google Web Toolkit, Atlanta, GA USA > Sign up now for Google I/O 2010: May 19-20,http://code.google.com/io -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
