Hi,

I don't think you are making a mistake - I think you've run into the issue
reported in issue 175.

http://code.google.com/p/gwt-google-apis/issues/detail?id=175

Could you please visit the issue and highlight the 'star' ?

Thanks,
-Eric.

On Mon, Nov 10, 2008 at 5:22 AM, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:

>
> Hi There
>
> I wanted to code a page, showing two Maps in one Browser Window and I
> ran into a problem with showing an Infowindow, when the second Map is
> loaded. Im getting graphical errors while showing the infowwindow.
> Perhaps I'm making a mistake, or theres something I'm not thinking of,
> plz tell me!
>
> Heres my Sample Code. It loads a Map and opens an Infowindow if you
> click at it, while in the background a second Map is loaded, but not
> attached to anything (even if I would attach it, makes no difference).
> Try It.
> I get totally scrambled InfoWindows in Firefox, IE, Safari or Chrome
>
> package org.test.client;
>
> import com.google.gwt.core.client.EntryPoint;
> import com.google.gwt.maps.client.InfoWindow;
> import com.google.gwt.maps.client.InfoWindowContent;
> import com.google.gwt.maps.client.MapWidget;
> import com.google.gwt.maps.client.event.MapClickHandler;
> import com.google.gwt.maps.client.geom.LatLng;
> import com.google.gwt.user.client.ui.HTML;
> import com.google.gwt.user.client.ui.RootPanel;
>
> public class MainEntryPoint implements EntryPoint, MapClickHandler {
>
>    private MapWidget firstMapWidget;
>    private MapWidget secondMapWidget;
>
>    public MainEntryPoint() {
>    }
>
>    public void onModuleLoad() {
>        firstMapWidget = new MapWidget(LatLng.newInstance(0, 0), 3);
>        firstMapWidget.setSize("100%", "100%");
>        firstMapWidget.addMapClickHandler(this);
>        RootPanel.get().add(firstMapWidget);
>    }
>
>    public void onClick(MapClickEvent arg0) {
>        secondMapWidget = new MapWidget(LatLng.newInstance(0, 0), 3);
>        InfoWindow infoWindow = firstMapWidget.getInfoWindow();
>        InfoWindowContent infoWindowContent = new
> InfoWindowContent(new HTML("<h1>test</h1>"));
>        infoWindow.open(firstMapWidget.getCenter(),
> infoWindowContent);
>    }
>
> }
> >
>


-- 
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 Google-Web-Toolkit@googlegroups.com
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