The other thing to try is to use a different container panel.  I think
using AbsolutePanel as the outer panel works, it basically comes down
to whether the outer panel is a table or a div.

On Mon, Aug 25, 2008 at 7:09 AM, Eric Ayers <[EMAIL PROTECTED]> wrote:
> Setting width and height to 100% is probably a big part of the
> problem.  Try setting to a pixel size instead.  If you want the map to
> fill the entire browser window, see the GWT FAQ at
> http://code.google.com/docreader/#p(google-web-toolkit-doc-1-5)s(google-web-toolkit-doc-1-5)t(FAQ_UIVerticalFillApp)
>
> On Sat, Aug 23, 2008 at 9:49 AM, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
>>
>> Hi there
>> I tried the new Overlay-Functionality, I tried to implement a MapPanel
>> withe the new JavascriptObject Overlay Functionality, heres my source.
>>
>> GMap2.java
>>  import com.google.gwt.core.client.JavaScriptObject;
>>  import com.google.gwt.user.client.Element;
>>
>>  public class GMap2 extends JavaScriptObject {
>>
>>      protected GMap2() {
>>      }
>>
>>      public static native GMap2 GMap2(Element element) /*-{
>>      return new $wnd.GMap2(element);
>>      }-*/;
>>
>>      public final native void setCenter(GLatLng GLatLng, int center) /
>> *-{
>>      this.setCenter(GLatLng, center);
>>      }-*/;
>>
>>  }
>>
>> GLatLng.java
>>  import com.google.gwt.core.client.JavaScriptObject;
>>
>>  public class GLatLng extends JavaScriptObject {
>>
>>      protected GLatLng() {
>>      }
>>
>>      public final static native GLatLng GLatLng(Double lat, Double
>> lng) /*-{
>>      return new $wnd.GLatLng(lat, lng);
>>      }-*/;
>>  }
>>
>> MapPanel.java
>>  import com.google.gwt.core.client.JavaScriptObject;
>>  import com.google.gwt.user.client.DOM;
>>  import com.google.gwt.user.client.ui.Widget;
>>
>>  public class MapPanel extends Widget {
>>
>>      private static int nextID = 0;
>>      private GMap2 GMap2;
>>
>>      public MapPanel(PartyMap controller) {
>>          setElement(DOM.createDiv());
>>          getElement().setId("PartyMap" + ++nextID);
>>          setWidth("100%");
>>          setHeight("100%");
>>      }
>>
>>      @Override
>>      public void onLoad() {
>>          GMap2 = GMap2.GMap2(getElement());
>>          GMap2.setCenter(GLatLng.GLatLng(49.01, 8.4), 13);
>>      }
>>
>>  }
>>
>> When I add this Widget to my Rootpanel (GoogleMaps Scriptfile included
>> of course), I get a broken Map, small and always grey. Where is my
>> mistake?
>> Also, if I move the GMap2.java and GLatLng.java to another package and
>> include them in MapPanel.java, I get an error, saying, the import
>> cannot be resolved.
>>
>>
>> >>
>>
>
>
>
> --
> Eric Z. Ayers - GWT Team - Atlanta, GA USA
> http://code.google.com/webtoolkit/
>



-- 
Eric Z. Ayers - GWT Team - Atlanta, GA USA
http://code.google.com/webtoolkit/

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