org.zkoss.gmaps
Class Gmarker

java.lang.Object
  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zk.ui.HtmlBasedComponent
          extended by org.zkoss.zul.impl.XulElement
              extended by org.zkoss.gmaps.Ginfo
                  extended by org.zkoss.gmaps.Gmarker
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Mapitem, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.sys.ComponentCtrl

public class Gmarker
extends Ginfo

The gmarker of the Gooogle Maps. Since 2.0_6 we support associated icon with the GMarker (see all getIconXxx() and setIconXxx() methods).

Author:
henrichen
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrl
 
Field Summary
 
Fields inherited from class org.zkoss.gmaps.Ginfo
_lat, _lng
 
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
RS_NO_DISPLAY, RS_NO_HEIGHT, RS_NO_WIDTH
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Constructor Summary
Gmarker()
           
Gmarker(java.lang.String content)
           
Gmarker(java.lang.String content, double lat, double lng)
           
 
Method Summary
 int getIconAnchorX()
          Returns the x pixel coordinate relative to the top left corner of the icon image at which this icon is anchored to the map.
 int getIconAnchorY()
          Returns the y pixel coordinate relative to the top left corner of the icon image at which this icon is anchored to the map.
 int getIconDragCrossAnchorX()
          Returns the x pixel coordinate offsets (relative to the iconAnchor) of the cross image when an icon is dragged.
 int getIconDragCrossAnchorY()
          Returns the y pixel coordinate offsets (relative to the iconAnchor) of the cross image when an icon is dragged.
 int getIconDragCrossHeight()
          Returns the pixel height of the cross image when an icon is dragged.
 java.lang.String getIconDragCrossImage()
          Returns the cross image URL when an icon is dragged.
 int getIconDragCrossWidth()
          Returns the pixel width of the cross image when an icon is dragged.
 int getIconHeight()
          Returns the pixel height of the foreground image of the icon.
 java.lang.String getIconImage()
          Returns the foreground image URL of the icon.
 java.lang.String getIconImageMap()
          Return a comma delimitered 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 getIconInfoAnchorX()
          Returns the x pixel coordinate relative to the top left corner of the icon image at which the info window is anchored to this icon.
 int getIconInfoAnchorY()
          Returns the y pixel coordinate relative to the top left corner of the icon image at which the info window is anchored to this icon.
 int getIconMaxHeight()
          Returns the distance pixels in which a marker will visually "rise" vertically when dragged.
 java.lang.String getIconMozPrintImage()
          Returns the URL of the foreground icon image used for printed maps in Firefox/Mozilla.
 java.lang.String getIconPrintImage()
          Returns the URL of the foreground icon image used for printed maps.
 java.lang.String getIconPrintShadow()
          Returns the URL of the shadow image used for printed maps.
 java.lang.String getIconShadow()
          Returns the shadow image URL of the icon.
 int getIconShadowHeight()
          Returns the pixel height of the shadow image.
 int getIconShadowWidth()
          Return the pixel width of the shadow image.
 java.lang.String getIconTransparent()
          Returns the URL of a virtually transparent version of the foreground icon image used to capture click events in Internet Explorer.
 int getIconWidth()
          Returns the pixel width of the foreground image of the icon.
 int getMaxzoom()
          Returns the maximum visible zoom level of this Gmarker (default to 17).
 int getMinzoom()
          Returns the minimum visible zoom level of this Gmarker (default to 0).
 java.lang.String getOuterAttrs()
          Returns the HTML attributes for this tag.
 boolean isDraggingEnabled()
          Returns whether this Gmarker is enabled to drag "INSIDE" the maps; default is true.
 void setDraggingEnabled(boolean b)
          Sets whether this Gmarker is enabled to drag "INSIDE" the maps; default is true.
 void setIconAnchorX(int iconAnchorX)
          Sets the x pixel coordinate relative to the top left corner of the icon image at which this icon is anchored to the map.
 void setIconAnchorY(int iconAnchorY)
          Sets the y pixel coordinate relative to the top left corner of the icon image at which this icon is anchored to the map.
 void setIconDragCrossAnchorX(int iconDragCrossAnchorX)
          Sets the x pixel coordinate offsets (relative to the iconAnchor) of the cross image when an icon is dragged.
 void setIconDragCrossAnchorY(int iconDragCrossAnchorY)
          Sets the y pixel coordinate offsets (relative to the iconAnchor) of the cross image when an icon is dragged.
 void setIconDragCrossHeight(int iconDragCrossHeight)
          Sets the pixel height of the cross image when an icon is dragged.
 void setIconDragCrossImage(java.lang.String iconDragCrossImage)
          Sets the cross image URL when an icon is dragged.
 void setIconDragCrossWidth(int iconDragCrossWidth)
          Sets the pixel width of the cross image when an icon is dragged.
 void setIconHeight(int iconHeight)
          Sets the pixel height of the foreground image of the icon.
 void setIconImage(java.lang.String iconImage)
          Sets the foreground image URL of the icon.
 void setIconImageMap(java.lang.String iconImageMap)
          Sets an comma delimitered 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.
 void setIconInfoAnchorX(int iconInfoAnchorX)
          Sets the x pixel coordinate relative to the top left corner of the icon image at which the info window is anchored to this icon.
 void setIconInfoAnchorY(int iconInfoAnchorY)
          Sets the y pixel coordinate relative to the top left corner of the icon image at which the info window is anchored to this icon.
 void setIconMaxHeight(int iconMaxHeight)
          Sets the distance pixels in which a marker will visually "rise" vertically when dragged.
 void setIconMozPrintImage(java.lang.String iconMozPrintImage)
          Sets the URL of the foreground icon image used for printed maps in Firefox/Mozilla.
 void setIconPrintImage(java.lang.String iconPrintImage)
          Sets the URL of the foreground icon image used for printed maps.
 void setIconPrintShadow(java.lang.String iconPrintShadow)
          Sets the URL of the shadow image used for printed maps.
 void setIconShadow(java.lang.String iconShadow)
          Sets the shadow image URL of the icon.
 void setIconShadowHeight(int iconShadowHeight)
          Sets the pixel height of the shadow image.
 void setIconShadowWidth(int iconShadowWidth)
          Sets the pixel width of the shadow image.
 void setIconSizeHeight(int iconHeight)
          Deprecated. use setIconHeight(int) instead
 void setIconTransparent(java.lang.String iconTransparent)
          Sets the URL of a virtually transparent version of the foreground icon image used to capture click events in Internet Explorer.
 void setIconWidth(int iconWidth)
          Sets the pixel width of the foreground image of the icon.
 void setMaxzoom(int lv)
          Sets the maximum visible zoom level of this Gmarker (max 17).
 void setMinzoom(int lv)
          Sets the minimum visible zoom level of this Gmarker (min 0).
 
