MapQuest Advantage TileMap Toolkit Reference Documentation

Class MQTileMap

Object
   |
   +--MQTileMap

class MQTileMap


The MQTileMap is the javascript objects that represents the functionality of a Mapquest Draggable map.
Defined in toolkit.js

See:


Field Summary
 Object canvasOffsetX
          
 Object canvasOffsetY
          
 Object dcCanvasContext
          
 Object dcCanvasDiv
          
 Object overlayOffsetX
          
 Object overlayOffsetY
          
 Object staticMapEnabled
          
 Object surface
          
 Object turnEventsOff
          
 
Constructor Summary
MQTileMap ( <HTMLElement> parent, <int> zoom, <MQLatLng> mqLatLng, <string> mtype, <MQMapInit> mqmapinit )
            Constructs a MQTileMap object.
 
Method Summary
 void addControl(<MQControl> control, <MQMapCornerPlacement> position)
           Function to add control to Map.
 void addOverlay(<MQOverlay> mqOverlay)
           Function to add the overlay to the map.
 void addOverlays(<mqOverlays> mqOverlays)
           Function to add the overlays to the map from a collection.
 void addPoi(<MQPoi> mqPoi)
           Function to add the poi to the map.
 void addPois(mqPois)
           Function to add the poi to the map.
 void addRouteHighlight(<MQRectLL> rectll,<String> mapserverurl,<String> sessionid,<boolean> bestfit)
           Function to add route highlight to Map.
 void bestFit(<boolean> keepCenter, <int> minZoomLevel, <int> maxZoomLevel)
           A function that will pan and zoom the map to "best fit" to the nearest zoom level around the points contained in the map's poi collection.
 void bestFitLL(<Array> arrayLL, <boolean> keepCenter, <int> minZoomLevel, <int> maxZoomLevel)
           A function that will pan and zoom the map to "best fit" to the nearest zoom level around the points passed in.
 void enableDragging(<boolean> benable)
           Function to enable/disable map dragging.
 Object getBestFitMargin()
           Returns the bestFit margin in pixels.
 MQRectLL getBounds()
           Retrieves a MQRectLL object for the upper-left, lower-right corners of the Map.
 MQLatLng getCenter()
           Function to return the center of the map in geographic coordinates.
 MQDeclutter getDeclutter()
           Function to return a reference to the declutter object.
 boolean getDragEnabled()
           Function to return state of map dragging.
 MQPoint getDragOffset()
           Function to return the dragged offset of the map.
 MQInfoWindow getInfoWindow()
           Function to return a reference to the maps info window.
 string getMapType()
           Function to get the current map type.
 MQOverlayCollection getOverlays()
           Function to return overlay collection.
 MQPoiCollection getPois()
           Function to return poi collection.
 boolean getRolloversEnabled()
           Function to get if rollover functionality is on.
 MQRolloverWindow getRolloverWindow()
           Function to return a reference to the maps rollover window.
 Object getRouteSession()
           Function to return sessionid of route highlight.
 int getScaleFromZoom()
           Function to get the current scale of the map.
 MQSize getSize()
           Function to return map size.
 int getZoomLevel()
           Function to get the current zoom level of the map.
 void HandleOverlays()
           Function to take care of re-mapping overlays
 void hideStaticMap()
           Function to remove the static map image and return to tiled map and re-enable map events
 MQPoint llToPix(<MQLatLng> mqLatLng)
           Function to convert geographical coordinates to pixel coordinates relative to the current map displayed.
 void openInfoWindow(<MQPoint> mqPoint)
           Function to open the info window over the map at specified pixel coordinate.
 void panToLatLng(<MQLatLng> mqLatLng)
           Function to slide the mp to the new center specified.
 MQLatLng pixToLL(<MQPoint> mqPoint)
           Function to convert pixel coordinates to geographical coordinates relative to the current map displayed.
 void redrawOverlays()
           Function to redraw all the overlays
 void removeAllOverlays()
           Function to remove all overlays from the map.
 void removeAllPois()
           Function to remove all pois from the map.
 void removeControl(<MQControl> control)
           Function to remove the control from the Map.
 void removeOverlay(<MQOverlay> mqOverlay)
           Function to remove the overlay from the map.
 void removePoi(<MQPoi> mqPoi)
           Function to remove the poi from the map.
 void removeRouteHighlight()
           Function to remove route highlight from Map.
 void replaceOverlays(myOverlayCollection)
           Function to remove the current collection of overlays from the map and add the collection specified to the map.
 void replacePois(<MQPoiCollection> mypois)
           Function to remove the current collection of pois from the map and add the collection specified to the map.
 void restoreState()
           Restores the saved map position, zoom level, and map type.
 void saveState()
           Stores the current map position, zoom level, and map type for later retrieval.
 void setBestFitMargin(bestFitMargin)
           Sets the bestFit margin in pixels.
 void setCenter(<MQLatLng> mqLatLng,<int> zoom)
           Function to set the center of the map and optionally change the zoom level.
 void setInfoContentElement(<HTMLElement> contentContainer)
           Function to set the content for the info window as an HTMLElement created using the browser DOM.
 void setInfoContentHTML(<string> content)
           Function to set the content for the info window as HTML text.
 void setInfoTitleElement(<HTMLElement> titleContainer)
           Function to set the title for the info window as an HTMLElement created using the browser DOM.
 void setInfoTitleHTML(<string> title)
           Function to set the title for the info window as HTML text.
 void setLogoPlacement(<MQMapLogo> mapLogo, <MQMapCornerPlacement> mapCornerPlacement)
           Sets the position of the specified logo at the specified corner placement.
 void setLogoZindex(mapLogo, index)
          
 void setMapType(<string> type)
           Function to set the map type for this map.
 void setRolloversEnabled(<boolean> benable)
           Function to enable rollover behavior for when the mouse rolls over pois on the map.
 void setSize(<MQSize> mqSize)
           Function to resize the map.
 void setZoomLevel(<int> level)
           Function to zoom the map to the specified zoom level.
 void showDragableMap()
           Function to load a tiled map with dragging capabilities.
 Object showStaticMap()
           Function to load a printer friendly map by covering the tiles with static map image version and disable map manipulation events
 void zoomIn()
           Function to zoom the map in one zoom level.
 void zoomOut()
           Function to zoom the map out one zoom level.
 void zoomToRect(<MQRectLL> rectLL,<boolean> keepcenter,<int> minzoom,<int> maxzoom)
           Function to zoom the map to the closest zoom level that fits the specified rectangle.

