Class MMViewer

Object
   |
   +--MMViewer
Direct Known Subclasses:
MultimapViewer

class MMViewer

Defined in MultimapAPI


Constructor Summary
MMViewer ( map, div_element )
            This is the base mapviewer class.
 
Method Summary
 boolean addEventHandler( <String> eventType, <Function> handlerFunction )
           Adds an event handler.
 boolean addOverlay( <MMOverlay> overlay )
           A function to (re)display an overlay (marker/info box) that you have a reference for but have previously removed from the mapviewer.
 void addTileOverlayCallback( <Function> callback_function )
           Adds an image overlay callback function.
 void addWidget( <MMWidget> widget )
           Adds a Widget to the mapviewer.
 void assignIgnoreEvents( <HTMLElement> element )
           Sets up handlers for a HTML element to stop the mapviewer responding.
 void drawAndPositionMap( <MMLocation> location )
           Draws a map centered on a specific position.
 MMPoint geoPosToContainerPixels( <MMLatLon> position )
           Gives the position within the mapviewer of the given position given in an appropriate coordinate system.
 MMLocation getAutoScaleLocation( <Array> entries )
           Returns the correct scale and centerpoint to fit the set of points or markers in the mapviewer.
 Array getAvailableZoomFactors()
           Function to retrieve the range of available zoom factors.
 MMDimensions getBrowserDimensions()
           Function for getting the dimensions of the browser, uses a number of methods so should work in all browsers supported by the mapviewer.
 MMDimensions getDimensions()
           A method to retrieve the dimensions of the mapviewer.
 boolean getDraggable()
           Gets the current value for the 'draggable' property.
 MMBox getInnerDimensions()
           A method to retrieve the inner dimensions of the mapviewer.
 boolean getKeyboardPanning()
           Retrieves the setting of the keyboard panning option.
 boolean getMouseWheelZoom()
           Retrieves the setting of the mousewheel zoom option.
 HTMLDivElement getNamedLayer( <String> name, <Integer> zIndex )
           Gets a named layer for drawing overlays on.
 boolean getSmoothPanning()
           Retrieves the current value for the smooth panning setting.
 Object getXMLHTTPRequest()
           Returns an XMLHTTPRequest object.
 boolean getZoomDoubleClickable()
           Gets the current value for the 'zoom doubleclickable' property.
 boolean getZoomDraggable()
           Gets the current value for the 'zoom draggable' property.
 integer getZoomFactor()
           Function to return the current zoom_factor that the map is set to.
 void goToPosition( <MMLocation> new_pos, <integer> zoom_factor, <String> reason, <boolean> no_reset )
           Centers the map on a new geographical position.
 void moveMap( <MMPoint> new_step, <String> reason )
           Move the map to a specified pixel offset.
 void moveMapMeters( <MMPoint> new_step, <String> reason )
           Moves the map to a position a number of meters away.
 void panToPosition( <MMLocation> new_pos, <String> reason )
           Allows to smoothly pan to a location, no matter how far away it is.
 Object redisplayOverlay( overlay )
           redisplayOverlay is now an alias to addOverlay().
 void removeAllOverlays()
           A function to remove all overlays from the mapviewer that have been added by createMarker, createInfoBox and addOverlay().
 boolean removeEventHandler( <String> eventType, <Function> handlerFunction )
           Removes an event handler for the given type.
 void removeOverlay( <MMOverlay> overlay )
           A function to remove an overlay from the mapviewer.
 void removeTileOverlayCallback( <Function> callback_function )
           Removes an image overlay callback function.
 void removeWidget( <MMWidget> widget )
           Removes a widget from the mapviewer.
 MMLocation resetPosition()
           Resets the position of the map to the last requested position.
 void resize( )
           This function alerts the mapviewer to a change in container size.
 void setDraggable( <boolean> draggable )
           This function sets the 'draggable' property of a map.
 void setKeyboardPanning( <boolean> value )
           Enables or disables keyboard panning.
 void setMouseWheelZoom( <boolean> value )
           Enables or disables mousewheel zoom.
 void setSmoothPanning( <boolean> smooth_panning )
           Allows you to specify whether or not smooth panning is enabled.
 void setZoomDoubleClickable( <boolean> doubleclick_zoom )
           Sets the 'zoom doubleclickable' property of the map.
 void setZoomDraggable( <boolean> zoom_draggable )
           Sets the 'zoom draggable' property of the map.
 void setZoomFactor( <integer> new_zoom_factor, <String> reason )
           Function to set the current zoom factor of the map.
 boolean withinMoveLimits( <MMPoint> step )
           A method to determine whether the requested move is within the limits of the mapviewer.
 integer zoom( <integer> amount, <String> reason )
           Zooms the map within the mapviewer.

Constructor Detail

MMViewer

MMViewer( map, div_element )

Method Detail

addEventHandler

boolean addEventHandler( <String> eventType, <Function> handlerFunction )

addOverlay

boolean addOverlay( <MMOverlay> overlay )

addTileOverlayCallback

void addTileOverlayCallback( <Function> callback_function )

addWidget

void addWidget( <MMWidget> widget )

assignIgnoreEvents

void assignIgnoreEvents( <HTMLElement> element )

drawAndPositionMap

void drawAndPositionMap( <MMLocation> location )

geoPosToContainerPixels

MMPoint geoPosToContainerPixels( <MMLatLon> position )

getAutoScaleLocation

MMLocation getAutoScaleLocation( <Array> entries )

getAvailableZoomFactors

Array getAvailableZoomFactors()

getBrowserDimensions

MMDimensions getBrowserDimensions()

getDimensions

MMDimensions getDimensions()

getDraggable

boolean getDraggable()

getInnerDimensions

MMBox getInnerDimensions()

getKeyboardPanning

boolean getKeyboardPanning()

getMouseWheelZoom

boolean getMouseWheelZoom()

getNamedLayer

HTMLDivElement getNamedLayer( <String> name, <Integer> zIndex )