Class Index

Global Variables

Classes


Class MVMapDecoration

MVMapDecoration defines a stationary map decoration feature on the map. The map decoration object is not moved when the map is dragged or recentered. Its size is not changed when the map is zoomed in or out. The MVMapDecoration is displayed above all base map and FOI layers.

The positioning of the MVMapDecoration object is specified by its position relative to the upper-left corner from the map. The relative position is not specified in pixels, instead it is specified in the percentage relative to the map window size.

The horizontal position is specified by parameter left, which should be a float number in the range of 0-1. The absolute offset of the MVMapDecoration object center from the left map window border in pixels is left*map_window_width.

The vertical position is specified by parameter top, which should be a float number in the range of 0-1. The absolute offset of the MVMapDecoration object center from the top map window border in pixels is top*map_window_height.

Class Summary
Constructor Attributes Constructor Name and Description
 
MVMapDecoration(content, left, top, width, height, xOffset, yOffset)
Method Summary
Method Attributes Method Name and Description
 
addEventListener(eventType, listener)
This method is deprecated.
 
attachEventListener(eventType, listener)
This method attaches an event listener to the MVMapDecoration.
 
This method minimizes the map decoration object and displays it as a minimized icon.
 
detachEventListener(event, listener)
This method detaches an event listener that has previously been attached to the MVMapDecoration by #attachEventListener.
 
This method enables event propagation from the map decoration.
 
This method returns the container DIV object of the map decoration.
 
This method gets the current screen location of the map decoration.
 
This method returns whether the map decoration is collapsed.
 
This method gets whether the map decoration can be moved by dragging it using the mouse.
 
This method gets the visibility of the map decoration object
 
setCollapsible(collapsible, minimizeWhenCreated, style)
This methods sets whether the map decoration object is collapsible.
 
setDraggable(movable)
This method sets whether the user can drag and move the map decoration using the mouse.
 
setEventListener(eventType, listener)
This method is deprecated.
 
setMouseCursorStyle(cursorStyle)
This method sets the mouse cursor style when the mouse is over the map decoration object.
 
setOffset(xOffset, yOffset)
This method sets the pixel offset of the map decoration object relative to its position specified by the left and top parameter in the constructor.
 
setPosition(left, top, xOffset, yOffset)
This method sets the position of the map decoration object relative to its position specified by the left and top parameter in the constructor.
 
setPrintable(printable)
This methods sets whether the map decoration will be printed when the MVMapView.print method is called.
 
setTitleBar(titleText, titleIconURL, titleInfoTip)
This methods sets the title bar content of the map decoration.
 
setVisible(visible)
This method sets the visibility of the map decoration object
Class Detail
MVMapDecoration(content, left, top, width, height, xOffset, yOffset)
Parameters:
{Object} content
the content to be displayed by the map decoration feature. It can be an html String that specifies the html code or a map control object in one of the following types, MVScaleBar, MVNavigationPanel and MVOverviewMap.
{float} left
left specifies the horizontal position of the map decoration object relative to the left border of the map window.
{float} top
top specifies the vertical position of the map decoration object relative to the top border of the map window.
{int} width
width specifies the width(in screen pixels) of the map decoration.
{int} height
height specifies the height(in screen pixels) of the map decoration.
{int} xOffset
xOffset is an integer that specifies the horizontal offset in pixels
{int} yOffset
yOffset is an integer that specifies the vertical offset in pixels
Returns:
None
Method Detail
{void} addEventListener(eventType, listener)
This method is deprecated. Please use #setEventListener instead.
Parameters:
eventType
listener

{void} attachEventListener(eventType, listener)
This method attaches an event listener to the MVMapDecoration. One of the following types of event listeners can be associated with the MVMapDecoration through this method: MVEvent.MOUSE_CLICK, MVEvent.MOUSE_OVER, MVEvent.MOUSE_OUT, MVEvent.COLLAPSE, MVEvent.AFTER_COLLAPSE, MVEvent.RESTORE, MVEvent.AFTER_RESTORE, MVEvent.DRAG_START, MVEvent.DRAG and MVEvent.DRAG_END.
Parameters:
{String} eventType
eventType specifies the event type.
{Function} listener
listener specifies the listener function.
Returns:
None

{void} collapse()
This method minimizes the map decoration object and displays it as a minimized icon.
Returns:
None

{void} detachEventListener(event, listener)
This method detaches an event listener that has previously been attached to the MVMapDecoration by #attachEventListener.
Parameters:
{String} event
a String that specifies the type of event to be handled by the listener. It can be either MVEvent.MOUSE_CLICK, MVEvent.MOUSE_OVER, MVEvent.MOUSE_OUT, MVEvent.COLLAPSE, MVEvent.AFTER_COLLAPSE, MVEvent.RESTORE, MVEvent.AFTER_RESTORE , MVEvent.DRAG_START, MVEvent.DRAG and MVEvent.DRAG_END.
{Function} listener
the reference to listener function.
Returns:
none

{void} enableEventPropagation(enabled)
This method enables event propagation from the map decoration. When event propagation is enabled, events such as mouse clicks and keyboard strokes are propagated to the rest of the map client instance. When event propagation is diabled, events are trapped inside the map decoration and not propapated outside. The latter is usally prefered when the map decoration needs to handle some events that should only occur to the map decoration itself. By default, event propagation is disabled.
Parameters:
{boolean} enabled
true (to enable event propagation) or false (to disable event propagation).
Returns:
None