Field Detail

canvasOffsetX

Object canvasOffsetX

canvasOffsetY

Object canvasOffsetY

dcCanvasContext

Object dcCanvasContext

dcCanvasDiv

Object dcCanvasDiv

overlayOffsetX

Object overlayOffsetX

overlayOffsetY

Object overlayOffsetY

staticMapEnabled

Object staticMapEnabled

surface

Object surface

turnEventsOff

Object turnEventsOff

Constructor Detail

MQTileMap

MQTileMap( <HTMLElement> parent, <int> zoom, <MQLatLng> mqLatLng, <string> mtype, <MQMapInit> mqmapinit )

Method Detail

addControl

void addControl(<MQControl> control, <MQMapCornerPlacement> position)

addOverlay

void addOverlay(<MQOverlay> mqOverlay)

addOverlays

void addOverlays(<mqOverlays> mqOverlays)

addPoi

void addPoi(<MQPoi> mqPoi)

addPois

void addPois(mqPois)

addRouteHighlight

void addRouteHighlight(<MQRectLL> rectll,<String> mapserverurl,<String> sessionid,<boolean> bestfit)

bestFit

void bestFit(<boolean> keepCenter, <int> minZoomLevel, <int> maxZoomLevel)

bestFitLL

void bestFitLL(<Array> arrayLL, <boolean> keepCenter, <int> minZoomLevel, <int> maxZoomLevel)

enableDragging

void enableDragging(<boolean> benable)

getBestFitMargin

Object getBestFitMargin()

getBounds

MQRectLL getBounds()

getCenter

MQLatLng getCenter()

getDeclutter

MQDeclutter getDeclutter()

getDragEnabled

boolean getDragEnabled()

getDragOffset

MQPoint getDragOffset()

getInfoWindow

MQInfoWindow getInfoWindow()

getMapType

string getMapType()

getOverlays

MQOverlayCollection getOverlays()

getPois

MQPoiCollection getPois()

getRolloversEnabled

boolean getRolloversEnabled()

getRolloverWindow

MQRolloverWindow getRolloverWindow()

getRouteSession

Object getRouteSession()

getScaleFromZoom

int getScaleFromZoom()

getSize

MQSize getSize()

getZoomLevel

int getZoomLevel()

HandleOverlays

void HandleOverlays()

hideStaticMap

void hideStaticMap()

llToPix

MQPoint llToPix(<MQLatLng> mqLatLng)

openInfoWindow

void openInfoWindow(<MQPoint> mqPoint)

panToLatLng

void panToLatLng(<MQLatLng> mqLatLng)

pixToLL

MQLatLng pixToLL(<MQPoint> mqPoint)

redrawOverlays

void redrawOverlays()

removeAllOverlays

void removeAllOverlays()

removeAllPois

void removeAllPois()

removeControl

void removeControl(<MQControl> control)

removeOverlay

void removeOverlay(<MQOverlay> mqOverlay)

removePoi

void removePoi(<MQPoi> mqPoi)

removeRouteHighlight

void removeRouteHighlight()

replaceOverlays

void replaceOverlays(myOverlayCollection)

replacePois

void replacePois(<MQPoiCollection> mypois)

restoreState

void restoreState()

saveState

void saveState()

setBestFitMargin

void setBestFitMargin(bestFitMargin)

setCenter

void setCenter(<MQLatLng> mqLatLng,<int> zoom)

setInfoContentElement

void setInfoContentElement(<HTMLElement> contentContainer)

setInfoContentHTML

void setInfoContentHTML(<string> content)

setInfoTitleElement

void setInfoTitleElement(<HTMLElement> titleContainer)

setInfoTitleHTML

void setInfoTitleHTML(<string> title)

setLogoPlacement

void setLogoPlacement(<MQMapLogo> mapLogo, <MQMapCornerPlacement> mapCornerPlacement)

setLogoZindex

void setLogoZindex(mapLogo, index)

setMapType

void setMapType(<string> type)

setRolloversEnabled

void setRolloversEnabled(<boolean> benable)

setSize

void setSize(<MQSize> mqSize)

setZoomLevel

void setZoomLevel(<int> level)

showDragableMap

void showDragableMap()

showStaticMap

Object showStaticMap()

zoomIn

void zoomIn()

zoomOut

void zoomOut()

zoomToRect

void zoomToRect(<MQRectLL> rectLL,<boolean> keepcenter,<int> minzoom,<int> maxzoom)

MapQuest Advantage TileMap Toolkit Reference Documentation

Documentation generated by JSDoc on Tue Oct 16 08:04:28 2007