|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object | +--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( map, div_element )
| Method Detail |
boolean addEventHandler( <String> eventType, <Function> handlerFunction )
| Event type | Event target | 3rd Argument | 4th Argument | |
|---|---|---|---|---|
| click | mapviewer | position clicked on in local coordsys |
pixel distance of click from map center |
|
| click | marker | |||
| changeZoom | mapviewer | old zoom | new zoom | reason that zoom change occurred |
| changeMapType | mapviewer | old map type | new map type | |
| drag | mapviewer | |||
| startPan | mapviewer | |||
| endPan | mapviewer | start position | end position | reason for the pan |
| addOverlay | overlay | |||
| removeOverlay | overlay | |||
| removeAllOverlays | mapviewer | |||
| openInfoBox | overlay | |||
| closeInfoBox | overlay | |||
| startGeocode | mapviewer | location being geocoded | ||
| endGeocode | mapviewer | location that was geocoded | error code if there was a problem |
eventType - Type of the event being called
handlerFunction - The event handling function
boolean addOverlay( <MMOverlay> overlay )
overlay - The overlay to be (re)displayed
void addTileOverlayCallback( <Function> callback_function )
callback_function - The callback function to be added
void addWidget( <MMWidget> widget )
widget - The widget to add to the mapviewer.
void assignIgnoreEvents( <HTMLElement> element )
element - HTML Element
void drawAndPositionMap( <MMLocation> location )
location - Location to start from, including zoom factor
MMPoint geoPosToContainerPixels( <MMLatLon> position )
position - Position in an appropriate coordinate system.
MMLocation getAutoScaleLocation( <Array> entries )
entries - An array of overlays of geographic points (or both).
Array getAvailableZoomFactors()
MMDimensions getBrowserDimensions()
MMDimensions getDimensions()
boolean getDraggable()
MMBox getInnerDimensions()
boolean getKeyboardPanning()
boolean getMouseWheelZoom()
HTMLDivElement getNamedLayer( <String> name, <Integer> zIndex )
name - Name of layer to create.
zIndex - Value to set for the zIndex of this layer, if it does not already exist.
boolean getSmoothPanning()
Object getXMLHTTPRequest()
boolean getZoomDoubleClickable()
boolean getZoomDraggable()
integer getZoomFactor()
void goToPosition( <MMLocation> new_pos, <integer> zoom_factor, <String> reason, <boolean> no_reset )
new_pos - New location to go to.
zoom_factor - Zoom factor that you want to display the map at, optional
reason - Reason code for the move, for logging purposes, should usually be left out.
no_reset - If true the position moved to by resetPosition is not updated to the position passed in.
void moveMap( <MMPoint> new_step, <String> reason )
new_step - The amount to move, in pixels
reason - Reason code for the move, for logging purposes, should usually be left out.
void moveMapMeters( <MMPoint> new_step, <String> reason )
new_step - Offset from the center to move to, in metres
reason - Reason code for the move, for logging purposes, should usually be left out.
void panToPosition( <MMLocation> new_pos, <String> reason )
new_pos - New position to pan to.
reason - Reason code for the move, for logging purposes, should usually be left out.
Object redisplayOverlay( overlay )
void removeAllOverlays()
boolean removeEventHandler( <String> eventType, <Function> handlerFunction )
eventType - Type of the event being called.
handlerFunction - The event handling function.
void removeOverlay( <MMOverlay> overlay )
overlay - The overlay to be removed.
void removeTileOverlayCallback( <Function> callback_function )
callback_function - The callback function to be removed
void removeWidget( <MMWidget> widget )
widget - The widget to remove from the mapviewer.
MMLocation resetPosition()
void resize( )
void setDraggable( <boolean> draggable )
draggable - The new setting.
void setKeyboardPanning( <boolean> value )
value - True to allow keyboard panning, false otherwise.
void setMouseWheelZoom( <boolean> value )
value - The value that you want to set this option to.
void setSmoothPanning( <boolean> smooth_panning )
smooth_panning - True if you want smooth panning enabled, false otherwise.
void setZoomDoubleClickable( <boolean> doubleclick_zoom )
doubleclick_zoom - The new setting
void setZoomDraggable( <boolean> zoom_draggable )
zoom_draggable - The new setting
void setZoomFactor( <integer> new_zoom_factor, <String> reason )
new_zoom_factor - The desired zoom factor for the map.
reason - Reason code for the move, for logging purposes, should usually be left out.
boolean withinMoveLimits( <MMPoint> step )
step - The amount that needs to be moved, in pixels
integer zoom( <integer> amount, <String> reason )
amount - The number of factors to zoom in or out by
reason - Reason code for the move, for logging purposes, should usually be left out.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||