com.google.gwt.maps.client.overlay
Class MarkerOptions

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.google.gwt.maps.client.overlay.MarkerOptions

public final class MarkerOptions
extends com.google.gwt.core.client.JavaScriptObject

Instances of this class are used in the Marker constructor options argument.


Constructor Summary
protected MarkerOptions()
          JavaScript overlays require a protected constructor.
 
Method Summary
static MarkerOptions newInstance()
           
static MarkerOptions newInstance(Icon icon)
           
 void setAutoPan(boolean autoPan)
          Auto-pan the map as you drag the marker near the edge.
 void setBounceGravity(double bounceGravity)
          When finishing dragging, this number is used to define the acceleration rate of the marker during the bounce down to earth.
 void setBouncy(boolean bouncy)
          Toggles whether or not the marker should bounce up and down after it finishes dragging.
 void setClickable(boolean clickable)
          Toggles whether or not the marker is clickable.
 void setDragCrossMove(boolean dragCrossMove)
          When dragging markers normally, the marker floats up and away from the cursor.
 void setDraggable(boolean draggable)
          Toggles whether or not the marker will be draggable by users.
 void setIcon(Icon icon)
          Chooses the Icon for this class.
 void setTitle(java.lang.String title)
          This string will appear as tooltip on the marker, i.e.
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MarkerOptions

protected MarkerOptions()
JavaScript overlays require a protected constructor.

Method Detail

newInstance

public static MarkerOptions newInstance()

newInstance

public static MarkerOptions newInstance(Icon icon)

setAutoPan

public void setAutoPan(boolean autoPan)
Auto-pan the map as you drag the marker near the edge. If the marker is draggable the default value for this option is true.

Parameters:
autoPan - true to turn on auto pan.

setBounceGravity

public void setBounceGravity(double bounceGravity)
When finishing dragging, this number is used to define the acceleration rate of the marker during the bounce down to earth. The default value for this option is 1.

Parameters:
bounceGravity - number used to define the acceleration rate of the marker during the bounce.

setBouncy

public void setBouncy(boolean bouncy)
Toggles whether or not the marker should bounce up and down after it finishes dragging. The default value for this option is false

Parameters:
bouncy - true to set the marker to be bouncy.

setClickable

public void setClickable(boolean clickable)
Toggles whether or not the marker is clickable. Markers that are not clickable or draggable are inert, consume less resources and do not respond to any events. The default value for this option is true, i.e. if the option is not specified, the marker will be clickable.

Parameters:
clickable - whether or not the marker is clickable.

setDragCrossMove

public void setDragCrossMove(boolean dragCrossMove)
When dragging markers normally, the marker floats up and away from the cursor. Setting this value to true keeps the marker underneath the cursor, and moves the cross downwards instead. The default value for this option is false.

Parameters:
dragCrossMove - set to true to keep the marker underneath the cursor when dragged.

setDraggable

public void setDraggable(boolean draggable)
Toggles whether or not the marker will be draggable by users. Markers set up to be dragged require more resources to set up than markers that are clickable. Any marker that is draggable is also clickable, bouncy and auto-pan enabled by default. The default value for this option is false
Parameters:
draggable - whether or not the marker will be draggable by users.

setIcon

public void setIcon(Icon icon)
Chooses the Icon for this class. If not specified, Icon.DEFAULT_ICON is used.

Parameters:
icon - sets the icon for this class.

setTitle

public void setTitle(java.lang.String title)
This string will appear as tooltip on the marker, i.e. it will work just as the title attribute on HTML elements.

Parameters:
title - a string to set as the tooltip on the marker.