bug6098: added support on MapWidget for renderingtype_changed event

This commit is contained in:
Axel Uhl committed 2025-04-25 09:02:08 +02:00
1 parent e969a4bc89
commit ebbc89532a
5 files changed
+114 -1

No files matched your search

@@ -56,6 +56,8 @@ import com.google.gwt.maps.client.events.mouseover.MouseOverEventFormatter;
import com.google.gwt.maps.client.events.mouseover.MouseOverMapHandler;
import com.google.gwt.maps.client.events.projection.ProjectionChangeEventFormatter;
import com.google.gwt.maps.client.events.projection.ProjectionChangeMapHandler;
import com.google.gwt.maps.client.events.renderingtype.RenderingTypeChangeEventFormatter;
import com.google.gwt.maps.client.events.renderingtype.RenderingTypeChangeMapHandler;
import com.google.gwt.maps.client.events.resize.ResizeEventFormatter;
import com.google.gwt.maps.client.events.resize.ResizeMapHandler;
import com.google.gwt.maps.client.events.rightclick.RightClickEventFormatter;
@@ -615,4 +617,10 @@ public class MapImpl extends MVCObject<MapImpl> {
return MapHandlerRegistration.addHandler(this, MapEventType.ZOOM_CHANGED, handler, new ZoomChangeEventFormatter());
}
/**
* This event is fired when the map rendering type property changes.
*/
public final HandlerRegistration addRenderingTypeChangeHandler(RenderingTypeChangeMapHandler handler) {
return MapHandlerRegistration.addHandler(this, MapEventType.RENDERINGTYPE_CHANGED, handler, new RenderingTypeChangeEventFormatter());
}
}
@@ -136,7 +136,9 @@ public enum MapEventType {
ZINDEX_CHANGED,
ZOOM_CHANGED;
ZOOM_CHANGED,
RENDERINGTYPE_CHANGED;
public String value() {
return name().toLowerCase();
@@ -0,0 +1,33 @@
package com.google.gwt.maps.client.events.renderingtype;
/*
* #%L
* GWT Maps API V3 - Core API
* %%
* Copyright (C) 2011 - 2012 GWT Maps API V3
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import com.google.gwt.ajaxloader.client.Properties;
import com.google.gwt.maps.client.events.MapEventFormatter;
public class RenderingTypeChangeEventFormatter implements MapEventFormatter<RenderingTypeChangeMapEvent> {
@Override
public RenderingTypeChangeMapEvent createEvent(Properties properties) {
return new RenderingTypeChangeMapEvent(properties);
}
}
@@ -0,0 +1,44 @@
package com.google.gwt.maps.client.events.renderingtype;
/*
* #%L
* GWT Maps API V3 - Core API
* %%
* Copyright (C) 2011 - 2012 GWT Maps API V3
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import com.google.gwt.ajaxloader.client.Properties;
import com.google.gwt.maps.client.events.MapEvent;
public class RenderingTypeChangeMapEvent extends MapEvent<RenderingTypeChangeMapHandler, RenderingTypeChangeMapEvent> {
public static Type<RenderingTypeChangeMapHandler> TYPE = new Type<RenderingTypeChangeMapHandler>();
public RenderingTypeChangeMapEvent(Properties properties) {
super(properties);
}
@Override
public com.google.gwt.event.shared.GwtEvent.Type<RenderingTypeChangeMapHandler> getAssociatedType() {
return TYPE;
}
@Override
protected void dispatch(RenderingTypeChangeMapHandler handler) {
handler.onEvent(this);
}
}
@@ -0,0 +1,26 @@
package com.google.gwt.maps.client.events.renderingtype;
/*
* #%L
* GWT Maps API V3 - Core API
* %%
* Copyright (C) 2011 - 2012 GWT Maps API V3
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import com.google.gwt.maps.client.events.MapHandler;
public interface RenderingTypeChangeMapHandler extends MapHandler<RenderingTypeChangeMapEvent> {
}