public class MapWidget extends MVCObjectWidget<MapImpl>
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
impl
DEBUG_ID_PREFIX
Constructor and Description |
---|
MapWidget(MapOptions options)
create a new Map Widget
|
Modifier and Type | Method and Description |
---|---|
HandlerRegistration |
addBoundsChangeHandler(BoundsChangeMapHandler handler)
This event is fired when the viewport bounds have changed.
|
HandlerRegistration |
addCenterChangeHandler(CenterChangeMapHandler handler)
This event is fired when the map center property changes.
|
HandlerRegistration |
addClickHandler(ClickMapHandler handler)
This event is fired when the user clicks on the map (but not when they
click on a marker or infowindow).
|
HandlerRegistration |
addDblClickHandler(DblClickMapHandler handler)
This event is fired when the user double-clicks on the map.
|
HandlerRegistration |
addDragEndHandler(DragEndMapHandler handler)
This event is fired when the user stops dragging the map.
|
HandlerRegistration |
addDragHandler(DragMapHandler handler)
This event is repeatedly fired while the user drags the map.
|
HandlerRegistration |
addDragStartHandler(DragStartMapHandler handler)
This event is fired when the user starts dragging the map.
|
HandlerRegistration |
addHeadingChangeHandler(HeadingChangeMapHandler handler)
This event is fired when the map heading property changes.
|
HandlerRegistration |
addIdleHandler(IdleMapHandler handler)
This event is fired when the map becomes idle after panning or zooming.
|
HandlerRegistration |
addMapTypeIdChangeHandler(MapTypeIdChangeMapHandler handler)
This event is fired when the mapTypeId property changes.
|
HandlerRegistration |
addMouseMoveHandler(MouseMoveMapHandler handler)
This event is fired whenever the user's mouse moves over the map
container.
|
HandlerRegistration |
addMouseOutMoveHandler(MouseOutMapHandler handler)
This event is fired when the user's mouse exits the map container.
|
HandlerRegistration |
addMouseOverHandler(MouseOverMapHandler handler)
This event is fired when the user's mouse enters the map container.
|
HandlerRegistration |
addProjectionChangeHandler(ProjectionChangeMapHandler handler)
This event is fired when the projection has changed.
|
HandlerRegistration |
addResizeHandler(ResizeMapHandler handler)
Developers should trigger this event on the map when the div changes
size: google.maps.event.trigger(map, 'resize') .
|
HandlerRegistration |
addRightClickHandler(RightClickMapHandler handler)
This event is fired when the DOM contextmenu event is fired on the map
container.
|
HandlerRegistration |
addTilesLoadedHandler(TilesLoadedMapHandler handler)
This event is fired when the visible tiles have finished loading.
|
HandlerRegistration |
addTiltChangeHandler(TiltChangeMapHandler handler)
This event is fired when the map tilt property changes.
|
HandlerRegistration |
addZoomChangeHandler(ZoomChangeMapHandler handler)
This event is fired when the map zoom property changes.
|
void |
fitBounds(LatLngBounds bounds)
Sets the viewport to contain the given bounds.
|
LatLngBounds |
getBounds()
Returns the lat/lng bounds of the current viewport.
|
LatLng |
getCenter()
get Center
|
MVCArray<Element> |
getControls()
TODO gets Additional controls to attach to the map.
|
Element |
getDiv()
get Element
|
int |
getHeading()
Returns the compass heading of aerial imagery.
|
MapImpl |
getJso()
get JavaScriptObject instance.
|
MapTypeId |
getMapTypeId()
gets
MapTypeId |
MapTypeRegistry |
getMapTypeRegistry()
gets a registry of MapType instances
|
MVCArray<JavaScriptObject> |
getOverlayMapTypes()
TODO gets Additional map types to overlay.
|
Projection |
getProjection()
Returns the current Projection.
|
StreetViewPanoramaImpl |
getStreetView()
Returns the default StreetViewPanorama bound to the map, which may be a
default panorama embedded within the map, or the panorama set using
setStreetView().
|
int |
getTilt()
gets Returns the angle of incidence for aerial imagery (available for
SATELLITE and HYBRID map types) measured in degrees from the viewport
plane to the map plane.
|
int |
getZoom()
get zoom
|
static MapWidget |
newInstance(MapImpl impl)
Reconstruct the mapWidget from JSO
|
protected void |
onDetach() |
void |
panBy(int x,
int y)
Changes the center of the map by the given distance in pixels.
|
void |
panTo(LatLng latLng)
Changes the center of the map to the given LatLng.
|
void |
panToBounds(LatLngBounds latLngBounds)
Pans the map by the minimum amount necessary to contain the given
LatLngBounds.
|
void |
setCenter(LatLng latlng)
set center
|
void |
setControls(ControlPosition controlPosition,
Element element)
sets Additional controls to attach to the map.
|
void |
setControls(ControlPosition controlPosition,
Widget widget)
sets Additional controls to attach to the map.
|
void |
setControls(MVCArray<Element> controls)
TODO sets Additional controls to attach to the map.
|
void |
setCustomMapType(String mapTypeId,
StyledMapType styledType)
Set the custom map type into the map's registry
|
void |
setHeading(int heading)
Sets the compass heading for aerial imagery measured in degrees from
cardinal direction North.
|
void |
setJso(MapImpl impl)
sets JavaScriptObject instance.
|
void |
setMapTypeId(MapTypeId mapTypeId)
set MapTypeId
|
void |
setMapTypesRegistry(MapTypeRegistry mapTypes)
TODO sets A registry of MapType instances by string ID.
|
void |
setOptions(MapOptions options)
set MapOptions
|
void |
setOverlayMapTypes(MVCArray<JavaScriptObject> overlayMapTypes)
TODO sets Additional map types to overlay.
|
void |
setStreetView(StreetViewPanoramaImpl panorama)
Sets the angle of incidence for aerial imagery (available for SATELLITE
and HYBRID map types) measured in degrees from the viewport plane to the
map plane.
|
void |
setTilt(int tilt)
Sets the angle of incidence for aerial imagery (available for SATELLITE
and HYBRID map types) measured in degrees from the viewport plane to the
map plane.
|
void |
setZoom(int zoom)
sets map zoom
|
getMVCObject
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
public MapWidget(MapOptions options)
options
- MapOptions
public static MapWidget newInstance(MapImpl impl)
impl
- public void fitBounds(LatLngBounds bounds)
bounds
- LatLngBounds
public LatLngBounds getBounds()
LatLngBounds
public Element getDiv()
public int getHeading()
public Projection getProjection()
Projection
public StreetViewPanoramaImpl getStreetView()
StreetViewPanoramaImpl
public int getTilt()
public int getZoom()
public void panBy(int x, int y)
x
- y
- public void panTo(LatLng latLng)
latLng
- public void panToBounds(LatLngBounds latLngBounds)
latLngBounds
- public void setCenter(LatLng latlng)
latlng
- public void setHeading(int heading)
heading
- public final void setMapTypeId(MapTypeId mapTypeId)
mapTypeId
- public void setOptions(MapOptions options)
options
- public void setStreetView(StreetViewPanoramaImpl panorama)
panorama
- public void setTilt(int tilt)
tilt
- public void setZoom(int zoom)
zoom
- public void setControls(MVCArray<Element> controls)
<div>
to the MVCArray
corresponding to the ControlPosition where it should be rendered.controls
- public void setControls(ControlPosition controlPosition, Element element)
<div>
to the MVCArray
corresponding to the ControlPosition where it should be rendered.controlPosition
- element
- public void setControls(ControlPosition controlPosition, Widget widget)
<div>
to the MVCArray
corresponding to the ControlPosition where it should be rendered.controlPosition
- widget
- public MVCArray<Element> getControls()
<div>
to the MVCArray
corresponding to the ControlPosition where it should be rendered.public void setMapTypesRegistry(MapTypeRegistry mapTypes)
mapTypes
- public void setCustomMapType(String mapTypeId, StyledMapType styledType)
mapTypeId
- styledType
- public MapTypeRegistry getMapTypeRegistry()
public void setOverlayMapTypes(MVCArray<JavaScriptObject> overlayMapTypes)
overlayMapTypes
- public MVCArray<JavaScriptObject> getOverlayMapTypes()
public HandlerRegistration addBoundsChangeHandler(BoundsChangeMapHandler handler)
handler
- BoundsChangeMapHandler
MapHandlerRegistration
public HandlerRegistration addCenterChangeHandler(CenterChangeMapHandler handler)
handler
- CenterChangeMapHandler
MapHandlerRegistration
public HandlerRegistration addClickHandler(ClickMapHandler handler)
handler
- ClickMapHandler
MapHandlerRegistration
public HandlerRegistration addDblClickHandler(DblClickMapHandler handler)
handler
- DblClickMapHandler
MapHandlerRegistration
public HandlerRegistration addDragHandler(DragMapHandler handler)
handler
- DragMapHandler
MapHandlerRegistration
public HandlerRegistration addDragEndHandler(DragEndMapHandler handler)
handler
- DragEndMapHandler
MapHandlerRegistration
public HandlerRegistration addDragStartHandler(DragStartMapHandler handler)
handler
- DragStartMapHandler
MapHandlerRegistration
public HandlerRegistration addHeadingChangeHandler(HeadingChangeMapHandler handler)
handler
- HeadingChangeMapHandler
MapHandlerRegistration
public HandlerRegistration addIdleHandler(IdleMapHandler handler)
handler
- IdleMapHandler
MapHandlerRegistration
public HandlerRegistration addMapTypeIdChangeHandler(MapTypeIdChangeMapHandler handler)
handler
- MapTypeIdChangeMapHandler
MapHandlerRegistration
public HandlerRegistration addMouseMoveHandler(MouseMoveMapHandler handler)
handler
- MouseMoveMapHandler
MapHandlerRegistration
public HandlerRegistration addMouseOutMoveHandler(MouseOutMapHandler handler)
handler
- MouseOutMapHandler
MapHandlerRegistration
public HandlerRegistration addMouseOverHandler(MouseOverMapHandler handler)
handler
- MouseOverMapHandler
MapHandlerRegistration
public HandlerRegistration addProjectionChangeHandler(ProjectionChangeMapHandler handler)
handler
- ProjectionChangeMapHandler
MapHandlerRegistration
public HandlerRegistration addResizeHandler(ResizeMapHandler handler)
handler
- ResizeMapHandler
MapHandlerRegistration
public HandlerRegistration addRightClickHandler(RightClickMapHandler handler)
handler
- RightClickMapHandler
MapHandlerRegistration
public HandlerRegistration addTilesLoadedHandler(TilesLoadedMapHandler handler)
handler
- TilesLoadedMapHandler
MapHandlerRegistration
public HandlerRegistration addTiltChangeHandler(TiltChangeMapHandler handler)
handler
- TiltChangeMapHandler
MapHandlerRegistration
public HandlerRegistration addZoomChangeHandler(ZoomChangeMapHandler handler)
handler
- ZoomChangeMapHandler
MapHandlerRegistration
Copyright © 2011-2013 Gone Vertical LLC. All Rights Reserved.