{object(DIV)} getContainerDiv()
This method returns the container DIV object of the map decoration. All HTML content of the map decoration is inside this container DIV object. Applications can add or modify the HTML content of the map decoration by manipulating the DIV object through JavaScript DOM tree operations.
Returns:
The container DIV

{Object} getPosition()
This method gets the current screen location of the map decoration. The result is an object with attribute x and y, which specify the relative offsets from the upper-left corner of the map window on horizontal and vertical dimensions.
Returns:
an object that specifies the screen location with attributes x and y.

{boolean} isCollapsed()
This method returns whether the map decoration is collapsed.
Returns:
true if collapsed, false if not collapsed.

{Boolean} isDraggable()
This method gets whether the map decoration can be moved by dragging it using the mouse.
Returns:
True if the map decoration is draggable, false if the map decoration is not draggable.

{Boolean} isVisible()
This method gets the visibility of the map decoration object
Returns:
True if the map decoration is currently visible, false if the map decoration is not currently visible

{void} setCollapsible(collapsible, minimizeWhenCreated, style)
This methods sets whether the map decoration object is collapsible.

If it is collapsible, the map decoration object can be minimized and displayed as a minimized icon by clicking the minimize button. It can be then restored to its original size by clicking the minimized icon. Currently the position parameters specified in the MVMapDecoration constructor do not have any effect on a collapsible map decoration, which is always placed at the lower right corner of the map.

If the map decoration object is collapsible, this method can set its visual style. The style parameter is an object that specifies various aspects, such as the map decoration window border, title bar, minimize button and restore button. The object has the following attributes:

Here is an example.

   var style = {
     borderStyle :"1px solid #636661",
     titleBgImg  :"/images/title_bg.png", 
     titleBgImgMO:"/images/title_bg_over.png", 
     tileBgImgMD :"/images/title_bg_over.png",
     minBtnImg   :"/images/button_minimize.gif", 
     minBtnImgMO :"/images/button_minimize.gif", 
     minBtnImgMD :"/images/button_minimize.gif",
     resBtnImg   :"/images/button_restore.gif", 
     resBtnImgMO :"/images/button_restore.gif", 
     resBtnImgMD :"/images/button_restore.gif"
   } ;
   
Parameters:
{Boolean} collapsible
True if the map decoration is collapsible. The default value is false
{Boolean} minimizeWhenCreated
True if the map decoration is minimized when the map decoration is added to the map. The default value is false.
{Obect} style
the style object
Returns:
None

{void} setDraggable(movable)
This method sets whether the user can drag and move the map decoration using the mouse.
Parameters:
{boolean} movable
whether the map decoration can be dragged.
Returns:
None

setEventListener(eventType, listener)
This method is deprecated. Please use #attachEventListener instead.
Parameters:
eventType
listener

{void} setMouseCursorStyle(cursorStyle)
This method sets the mouse cursor style when the mouse is over the map decoration object.
Parameters:
{String} cursorStyle
A string that specifies the cursor style to be used, which must be one of the standard CSS cursor style names such as "crosshair", "pointer" and "move".
Returns:
None

{void} setOffset(xOffset, yOffset)
This method sets the pixel offset of the map decoration object relative to its position specified by the left and top parameter in the constructor.
Parameters:
{int} xOffset
xOffset is an integer that specifies the horizontal offset in pixels
{int} yOffset
yOffset is an integer that specifies the vertical offset in pixels
Returns:
None

{void} setPosition(left, top, xOffset, yOffset)
This method sets the position of the map decoration object relative to its position specified by the left and top parameter in the constructor.
Parameters:
{float} left
left specifies the horizontal position of the map decoration object relative to the left border of the map window.
{float} top
top specifies the vertical position of the map decoration object relative to the top border of the map window.
{int} xOffset
xOffset is an integer that specifies the horizontal offset in pixels
{int} yOffset
yOffset is an integer that specifies the vertical offset in pixels
Returns:
None

{void} setPrintable(printable)
This methods sets whether the map decoration will be printed when the MVMapView.print method is called.
Parameters:
{Boolean} printable
if the parameter is true, the map decoration could be printed when you call the mapview.print function. The default value is false
Returns:
None

{void} setTitleBar(titleText, titleIconURL, titleInfoTip)
This methods sets the title bar content of the map decoration. The title bar is effective only when the map decoration is collapsible.
Parameters:
{String} titleText
a html string that specifies the title text that is displayed in the center of the title bar.
{String} titleIconURL
the URL of the title icon image that is displayed at the left corner of the title bar. The title icon is also displayed when the map decoration is minimized. If this parameter is omitted, the minimization icon(down arrow) is displayed in its place.
{String} titleInfoTip
the info tip string that is displayed when the mouse moves over the title bar.
Returns:
None

{void} setVisible(visible)
This method sets the visibility of the map decoration object
Parameters:
{Boolean} visible
visible is a Boolean true (make the map decoration object visible) or false (make the map decoration object not visible).
Returns:
None

Documentation generated by JsDoc Toolkit 2.1.0 on Fri Feb 25 2011 12:34:45 GMT-0500 (EST)