I am using com.googlecode.maps3 to get Maps V3
into GWT, and InfoWindows through this library have
worked well so far. Here is a smippet of code for setting
up an InfoWindow (JSO == JavaScriptObject):
import com.googlecode.maps3.client.MapWidget;
import com.googlecode.maps3.client.MapJSO;
import com.googlecode.maps3.client.LatLng;
import com.googlecode.maps3.client.InfoWindowJSO;
void startInfoWindow(ContentRecord record, LatLng center)
{
HTML contentHTML = new HTML();
InfoWindowJSO infoWindow = InfoWindowJSO.newInstance();
infoWindow.setContent(contentHTML.getElement());
contentHTML.setHTML(formatRecord(contentRecord));
infoWindow.setPosition(center);
infoWindow.open(mapWidget.getMapJSO());
}
On Aug 4, 6:45 am, Thomas Lefort <lefortho...@gmail.com> wrote:
> If anybody can help, I am really pulling my hairs...
>
> I am on my last bit of my jsni integration withmapsv3. I want a
> widget to appear in an infowindow. The widget has buttons and links.
> All elements appear fine in the infowindow except that none of the
> links, buttons work anymore.
>
> This is what I do:
>
> public native void openInfoWindowWidget(EOLatLng markerPosition,
> Element element) /*-{
> var myElement = element;
>
> $wnd.mapsJSNI.openInfoWindowWidget(markerPositi...@com.metaaps.webapps.earthimages.shared.domain.EOLatLng::lat,
> markerPositi...@com.metaaps.webapps.earthimages.shared.domain.EOLatLng::lng,
> myElement);
>
> }-*/;
>
> public final void openPropertiesWindow(EOLatLng currentCoordinate,
> List<Property> properties, PropertiesChange callBack) {
> FlowPanel panel = new FlowPanel();
> openInfoWindowWidget(currentCoordinate, panel.getElement());
> panel.add(propertiesEditor);
> }
>
> propertiesEditor is my widget, it's a field. I am adding the flowpanel
> in between to avoid a call to getElement on the widget itself.
>
> I would really appreciate any ideas!!!
>
> Thanks
--
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 google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment