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

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

public class Icon
extends com.google.gwt.core.client.JavaScriptObject

Wrapper for the Maps API GIcon class, which is like a marker, but allows you to change the shape and other properties.


Field Summary
static Icon DEFAULT_ICON
           
 
Constructor Summary
protected Icon()
           
 
Method Summary
static Icon getDefaultIcon()
           
 Point getDragCrossAnchor()
          Returns the pixel coordinate offsets (relative to the the value getIconAnchor()) of the cross image when an icon is dragged.
 java.lang.String getDragCrossImageUrl()
          Returns the cross image URL when an icon is dragged.
 Size getDragCrossSize()
          Returns the pixel size of the cross image when an icon is dragged.
 Point getIconAnchor()
          Returns the pixel coordinate relative to the top left corner of the icon image at which this icon is anchored to the map.
 Size getIconSize()
          Returns the pixel size of the foreground image of the icon.
 com.google.gwt.core.client.JsArrayInteger getImageMap()
          Returns an array of integers representing the x/y coordinates of the image map we should use to specify the clickable part of the icon image in browsers other than Internet Explorer.
 int[] getImageMapArray()
          Returns an array of integers representing the x/y coordinates of the image map we should use to specify the clickable part of the icon image in browsers other than Internet Explorer.
 java.lang.String getImageURL()
          Returns the foreground image URL of the icon.
 Point getInfoWindowAnchor()
          Returns the pixel coordinate relative to the top left corner of the icon image at which the info window is anchored to this icon.
 int getMaxHeight()
          Returns the distance in pixels in which a marker will visually "rise" vertically when dragged.
 java.lang.String getMozPrintImageURL()
          Returns the URL of the foreground icon image used for printed maps in Firefox/Mozilla.
 java.lang.String getPrintImageURL()
          Returns the URL of the foreground icon image used for printed maps.
 Size getShadowSize()
          Returns the pixel size of the shadow image.
 java.lang.String getShadowURL()
          Returns the shadow image URL of the icon.
 java.lang.String getTransparentImageURL()
          Returns the URL of a virtually transparent version of the foreground icon image used to capture click events in Internet Explorer.
static Icon newInstance()
          Construct a new Icon object.
static Icon newInstance(Icon icon)
          Construct an icon from an existing Icon object.
static Icon newInstance(java.lang.String imageUrl)
          Construct an icon from an image loaded from a URL.
 void setDragCrossAnchor(Point anchor)
          Sets the pixel coordinate offsets relative to the the value getIconAnchor()) of the cross image when an icon is dragged.
 void setDragCrossImageURL(java.lang.String url)
          Sets the cross image URL when an icon is dragged.
 void setDragCrossSize(Size size)
          Sets the pixel size of the cross image when an icon is dragged.
 void setIconAnchor(Point anchor)
          Sets the pixel coordinate relative to the top left corner of the icon image at which this icon is anchored to the map.
 void setIconSize(Size size)
          Sets the pixel size of the foreground image of the icon.
 void setImageMap(int[] imageMap)
          Sets the clickable part of the icon image in browsers other than Internet Explorer.
 void setImageMap(com.google.gwt.core.client.JsArrayInteger imageMap)
          Sets the clickable part of the icon image in browsers other than Internet Explorer.
 void setImageURL(java.lang.String url)
          Sets the foreground image URL of the icon.
 void setInfoWindowAnchor(Point anchor)
          Sets the pixel coordinate relative to the top left corner of the icon image at which the info window is anchored to this icon.
 void setMaxHeight(int height)
          Sets the distance in pixels in which a marker will visually "rise" vertically when dragged.
 void setMozPrintImageURL(java.lang.String url)
          Sets the URL of the foreground icon image used for printed maps in Firefox/Mozilla.
 void setPrintImageURL(java.lang.String url)
          Sets the URL of the foreground icon image used for printed maps.
 void setShadowSize(Size size)
          Sets the pixel size of the shadow image.
 void setShadowURL(java.lang.String url)
          Sets the shadow image URL of the icon.
 void setTransparentImageURL(java.lang.String url)
          The URL of a virtually transparent version of the foreground icon image used to capture click events in Internet Explorer.
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_ICON

