com.google.gwt.maps.client.overlay
Class TrafficOverlay
java.lang.Object
com.google.gwt.maps.client.overlay.Overlay
com.google.gwt.maps.client.overlay.Overlay.ConcreteOverlay
com.google.gwt.maps.client.overlay.TrafficOverlay
public final class TrafficOverlay
- extends Overlay.ConcreteOverlay
A traffic overlay object displays road traffic information. The traffic
overlay will only display traffic information for supported cities.
To add a traffic overlay to the map:
TrafficOverlay traffic = new TrafficOverlay();
map.addOverlay(traffic);
Fields inherited from class com.google.gwt.maps.client.overlay.Overlay |
jsoPeer |
Methods inherited from class com.google.gwt.maps.client.overlay.Overlay |
getZIndex |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TrafficOverlay
public TrafficOverlay()
- Creates a new traffic overlay.
Use
MapWidget.addOverlay(Overlay)
to add
this overlay to the map.
addTrafficOverlayChangedHandler
public void addTrafficOverlayChangedHandler(TrafficOverlayChangedHandler handler)
- This event is fired when the state of traffic data changes within the
current viewport. This event may be fired either when moving the map
between areas with and without traffic data or when the addition of a
TrafficOverlay
to the map results in traffic data appearing within
the current viewport.
- Parameters:
handler
- the handler to call when this event fires.
removeTrafficOverlayHandler
public void removeTrafficOverlayHandler(TrafficOverlayChangedHandler handler)
- Removes a single handler of this map previously added with
addTrafficOverlayChangedHandler(TrafficOverlayChangedHandler)
.
- Parameters:
handler
- the handler to remove
setVisible
public void setVisible(boolean visible)
- Shows or hides this overlay.
- Parameters:
visible
- true
to show the overlay, false to hide.