Re: UIBinder + MapWidget

2010-02-26 Thread Lypheus
No problem, issue created (354): 
http://code.google.com/p/gwt-google-apis/issues/detail?id=354

Thanks for taking the time to look.

On Feb 26, 8:51 am, Eric Ayers  wrote:
> Could you please post this an issue on the issue tracker 
> athttp://code.google.com/p/gwt-google-apis?
>
> Thanks, -Eric.
>
>
>
>
>
> On Thu, Feb 25, 2010 at 4:14 PM, Lypheus  wrote:
> > Fair enough, I did try this already (sans DockPanel and also tried
> > nesting another g:HTMLPanel to directly wrap the MapWidget, with no
> > success).  I'm finding that this seems to be related more to the use
> > Composite than UIBinder (at least thats what seems to be the case,
> > given a run without UIBinder yields the same result).  Looking at
> > MapWidget source, it appears to be using a Composite already for its
> > own layout - so is the problem here that I need to be using MapWidget
> > directly?  If so, how do we just toss an arbitrary widget into a
> > uibinder xml?  UIBinder seems to rely on having classes "bound" using
> > its interface, etc... but maybe I'm missing something and theres a way
> > to just toss a standard gwt component into the uibinder xml without
> > wrapping it and using the binder infrastructure?
>
> > On Feb 23, 9:37 pm, Andrew Hughes  wrote:
> > > Perhaps you should try using  inside the ui.xml rather than
> > the
> > > ?
>
> > > This might give you more 'direct' access to the html that embed's the
> > > MapWidget :/
>
> > > I used my own  here:
> >http://groups.google.com/group/google-web-toolkit/browse_thread/threa...
>
> > > On Wed, Feb 24, 2010 at 2:35 PM, Lypheus  wrote:
> > > > Ya nothing works, I'm having no success with MapWidget and UIBinder -
> > > > looks broken to me.  I'll use the programmatic layout instead as I
> > > > really need to get this gui roughed out here.  I had no problems with
> > > > making MapWidget behave well with dynamic sizing using non-UIBinder
> > > > GUI layout.
>
> > > > On Feb 23, 5:44 am, Andrew Hughes  wrote:
> > > > > You could try putting the MapWidget inside and AbsolutePanel.
>
> > > > > FWIW: MapWidget's tend to dislike dynamic layout / rezising. Without
> > > > knowing
> > > > > how the bindings are applied at runtime it *could* be affecting this.
>
> > > > > For this reason you will find two methods:
>
> >http://gwt-google-apis.googlecode.com/svn/javadoc/maps/1.0/com/google..()
>
> > > > > You might want to invoke these post init/load somehow. Even if you
> > try it
> > > > > with a manual button to test if that fixes the problems your
> > > > experiencing.
>
> > > > > Sorry to not be of more help.
>
> > > > > On Tue, Feb 23, 2010 at 5:37 PM, Lypheus  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 > HelloWidgetWorld>
> > > > {
> > > > > >     }
> > > > > >        private static MyUiBinder uiBinder =
> > > > GWT.create(MyUiBind

Re: UIBinder + MapWidget

2010-02-25 Thread Lypheus
Fair enough, I did try this already (sans DockPanel and also tried
nesting another g:HTMLPanel to directly wrap the MapWidget, with no
success).  I'm finding that this seems to be related more to the use
Composite than UIBinder (at least thats what seems to be the case,
given a run without UIBinder yields the same result).  Looking at
MapWidget source, it appears to be using a Composite already for its
own layout - so is the problem here that I need to be using MapWidget
directly?  If so, how do we just toss an arbitrary widget into a
uibinder xml?  UIBinder seems to rely on having classes "bound" using
its interface, etc... but maybe I'm missing something and theres a way
to just toss a standard gwt component into the uibinder xml without
wrapping it and using the binder infrastructure?

On Feb 23, 9:37 pm, Andrew Hughes  wrote:
> Perhaps you should try using  inside the ui.xml rather than the
> ?
>
> This might give you more 'direct' access to the html that embed's the
> MapWidget :/
>
> I used my own  
> here:http://groups.google.com/group/google-web-toolkit/browse_thread/threa...
>
>
>
> On Wed, Feb 24, 2010 at 2:35 PM, Lypheus  wrote:
> > Ya nothing works, I'm having no success with MapWidget and UIBinder -
> > looks broken to me.  I'll use the programmatic layout instead as I
> > really need to get this gui roughed out here.  I had no problems with
> > making MapWidget behave well with dynamic sizing using non-UIBinder
> > GUI layout.
>
> > On Feb 23, 5:44 am, Andrew Hughes  wrote:
> > > You could try putting the MapWidget inside and AbsolutePanel.
>
> > > FWIW: MapWidget's tend to dislike dynamic layout / rezising. Without
> > knowing
> > > how the bindings are applied at runtime it *could* be affecting this.
>
> > > For this reason you will find two methods:
> >http://gwt-google-apis.googlecode.com/svn/javadoc/maps/1.0/com/google..()
>
> > > You might want to invoke these post init/load somehow. Even if you try it
> > > with a manual button to test if that fixes the problems your
> > experiencing.
>
> > > Sorry to not be of more help.
>
> > > On Tue, Feb 23, 2010 at 5:37 PM, Lypheus  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
> > {
> > > >     }
> > > >        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"));
> > > >        }
> > > > }
>
> > > >  > > >        xmlns:g='urn:import:com.google.gwt.user.client.ui'
> &

Re: UIBinder + MapWidget

2010-02-23 Thread Lypheus
Ya nothing works, I'm having no success with MapWidget and UIBinder -
looks broken to me.  I'll use the programmatic layout instead as I
really need to get this gui roughed out here.  I had no problems with
making MapWidget behave well with dynamic sizing using non-UIBinder
GUI layout.

On Feb 23, 5:44 am, Andrew Hughes  wrote:
> You could try putting the MapWidget inside and AbsolutePanel.
>
> FWIW: MapWidget's tend to dislike dynamic layout / rezising. Without knowing
> how the bindings are applied at runtime it *could* be affecting this.
>
> For this reason you will find two 
> methods:http://gwt-google-apis.googlecode.com/svn/javadoc/maps/1.0/com/google...()http://gwt-google-apis.googlecode.com/svn/javadoc/maps/1.0/com/google...()
>
> You might want to invoke these post init/load somehow. Even if you try it
> with a manual button to test if that fixes the problems your experiencing.
>
> Sorry to not be of more help.
>
>
>
> On Tue, Feb 23, 2010 at 5:37 PM, Lypheus  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 {
> >     }
> >        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"));
> >        }
> > }
>
> >  >        xmlns:g='urn:import:com.google.gwt.user.client.ui'
> > xmlns:gm='urn:import:com.google.gwt.maps.client'>
> >        
> >                .bodyPanel { border: 4px solid black; }
> >                .mapStyle { border: 2px dashed red;     width: 100%; height:
> > 100%; }
> >        
> >        
> >                
> >                        
> >                                
> >                        
> >                
> >        
> > 
>
> > --
> > 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-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: UIBinder + MapWidget

2010-02-23 Thread Lypheus
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  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  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 {
> >     }
> >        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"));
> >        }
> > }
>
> >  >        xmlns:g='urn:import:com.google.gwt.user.client.ui'
> > xmlns:gm='urn:import:com.google.gwt.maps.client'>
> >        
> >                .bodyPanel { border: 4px solid black; }
> >                .mapStyle { border: 2px dashed red;     width: 100%; height:
> > 100%; }
> >        
> >        
> >                
> >                        
> >                                
> >                        
> >                
> >        
> > 
>
> > --
> > 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-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > .
> > 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 google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



UIBinder + MapWidget

2010-02-22 Thread Lypheus
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 {   
}
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"));
}
}




.bodyPanel { border: 4px solid black; }
.mapStyle { border: 2px dashed red; width: 100%; height: 
100%; }










-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.