public static final Icon DEFAULT_ICON
Constructor Detail

Icon

protected Icon()
Method Detail

getDefaultIcon

public static Icon getDefaultIcon()

newInstance

public static Icon newInstance()
Construct a new Icon object.


newInstance

public static Icon newInstance(Icon icon)
Construct an icon from an existing Icon object.

Parameters:
icon - the object to copy.

newInstance

public static Icon newInstance(java.lang.String imageUrl)
Construct an icon from an image loaded from a URL.

Parameters:
imageUrl - a URL to the image to use for the icon.

getDragCrossAnchor

public final Point getDragCrossAnchor()
Returns the pixel coordinate offsets (relative to the the value getIconAnchor()) of the cross image when an icon is dragged.

Returns:
the pixel coordinate offsets relative to the the value getIconAnchor()) of the cross image when an icon is dragged.

getDragCrossImageUrl

public final java.lang.String getDragCrossImageUrl()
Returns the cross image URL when an icon is dragged.

Returns:
the cross image URL when an icon is dragged.

getDragCrossSize

public final Size getDragCrossSize()
Returns the pixel size of the cross image when an icon is dragged.

Returns:
the pixel size of the cross image when an icon is dragged.

getIconAnchor

public final Point getIconAnchor()
Returns the pixel coordinate relative to the top left corner of the icon image at which this icon is anchored to the map.

Returns:
the pixel coordinate relative to the top left corner of the icon image at which this icon is anchored to the map.

getIconSize

public final Size getIconSize()
Returns the pixel size of the foreground image of the icon.

Returns:
the pixel size of the foreground image of the icon.

getImageMap

public final com.google.gwt.core.client.JsArrayInteger getImageMap()
Returns an array of integers representing the x/y coordinates of the image map we should use to specify the clickable part of the icon image in browsers other than Internet Explorer. See getTransparentImageURL() for Internet Explorer.

Returns:
an array of integers representing the x/y coordinates of the image map we should use to specify the clickable part of the icon image in browsers other than Internet Explorer.

getImageMapArray

public final int[] getImageMapArray()
Returns an array of integers representing the x/y coordinates of the image map we should use to specify the clickable part of the icon image in browsers other than Internet Explorer. See getTransparentImageURL() for Internet Explorer.

Returns:
an array of integers representing the x/y coordinates of the image map we should use to specify the clickable part of the icon image in browsers other than Internet Explorer.

getImageURL

public final java.lang.String getImageURL()
Returns the foreground image URL of the icon.

Returns:
the foreground image URL of the icon.

getInfoWindowAnchor

public final Point getInfoWindowAnchor()
Returns the pixel coordinate relative to the top left corner of the icon image at which the info window is anchored to this icon.

Returns:
the pixel coordinate relative to the top left corner of the icon image at which the info window is anchored to this icon.

getMaxHeight

public final int getMaxHeight()
Returns the distance in pixels in which a marker will visually "rise" vertically when dragged.

Returns:
the distance in pixels in which a marker will visually "rise" vertically when dragged.

getMozPrintImageURL

public final java.lang.String getMozPrintImageURL()
Returns the URL of the foreground icon image used for printed maps in Firefox/Mozilla. It must be the same size as the main icon image given by setImageURL(String). This method is needed because of browser differences in Mozilla/Firefox.

Returns:
the URL used for printing this icon in Mozilla.

getPrintImageURL

public final java.lang.String getPrintImageURL()
Returns the URL of the foreground icon image used for printed maps. It must be the same size as the main icon image given by image.

Returns:
the URL of the foreground icon image used for printed maps. It must be the same size as the main icon image given by image.

getShadowSize

public final Size getShadowSize()
Returns the pixel size of the shadow image.

Returns:
the pixel size of the shadow image.

getShadowURL

public final java.lang.String getShadowURL()
Returns the shadow image URL of the icon.

Returns:
the shadow image URL of the icon.

getTransparentImageURL

public final java.lang.String getTransparentImageURL()
Returns the URL of a virtually transparent version of the foreground icon image used to capture click events in Internet Explorer. This image should be a 24-bit PNG version of the main icon image with 1% opacity, but the same shape and size as the main icon.

