@Chris, many thanks for the link. I had managed with the Vizu example
and I learned a couple of things along the way. I also thought about
writing some Generators to automate it, no need anymore! It looks
great.

@Eric, OK I understand better now. However I don't want to create a
GMap2 object, what I need is to pass the GMap2 object to my GWT
widget. Not sure how to do that.

Cheers

Thomas


On Feb 1, 10:36 pm, Eric Ayers <[email protected]> wrote:
> A gwt-google-apis MapWidget object is not a javascript GMap2 object.
> A MapWidget is a GWT Widget and contains a GMap2 object inside of it,
> so you need to use the MapWidget constructor to create it.
>
>
>
>
>
>
>
>
>
> On Tue, Feb 1, 2011 at 2:10 PM, Thomas Lefort <[email protected]> wrote:
> > Me again, there doesn't seem to be much interest in generating
> > reusable javascript widgets with GWT. If there is let me know, I'll
> > try to write something about my (painful) experience on this subject.
> > Anyway, I am now stuck on passing a Map argument to my widget. I use
> > MapWidget in GWT and the Maps API v2 in the javascript part. I get a
> > Class cast exception. I am unsure whether or not MapWidget is the
> > right class to use.
> > The function specific JSNI:
>
> >  private static native void registerPlayMapFunctions(JavaScriptObject
> > jso) /*-{
> >                jso.play = function(map) {
> >                  return
> > [email protected]::play(Lcom/
> > google/gwt/maps/client/MapWidget;)(map);
> >                }
> >  }-*/;
> > The javascript:
> >        var map = new GMap2(document.getElementById("map_canvas"));
> >        var playMap = new PlayMap();
> >        playMap.play(map);
>
> > Any help would be highly appreciated.
>
> > Thanks,
>
> > Thomas
>
> > On Feb 1, 1:26 pm, Thomas Lefort <[email protected]> wrote:
> >>http://code.google.com/p/gwt-google-apis/wiki/VisualizationCustomVisu...,
> >> gives some insight BTW but you still have to check the code source
> >> above. And then it looks like the html page will load in two stages in
> >> any case, with the bootstrap. Might not be very optimum for small
> >> widgets... I am already on 5k + 90k for a small widget that would
> >> require just 5k in js. There has to be some optimisation left to be
> >> done ;-)
>
> >> On Feb 1, 11:04 am, Thomas Lefort <[email protected]> wrote:
>
> >> > Looks like this is a pointer to start with:
>
> >> >http://code.google.com/p/gwt-google-apis/source/browse/trunk/visualiz...
>
> >> > No doc/guide found so far.
>
> >> > On Jan 31, 1:12 pm, Thomas Lefort <[email protected]> wrote:
>
> >> > > I want to write a widget with GWT that can be reused by a javascript
> >> > > program (in its compiled form). Is there any guide on how to proceed,
> >> > > eg which classes and methods will be exposed to the user?
>
> >> > > Thanks,
>
> >> > > Thomas
>
> > --
> > 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 
> > athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> Eric Z. Ayers
> Google Web Toolkit, Atlanta, GA USA

-- 
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.

Reply via email to