if (overlayListeners == null) {
overlayListeners = new ListenerCollection<OverlayListener>();
}
JavaScriptObject overlayEventHandles[] = {
EventImpl.impl.addListener(jsoPeer, MapEvent.ADDOVERLAY,
new OverlayCallback() {
@Override
public void callback(Overlay overlay) {
listener.onOverlayAdded(MapWidget.this, overlay);
}
}),
EventImpl.impl.addListener(jsoPeer, MapEvent.REMOVEOVERLAY,
new OverlayCallback() {
@Override
public void callback(Overlay overlay) {
listener.onOverlayRemoved(MapWidget.this, overlay);
}
}),