Follow us on GitHub

com.google.gwt.maps.client.streetview
Class StreetViewPanoramaWidget

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.maps.client.mvc.MVCObjectWidget<StreetViewPanoramaImpl>
              extended by com.google.gwt.maps.client.streetview.StreetViewPanoramaWidget
All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, IsWidget

public class StreetViewPanoramaWidget
extends MVCObjectWidget<StreetViewPanoramaImpl>

Displays the panorama for a given LatLng or panorama ID. A StreetViewPanorama object provides a Street View "viewer" which can be stand-alone within a separate <div> or bound to a Map. This class extends MVCObject.

See StreetViewPanorama API Doc


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
StreetViewPanoramaWidget(StreetViewPanoramaOptions options)
          Displays the panorama for a given LatLng or panorama ID.
 
Method Summary
 HandlerRegistration addCloseClickHandler(CloseClickMapHandler handler)
          This event is fired when the close button is clicked.
 HandlerRegistration addLinksChangeHandler(LinksChangeMapHandler handler)
          This event is fired when the panorama's links change.
 HandlerRegistration addPanoChangeHandler(PanoChangeMapHandler handler)
          This event is fired when the panorama's pano id changes.
 HandlerRegistration addPositionChangeHandler(PositionChangeMapHandler handler)
          This event is fired when the panorama's position changes.
 HandlerRegistration addPovChangeHandler(PovChangeMapHandler handler)
          This event is fired when the panorama's point-of-view changes.
 HandlerRegistration addResizeHandler(ResizeMapHandler handler)
          Developers should trigger this event on the panorama when its div changes size: google.maps.event.trigger(panorama, 'resize').
 HandlerRegistration addVisibleChangeHandler(VisibleChangeMapHandler handler)
          This event is fired when the panorama's visibility changes.
 StreetViewPanoramaImpl getJso()
          get the JavaScriptObject overlay
 JsArray<StreetViewLink> getLinks()
          Returns the set of navigation links for the Street View panorama.
 String getPano()
          Returns the current panorama ID for the Street View panorama.
 LatLng getPosition()
          Returns the current LatLng position for the Street View panorama.
 StreetViewPov getPov()
          Returns the current point of view for the Street View panorama.
 boolean getVisible()
          Returns true if the panorama is visible.
static StreetViewPanoramaWidget newInstance(StreetViewPanoramaImpl impl)
          create widget from a previous jso implementation
 void registerPanoProvider(StreetViewPanoramaProvider provider)
          Set the custom panorama provider called on pano change to load custom panoramas.
 void setControls(MVCArray<Element> controls)
          TODO Additional controls to attach to the panorama.
 void setPano(String pano)
          Sets the current panorama ID for the Street View panorama.
 void setPosition(LatLng latlng)
          Sets the current LatLng position for the Street View panorama.
 void setPov(StreetViewPov pov)
          Sets the point of view for the Street View panorama.
 void setVisible(boolean visible)
          Sets to true to make the panorama visible.
 
Methods inherited from class com.google.gwt.maps.client.mvc.MVCObjectWidget
getMVCObject
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
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, setWidth, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StreetViewPanoramaWidget

public StreetViewPanoramaWidget(StreetViewPanoramaOptions options)
Displays the panorama for a given LatLng or panorama ID. A StreetViewPanorama object provides a Street View "viewer" which can be stand-alone within a separate <div> or bound to a Map. This class extends MVCObject.

Method Detail

newInstance

public static StreetViewPanoramaWidget newInstance(StreetViewPanoramaImpl impl)
create widget from a previous jso implementation

Parameters:
impl -

getJso

public StreetViewPanoramaImpl getJso()
get the JavaScriptObject overlay


getLinks

public JsArray<StreetViewLink> getLinks()
Returns the set of navigation links for the Street View panorama.


getPano

public String getPano()
Returns the current panorama ID for the Street View panorama. This id is stable within the browser's current session only.


getPosition

public LatLng getPosition()
Returns the current LatLng position for the Street View panorama.


getPov

public StreetViewPov getPov()
Returns the current point of view for the Street View panorama.


getVisible

public boolean getVisible()
Returns true if the panorama is visible. It does not specify whether Street View imagery is available at the specified position.


registerPanoProvider

public void registerPanoProvider(StreetViewPanoramaProvider provider)
Set the custom panorama provider called on pano change to load custom panoramas.

Parameters:
provider -

setPano

public void setPano(String pano)
Sets the current panorama ID for the Street View panorama.

Parameters:
pano -

setPosition

public void setPosition(LatLng latlng)
Sets the current LatLng position for the Street View panorama.

Parameters:
latlng -

setPov

public void setPov(StreetViewPov pov)
Sets the point of view for the Street View panorama.

Parameters:
pov -

setVisible

public void setVisible(boolean visible)
Sets to true to make the panorama visible. If set to false, the panorama will be hidden whether it is embedded in the map or in its own <div>.

Specified by:
setVisible in interface HasVisibility
Overrides:
setVisible in class UIObject
Parameters:
visible -

setControls

public void setControls(MVCArray<Element> controls)
TODO Additional controls to attach to the panorama. To add a control to the panorama, add the control's <div> to the MVCArray corresponding to the ControlPosition where it should be rendered.

Parameters:
controls -

addCloseClickHandler

public HandlerRegistration addCloseClickHandler(CloseClickMapHandler handler)
This event is fired when the close button is clicked.

Parameters:
handler -

addLinksChangeHandler

public HandlerRegistration addLinksChangeHandler(LinksChangeMapHandler handler)
This event is fired when the panorama's links change. The links change asynchronously following a pano id change.

Parameters:
handler -

addPanoChangeHandler

public HandlerRegistration addPanoChangeHandler(PanoChangeMapHandler handler)
This event is fired when the panorama's pano id changes. The pano may change as the user navigates through the panorama or the position is manually set. Note that not all position changes trigger a pano_changed.

Parameters:
handler -

addPositionChangeHandler

public HandlerRegistration addPositionChangeHandler(PositionChangeMapHandler handler)
This event is fired when the panorama's position changes. The position changes as the user navigates through the panorama or the position is set manually.

Parameters:
handler -

addPovChangeHandler

public HandlerRegistration addPovChangeHandler(PovChangeMapHandler handler)
This event is fired when the panorama's point-of-view changes. The point of view changes as the pitch, zoom, or heading changes.

Parameters:
handler -

addResizeHandler

public HandlerRegistration addResizeHandler(ResizeMapHandler handler)
Developers should trigger this event on the panorama when its div changes size: google.maps.event.trigger(panorama, 'resize').

Parameters:
handler -

addVisibleChangeHandler

public HandlerRegistration addVisibleChangeHandler(VisibleChangeMapHandler handler)
This event is fired when the panorama's visibility changes. The visibility is changed when the Pegman id dragged onto the map, the close button is clicked, or setVisible() is called.

Parameters:
handler -


Follow us on GitHub

Copyright © 2011-2012 Gone Vertical LLC. All Rights Reserved.