Returns:
the URL of a virtually transparent version of the foreground icon image used to capture click events in Internet Explorer. This image should be a 24-bit PNG version of the main icon image with 1% opacity, but the same shape and size as the main icon.

setDragCrossAnchor

public final void setDragCrossAnchor(Point anchor)
Sets the pixel coordinate offsets relative to the the value getIconAnchor()) of the cross image when an icon is dragged.

Parameters:
anchor - the pixel coordinate offsets relative to the the value getIconAnchor()) of the cross image when an icon is dragged.

setDragCrossImageURL

public final void setDragCrossImageURL(java.lang.String url)
Sets the cross image URL when an icon is dragged.

Parameters:
url - the cross image URL when an icon is dragged.

setDragCrossSize

public final void setDragCrossSize(Size size)
Sets the pixel size of the cross image when an icon is dragged.

Parameters:
size - the pixel size of the cross image when an icon is dragged.

setIconAnchor

public final void setIconAnchor(Point anchor)
Sets the pixel coordinate relative to the top left corner of the icon image at which this icon is anchored to the map.

Parameters:
anchor - the pixel coordinate relative to the top left corner of the icon image at which this icon is anchored to the map.

setIconSize

public final void setIconSize(Size size)
Sets the pixel size of the foreground image of the icon.

Parameters:
size - The pixel size of the foreground image of the icon.

setImageMap

public final void setImageMap(int[] imageMap)
Sets the clickable part of the icon image in browsers other than Internet Explorer. See setTransparentImageURL(String) for Internet Explorer.

Parameters:
imageMap - an array of integers representing the x/y coordinates of the image map we should use to specify the clickable part of the icon image in browsers other than Internet Explorer.

setImageMap

public final void setImageMap(com.google.gwt.core.client.JsArrayInteger imageMap)
Sets the clickable part of the icon image in browsers other than Internet Explorer. See setTransparentImageURL(String) for Internet Explorer.

Parameters:
imageMap - an array of integers representing the x/y coordinates of the image map we should use to specify the clickable part of the icon image in browsers other than Internet Explorer.

setImageURL

public final void setImageURL(java.lang.String url)
Sets the foreground image URL of the icon.

Parameters:
url - the foreground image URL of the icon.

setInfoWindowAnchor

public final void setInfoWindowAnchor(Point anchor)
Sets the pixel coordinate relative to the top left corner of the icon image at which the info window is anchored to this icon.

Parameters:
anchor - the pixel coordinate relative to the top left corner of the icon image at which the info window is anchored to this icon.

setMaxHeight

public final void setMaxHeight(int height)
Sets the distance in pixels in which a marker will visually "rise" vertically when dragged.

Parameters:
height - the distance in pixels in which a marker will visually "rise" vertically when dragged.

setMozPrintImageURL

public final void setMozPrintImageURL(java.lang.String url)
Sets the URL of the foreground icon image used for printed maps in Firefox/Mozilla. It must be the same size as the main icon image given by setImageURL(String). This method is needed because of browser differences in Mozilla/Firefox.

Parameters:
url - the URL of the foreground icon image used for printed maps in Firefox/Mozilla.

setPrintImageURL

public final void setPrintImageURL(java.lang.String url)
Sets the URL of the foreground icon image used for printed maps. It must be the same size as the main icon image given by image.

Parameters:
url - the URL of the foreground icon image used for printed maps.

setShadowSize

public final void setShadowSize(Size size)
Sets the pixel size of the shadow image.

Parameters:
size - the pixel size of the shadow image.

setShadowURL

public final void setShadowURL(java.lang.String url)
Sets the shadow image URL of the icon.

Parameters:
url - the shadow image URL of the icon.

setTransparentImageURL

public final void setTransparentImageURL(java.lang.String url)
The URL of a virtually transparent version of the foreground icon image used to capture click events in Internet Explorer. This image should be a 24-bit PNG version of the main icon image with 1% opacity, but the same shape and size as the main icon. Note: If you set this value, you must also supply values for setImageMap(int[]).

Parameters:
url - URL of a virtually transparent version of the foreground icon image used to capture click events in Internet Explorer.