Methods inherited from class org.zkoss.gmaps.Ginfo
getContent, getLat, getLng, isChildable, isOpen, setAnchor, setContent, setLat, setLng, setOpen, setParent
 
Methods inherited from class org.zkoss.zul.impl.XulElement
getAction, getActionAttrs, getAllOnClickAttrs, getContext, getInnerAttrs, getPopup, getTooltip, setAction, setContext, setPopup, setTooltip
 
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
focus, getDraggable, getDroppable, getHeight, getLeft, getRealSclass, getRealStyle, getRealStyleFlags, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZIndex, newExtraCtrl, setClass, setDraggable, setDroppable, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZIndex
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addEventHandler, addEventListener, addForward, addForward, addMoved, addSharedAnnotationMap, addSharedEventHandlerMap, appendAsapAttr, appendChild, applyProperties, clone, containsVariable, detach, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getDefinition, getDesktop, getEventHandler, getExtraCtrl, getFellow, getFellowIfAny, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getMoldURI, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getPropagatee, getRoot, getSpaceOwner, getUuid, getVariable, insertBefore, invalidate, isAsapRequired, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onDrawNewChild, onPageAttached, onPageDetached, onWrongValue, redraw, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPage, setPageBefore, setVariable, setVisible, smartUpdate, smartUpdate, smartUpdate, smartUpdateDeferred, toString, unsetVariable
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.zkoss.zk.ui.Component
addEventListener, addForward, addForward, appendChild, applyProperties, clone, containsVariable, detach, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getDefinition, getDesktop, getFellow, getFellowIfAny, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getUuid, getVariable, insertBefore, invalidate, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onDrawNewChild, onPageAttached, onPageDetached, redraw, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, response, setAttribute, setAttribute, setId, setMold, setPage, setPageBefore, setVariable, setVisible, smartUpdate, smartUpdateDeferred, unsetVariable
 

Constructor Detail

Gmarker

public Gmarker()

Gmarker

public Gmarker(java.lang.String content)

Gmarker

public Gmarker(java.lang.String content,
               double lat,
               double lng)
Method Detail

setDraggingEnabled

public void setDraggingEnabled(boolean b)
Sets whether this Gmarker is enabled to drag "INSIDE" the maps; default is true. Note that this property takes precedence than {#link #setDraggable}. If you want to drag Gmarker as other ZK components (that is, you can drag the Gmarker "OUTSIDE" the maps), you have to set this property to "false".

Parameters:
b - whether enable dragging this Gmarker inside the maps.
Since:
2.0_9

isDraggingEnabled

public boolean isDraggingEnabled()
Returns whether this Gmarker is enabled to drag "INSIDE" the maps; default is true. Note that this property takes precedence. If you want to drag Gmarker as other ZK components (that is, you can drag the Gmarker "OUTSIDE" the maps), you have to set this property to "false".

Returns:
whether this Gmarker is enabled to drag "INSIDE" the maps.
Since:
2.0_9

getIconAnchorX

public int getIconAnchorX()
Returns the x pixel coordinate relative to the top left corner of the icon image at which this icon is anchored to the map.

Returns:
x pixel coordinate relative to the top left corner of the icon image
Since:
2.0_6

setIconAnchorX

public void setIconAnchorX(int iconAnchorX)
Sets the x pixel coordinate relative to the top left corner of the icon image at which this icon is anchored to the map. No operation if a value less than -100.

Parameters:
iconAnchorX - x pixel coordinate relative to the top left corner of the icon image
Since:
2.0_6

getIconAnchorY

public int getIconAnchorY()
Returns the y pixel coordinate relative to the top left corner of the icon image at which this icon is anchored to the map.

Returns:
the y pixel coordinate relative to the top left corner of the icon image
Since:
2.0_6

setIconAnchorY

public void setIconAnchorY(int iconAnchorY)
Sets the y pixel coordinate relative to the top left corner of the icon image at which this icon is anchored to the map. No operation if a value less than -100.

Parameters:
iconAnchorY - y pixel coordinate relative to the top left corner of the icon image
Since:
2.0_6

getIconDragCrossAnchorX

public int getIconDragCrossAnchorX()
Returns the x pixel coordinate offsets (relative to the iconAnchor) of the cross image when an icon is dragged.

Returns:
the iconDragCrossAnchorX
Since:
2.0_6

setIconDragCrossAnchorX

public void setIconDragCrossAnchorX(int iconDragCrossAnchorX)
Sets the x pixel coordinate offsets (relative to the iconAnchor) of the cross image when an icon is dragged. No operation if a value less than -100.

Parameters:
iconDragCrossAnchorX - the iconDragCrossAnchorX to set
Since:
2.0_6

getIconDragCrossAnchorY

public int getIconDragCrossAnchorY()
Returns the y pixel coordinate offsets (relative to the iconAnchor) of the cross image when an icon is dragged.

Returns:
the iconDragCrossAnchorX
Since:
2.0_6

setIconDragCrossAnchorY

public void setIconDragCrossAnchorY(int iconDragCrossAnchorY)
Sets the y pixel coordinate offsets (relative to the iconAnchor) of the cross image when an icon is dragged. No operation if a value less than -100.

Parameters:
iconDragCrossAnchorY - the iconDragCrossAnchorY to set
Since:
2.0_6

getIconDragCrossHeight

public int getIconDragCrossHeight()
Returns the pixel height of the cross image when an icon is dragged.

Returns:
the iconDragCrossHeight
Since:
2.0_6

setIconDragCrossHeight

public void setIconDragCrossHeight(int iconDragCrossHeight)
Sets the pixel height of the cross image when an icon is dragged. No operation if a value less than 0.

Parameters:
iconDragCrossHeight - the iconDragCrossHeight to set
Since:
2.0_6

getIconDragCrossImage

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

Returns:
the iconDragCrossImage
Since:
2.0_6

setIconDragCrossImage

public void setIconDragCrossImage(java.lang.String iconDragCrossImage)
Sets the cross image URL when an icon is dragged. No operationi if a null value.

Parameters:
iconDragCrossImage - the iconDragCrossImage to set
Since:
2.0_6

getIconDragCrossWidth

public int getIconDragCrossWidth()
Returns the pixel width of the cross image when an icon is dragged.

Returns:
the iconDragCrossWidth
Since:
2.0_6

setIconDragCrossWidth

public void setIconDragCrossWidth(int iconDragCrossWidth)
Sets the pixel width of the cross image when an icon is dragged. No operation if a value less than 0.

Parameters:
iconDragCrossWidth - the iconDragCrossWidth to set
Since:
2.0_6

getIconImage

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

Returns:
the iconImage URL
Since:
2.0_6

setIconImage

public void setIconImage(java.lang.String iconImage)
Sets the foreground image URL of the icon. No operationi if a null value.

Parameters:
iconImage - the iconImage URL to set
Since:
2.0_6

getIconImageMap

public java.lang.String getIconImageMap()
Return a comma delimitered 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.

Returns:
the iconImageMap
Since:
2.0_6

setIconImageMap

public void setIconImageMap(java.lang.String iconImageMap)
Sets an comma delimitered 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. No operationi if a null value. Google Maps.

Parameters:
iconImageMap - the iconImageMap to set
Since:
2.0_6

getIconInfoAnchorX

public int getIconInfoAnchorX()
Returns the x pixel coordinate relative to the top left corner of the icon image at which the info window is anchored to this icon.

Returns:
the iconInfoAnchorX
Since:
2.0_6

setIconInfoAnchorX

public void setIconInfoAnchorX(int iconInfoAnchorX)
Sets the x pixel coordinate relative to the top left corner of the icon image at which the info window is anchored to this icon. No operation if a value less than -100.

Parameters:
iconInfoAnchorX - the iconInfoAnchorX to set
Since:
2.0_6

getIconInfoAnchorY

public int getIconInfoAnchorY()
Returns the y pixel coordinate relative to the top left corner of the icon image at which the info window is anchored to this icon.

Returns:
the iconInfoAnchorY
Since:
2.0_6

setIconInfoAnchorY

public void setIconInfoAnchorY(int iconInfoAnchorY)
Sets the y pixel coordinate relative to the top left corner of the icon image at which the info window is anchored to this icon. No operation if a value less than -100.

Parameters:
iconInfoAnchorY - the iconInfoAnchorY to set
Since:
2.0_6

getIconMaxHeight

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

Returns:
the iconMaxHeight
Since:
2.0_6

setIconMaxHeight

public void setIconMaxHeight(int iconMaxHeight)
Sets the distance pixels in which a marker will visually "rise" vertically when dragged. No operation if a value less than 0.

Parameters:
iconMaxHeight - the iconMaxHeight to set
Since:
2.0_6

getIconMozPrintImage

public java.lang.String getIconMozPrintImage()
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 image.

Returns:
the iconMozPrintImage
Since:
2.0_6

setIconMozPrintImage

public void setIconMozPrintImage(java.lang.String iconMozPrintImage)
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 image. No operation if a null value.

Parameters:
iconMozPrintImage - the iconMozPrintImage to set
Since:
2.0_6

getIconPrintImage

public java.lang.String getIconPrintImage()
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 iconPrintImage
Since:
2.0_6

setIconPrintImage

public void setIconPrintImage(java.lang.String iconPrintImage)
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. No operation if a null value.

Parameters:
iconPrintImage - the iconPrintImage to set
Since:
2.0_6

getIconPrintShadow

public java.lang.String getIconPrintShadow()
Returns the URL of the shadow image used for printed maps. It should be a GIF image since most browsers cannot print PNG images.

Returns:
the iconPrintShadow
Since:
2.0_6

setIconPrintShadow

public void setIconPrintShadow(java.lang.String iconPrintShadow)
Sets the URL of the shadow image used for printed maps. It should be a GIF image since most browsers cannot print PNG images. No operationi if a null value.

Parameters:
iconPrintShadow - the iconPrintShadow to set
Since:
2.0_6

getIconShadow

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

Returns:
the iconShadow
Since:
2.0_6

setIconShadow

public void setIconShadow(java.lang.String iconShadow)
Sets the shadow image URL of the icon. No operationi if a null value.

Parameters:
iconShadow - the iconShadow to set
Since:
2.0_6

getIconShadowHeight

public int getIconShadowHeight()
Returns the pixel height of the shadow image.

Returns:
the iconShadowHeight
Since:
2.0_6

setIconShadowHeight

public void setIconShadowHeight(int iconShadowHeight)
Sets the pixel height of the shadow image. No operation if a value less than 0.

Parameters:
iconShadowHeight - the iconShadowHeight to set
Since:
2.0_6

getIconShadowWidth

public int getIconShadowWidth()
Return the pixel width of the shadow image.

Returns:
the iconShadowWidth
Since:
2.0_6

setIconShadowWidth

public void setIconShadowWidth(int iconShadowWidth)
Sets the pixel width of the shadow image. No operation if a value less than 0.

Parameters:
iconShadowWidth - the iconShadowWidth to set
Since:
2.0_6

getIconHeight

public int getIconHeight()
Returns the pixel height of the foreground image of the icon.

Returns:
the iconHeight
Since:
2.0_6

setIconHeight

public void setIconHeight(int iconHeight)
Sets the pixel height of the foreground image of the icon. No operation if a value less than 0.

Parameters:
iconHeight - the iconHeight to set
Since:
2.0_9

setIconSizeHeight

public void setIconSizeHeight(int iconHeight)
Deprecated. use setIconHeight(int) instead

Sets the pixel height of the foreground image of the icon. No operation if a value less than 0.

Parameters:
iconHeight - the iconSizeHeight to set
Since:
2.0_6

getIconWidth

public int getIconWidth()
Returns the pixel width of the foreground image of the icon.

Returns:
the iconWidth
Since:
2.0_6

setIconWidth

public void setIconWidth(int iconWidth)
Sets the pixel width of the foreground image of the icon. No operation if a value less than 0.

Parameters:
iconWidth - the icon width in pixel to set
Since:
2.0_6

getIconTransparent

public java.lang.String getIconTransparent()
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 iconTransparent
Since:
2.0_6

setIconTransparent

public void setIconTransparent(java.lang.String iconTransparent)
Sets 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. No operation if a null value.

Parameters:
iconTransparent - the iconTransparent to set
Since:
2.0_6

getMaxzoom

public int getMaxzoom()
Returns the maximum visible zoom level of this Gmarker (default to 17).

Since:
2.0_8

setMaxzoom

public void setMaxzoom(int lv)
Sets the maximum visible zoom level of this Gmarker (max 17).

Since:
2.0_8

getMinzoom

public int getMinzoom()
Returns the minimum visible zoom level of this Gmarker (default to 0).

Since:
2.0_8

setMinzoom

public void setMinzoom(int lv)
Sets the minimum visible zoom level of this Gmarker (min 0).

Since:
2.0_8

getOuterAttrs

public java.lang.String getOuterAttrs()
Returns the HTML attributes for this tag.

Used only for component development, not for application developers.

Overrides:
getOuterAttrs in class Ginfo
Since:
2.0_6


Copyright © 2005-2007 Potix Corporation. All Rights Reserved.