AtlasCT.com
User Manual v5.0

Map

Inheritance: EventListener > Map

The Map class is the main class of the SDK.
This class allows you to add a map component into your application.
The class allows you to set the map position, set the map setting, add overlays above the map and more.


Summary
Inheritance: EventListener > Map
The Map constructor.
Add the advanced navigation bar to the map.
Add a compass to the map.
Add the basic navigation bar to the map.
Add the drag bar to the map.
Adds an overlay on top of the map referenced to the Map.
Adds an overlay on top of the map referenced to the client screen.
The overlay position is fixed to screen (it won’t move in any map dragging).
The anchor and the offsetPosition parameters are used to determine alignment of the overlay above the map.
The offsetPosition is relative to the given anchor.
Adds a tile overlay on top of the map referenced to the Map.
Assign map settings from a specific map.
Clears the displayed route from the map.
Converts a screen coordinate (in pixels) to a map coordinate (geographical coordinate).
Disable panning the map to the location the user clicks on the map.
Disable the map to be continue while panning.
Disable the grayscale mode.
Disable the option to zoom the map in and out by the mouse wheel.
Disables the map panning.
Enable panning the map to the location the user clicks on the map.
Enable the map to be continue while panning.
Enable the grayscale mode.
Enable the option to zoom the map in and out by the mouse wheel.
Enables the map panning.
Fits the map view to a list of specified coordinates.
Fits the map view to the specified layersCollection.
Fits the map view to the specified localVectorLayer.
Fits the map view to the specified marker.
Fits the map view to the specified poly.
Fits the map view to the specified circle.
Fits the map view to the displayed route.
Returns the map background color.
Returns the map center position.
Returns the bounding box (Top Left, Bottom Right) position of the displayed map.
Returns the map context menu.
Returns the layers manager of the map.
Returns the maximum zoom level available for the map.
Returns the minimum zoom level available for the map.
Returns the map mode.
Returns a reference to the overlay instance with the specified name, or null if there is no overlay with the specified name.
Returns the map projection.
Returns the map size.
Returns map units.
Returns the map view.
Returns the zoom level of the map.
Hides the target icon from the map.
Hides the waiting message from the map.
Returns true if the map click panning is enabled.
Returns true if the given coordinate is inside the current client map view, otherwise returns false.
Returns true if the mouse wheel zooming is enabled.
Returns true if the overlay is visible, or false if the overlay is invisible.
Returns true if the map panning is enabled.
Loads the waiting message to the screen(in hide mode).
Converts a map coordinate (geographical coordinate) to a screen coordinate (in pixels).
Pans the map by a custom amount of client pixels.
Prints only the map(usefull for browsers that could not print flash).
Redo map position.
Removes from the map the overlay with the specified name.
Removes from the map the tile overlay with the specified name.
Sets the background color of the map.
Sets the map center position by the given address.
Sets the map center position by the given coordinate.
Sets the map center position by the given route.
Sets the map center position by the given ip.
Assigns a new context menu to the map.
Sets the map’s cursor to the one given by the url param.
Changes the map’s cursor to the default cursor (the default cursor is a “hand pointer”).
You can set the map’s default cursor by the <setDefaultCursor> method.
Sets the layers manager of the map.
Set the map loading icon (acceptable formats: SWF, PNG, JPG, GIF).
Sets a new position to the map loading icon.
Set a new position to an overlay that added to the map as a map overlay (see addOverlayToMap)
Sets the map mode.
Sets a movie to display on load.
Sets a new position to the map scale bar.
Set a new position to an overlay that added to the map as a screen overlay (see addOverlayToScreen)
The anchor and the offsetPosition parameters are used to determine alignment of the overlay above the map.
The offsetPosition is relative to the given anchor.
Sets a new size to the map.
Set the map target icon (acceptable formats: SWF, PNG, JPG, GIF).
Sets map units.
Sets the map view.
Sets a new zoom level to the map.
Hides an overlay from the map.
Shows an overlay above the map.
Shows a route on the map.
Shows a target icon on the map.
Shows the waiting message.
Skip the on load movie.
Undo map position.
Writes the map component code into the HTML document.
Writes the map component into the specified DOM container.
Zooms the map in.
Increases the zoom level by one.
Zooms the map out.
Decreases the zoom level by one.
A LayersManager object that contains the map layers.
A RouteVectorLayer object that contains the route style which displayed above the map.
Enables the user to pan the map.
Enables the user to zoom the map in by a click on the map.
Enables the user to zoom the map out by a click on the map.
Enables the user to draw a polygon above the map.
Enables the user to draw a polyline above the map.
Enables the user to draw a circle above the map.
Enables the user to edit shapes (Polygons, Polylines, Circles) above the map.
This event dispatches after the map has succsesfully initialized.
The event occurs only once during the application run time.
This event dispatches after the map has been modified with a new position.
This event dispatches after the map has succsesfully loaded.
This event dispatches when the user clicks on the map.
This event dispatches when the user double click on the map.
This event dispatches when the user moves on the map.
This event dispatches when the user starts dragging the map.
This event dispatches when the user stops dragging the map.
This event dispatches after the map has been resized.
This event dispatches after a geocode response has arrived from the server.
A vector map view.
A raster map view.
A satellite images view.
An Hybrid view.
The hybrid view is a mix between the standard map and the satellite images.
metric units.
Imperial units.
The object will be aligned to the top left corner of the map.
The object will be aligned to the map top center.
The object will be aligned to the top right corner of the map.
The object will be aligned to the map left center.
The object will be aligned to the map center.
The object will be aligned to the map right center.
The object will be aligned to the bottom left corner of the map.
The object will be aligned to the map bottom center.
The object will be anchored at the bottom right corner of the map.

Constructors

Map

Map(string width
string height)

The Map constructor.  Creates a new map instance.

Parameters

widthMap width.  Can also contain a percentage value.
heightMap height.  Can also contain a percentage value.

Methods

addAdvancedNavigationBar

addAdvancedNavigationBar(ScreenPoint screenPoint)

Adds the advanced navigation bar on top of the map referenced to the Map.

Parameters

offsetPositionThe offset position to be used.

See Also

addDefaultNavigationBar, addDragBar, addCompass

addCompass

addCompass(ScreenPoint screenPoint)

Add a compass to the map.

Parameters

offsetPositionThe offset position to be used.

See Also

addDefaultNavigationBar, addDragBar, addAdvancedNavigationBar

addDefaultNavigationBar

addDefaultNavigationBar(ScreenPoint screenPoint)

Adds the basic navigation bar on top of the map referenced to the Map.

Parameters

offsetPositionThe offset position to be used.

See Also

addAdvancedNavigationBar, addDragBar, addCompass

addDragBar

addDragBar(ScreenPoint screenPoint)

Adds the drag bar on top of the map referenced to the Map.

Parameters

offsetPositionThe offset position to be used.

See Also

addDefaultNavigationBar, addCompass, addAdvancedNavigationBar

addOverlayToMap

addOverlayToMap(Overlay overlay)

Adds an overlay on top of the map referenced to the Map.

Parameters

overlayThe overlay to be added.

See Also

Overlay, removeOverlay, addOverlayToScreen

addOverlayToScreen

addOverlayToScreen(Overlay overlay
Map Anchors anchor
ScreenPoint screenPoint
int zIndex)

Adds an overlay on top of the map referenced to the client screen.
The overlay position is fixed to screen (it won’t move in any map dragging).
The anchor and the offsetPosition parameters are used to determine alignment of the overlay above the map.
The offsetPosition is relative to the given anchor.

Parameters

overlaythe overlay to be added.
anchorthe anchor type to be used.
offsetPositionthe offset position to be used.
zIndexSets the stack order of the elements above the map.
An overlay with greater stack order is always in front of another overlay with lower stack order.

See Also

Overlay, removeOverlay, addOverlayToMap

addTileOverlayToMap

addTileOverlayToMap(TileOverlay tileOverlay
boolean isStretch)

Adds a tile overlay on top of the map referenced to the Map.

Parameters

tileOverlayThe tile overlay to be added.
isStretchIndicate if the overlay will stretch to the giving bounds. If false then the image will set to the left up coordinate of the bounds, with the real size of the image (optional, default is true).

See Also

removeTileOverlay

assignSettingsFrom

assignSettingsFrom(Map map)

Assign map settings from a specific map.

Parameters

mapThe map in which to set the setting from.

clearRoute

clearRoute()

Clears the displayed route from the map.

clientToMap

Coordinate clientToMap(ScreenPoint screenPoint)

Converts a screen coordinate (in pixels) to a map coordinate (geographical coordinate).

Parameters

screenPointThe screen point to be converted.

Returns

Map coordinate (geographical coordinate)

See Also

mapToClient

disableClickPanning

disableClickPanning()

Disable panning the map to the location the user clicks on the map.  In default, the map click panning is enabled.

See Also

enableClickPanning

disableGrayScale

disableGrayScale()

Disable the grayscale mode.

See Also

enableGrayScale

disableMouseWheelZooming

disableMouseWheelZooming()

Disable the option to zoom the map in and out by the mouse wheel.  In default, the map mouse wheel zooming is enabled.

See Also

enableMouseWheelZooming

disablePanning

disablePanning()

See Also

enablePanning

enableClickPanning

enableClickPanning()

Enable panning the map to the location the user clicks on the map.  In default, the map click panning is enabled.

See Also

disableClickPanning

enableGrayScale

enableGrayScale()

Enable the grayscale mode.

See Also

disableGrayScale

enableMouseWheelZooming

enableMouseWheelZooming()

Enable the option to zoom the map in and out by the mouse wheel.  In default, the map mouse wheel zooming is enabled.

See Also

disableMouseWheelZooming

enablePanning

enablePanning()

Enables the map panning.  In default, the map panning is enabled.

See Also

disablePanning

fitMap

fitMap(Array[] Coordinate coordinatesList)

Fits the map view to a list of specified coordinates.

Parameters

coordinatesListArray of coordinates.

See Also

setCenterPosition

fitMap

fitMap(LayersCollection layersCollection)

Fits the map view to the specified layersCollection.

Parameters

layersCollectionthe layers collection to be fitted to.

See Also

setCenterPosition

fitMap

fitMap(LocalVectorLayer localVectorLayer)

Fits the map view to the specified localVectorLayer.

Parameters

localVectorLayerthe local vector layer to be fitted to.

See Also

setCenterPosition

fitMap

fitMap(Circle circle)

Fits the map view to the specified circle.

Parameters

circlethe circle to be fitted to.

See Also

setCenterPosition

fitMap

fitMap(Marker marker)

Fits the map view to the specified marker.

Parameters

markerthe marker to be fitted to.

See Also

setCenterPosition

fitMap

fitMap(Poly poly)

Fits the map view to the specified poly.

Parameters

polythe poly to be fitted to.

See Also

setCenterPosition

fitToRoute

fitToRoute()

Fits the map view to the displayed route.  The map must hold a route object in order to perform this action.

See Also

showRoute, fitMap

getBgColor

string getBgColor()

Returns the map background color.

Returns

Map background color

See Also

setBgColor

getCenterPosition

Coordinate getCenterPosition()

Returns the map center position.

Returns

Map center position.

See Also

setCenterPosition

getClientViewPosition

Bounds getClientViewPosition()

Returns the bounding box (Top Left, Bottom Right) position of the displayed map.

Returns

Map bounds position.

getContextMenu

getContextMenu()

Returns the map context menu.

Returns

the map context menu.

See Also

setContextMenu

getLayersManager

LayersManager getLayersManager()

Returns the layers manager of the map.

Returns

The layers manager of the map

See Also

LayersManager, setLayersManager

getMaxZoomLevel

int getMaxZoomLevel()

Returns the maximum zoom level available for the map.

Returns

Maximum zoom level available for the map

See Also

getMinZoomLevel

getMinZoomLevel

int getMinZoomLevel()

Returns the minimum zoom level available for the map.

Returns

Minimum zoom level available for the map.

See Also

getMaxZoomLevel

getMode

Map Modes getMode()

Returns the map mode.

Returns

Map mode.

See Also

setMode

getOverlay

Overlay getOverlay()

Returns a reference to the overlay instance with the specified name, or null if there is no overlay with the specified name.

Parameters

nameThe name of the required overlay.

Returns

A reference to the overlay, or null if there is no overlay with the specified name.

getProjection

string getProjection()

Returns the map projection.

Returns

Map projection

getSize

MapSize getSize()

Returns the map size.

Returns

Map size

See Also

setSize

getUnits

Map Units getUnits()

Returns map units.

Returns

Map units

See Also

setUnits

getView

Map Views getView()

Returns the map view.

Returns

Map view.

See Also

setView

getZoomLevel

int getZoomLevel()

Returns the zoom level of the map.

Returns

Zoom level of the map

See Also

setZoomLevel

hideTargetIcon

hideTargetIcon()

Hides the target icon from the map.

See Also

showTargetIcon

hideWaitingMessage

hideWaitingMessage()

Hides the waiting message from the map.

See Also

showWaitingMessage, loadWaitingMessage

isClickPanningEnabled

isClickPanningEnabled()

Returns true if the map click panning is enabled.

Returns

True if the map click panning is enabled and false if disabled.

See Also

enableClickPanning, disableClickPanning

isInsideClientView

boolean isInsideClientView(Coordinate _coordinate)

Returns true if the given coordinate is inside the current client map view, otherwise returns false.

Parameters

coordinateThe map coordinate to be checked.

Returns

True if the given coordinate is inside the current client map view

isMouseWheelZoomingEnabled

isMouseWheelZoomingEnabled()

Returns true if the mouse wheel zooming is enabled.

Returns

True if the mouse wheel zooming is enabled and false if disabled.

See Also

enableMouseWheelZooming, disableMouseWheelZooming

isOverlayVisible

isOverlayVisible(string overlayName)

Returns true if the overlay is visible, or false if the overlay is invisible.

Parameters

namethe overlay name.

Returns

True if the overlay is visible.

See Also

showOverlay, <hideOverlay>, addOverlayToMap

isPanningEnabled

isPanningEnabled()

Returns true if the map panning is enabled.

Returns

True if the map panning is enabled and false if disabled.

See Also

enablePanning, disablePanning

loadWaitingMessage

loadWaitingMessage(Map Anchors anchor
ScreenPoint offsetPosition)

Loads the waiting message to the screen(in hide mode).

Parameters

anchorthe anchor type to be used.
offsetPositionthe offset position to be used.

See Also

showWaitingMessage, hideWaitingMessage

mapToClient

ScreenPoint mapToClient(Coordinate coordinate)

Converts a map coordinate (geographical coordinate) to a screen coordinate (in pixels).

Parameters

coordinateThe map coordinate to be converted.

Returns

Screen coordinate (in pixels)

See Also

clientToMap

panBy

panBy(int deltaX
int deltaY)

Pans the map by a custom amount of client pixels.

Parameters

deltaXDelta X.  Positive delta x value pans right at the specified amount, while negative delta x value pans left at the specified amount.
deltaYDelta Y.  Positive delta y value pans down at the specified amount, while negative delta y value pans up at the specified amount.

printMap

printMap()

Prints only the map(usefull for browsers that could not print flash).

redoPosition

redoPosition()

Redo map position.

See Also

undoPosition

removeOverlay

removeOverlay(string name)

Removes from the map the overlay with the specified name.

Parameters

nameThe name of the overlay to be removed.

See Also

addOverlayToMap, addOverlayToScreen

removeTileOverlay

removeTileOverlay(string name)

Removes from the map the tile overlay with the specified name.

Parameters

nameThe name of the tile overlay to be removed.

See Also

addTileOverlayToMap

setBgColor

setBgColor(string bgColor)

Sets the background color of the map.

Parameters

bgColorBackground color of the map.

See Also

getBgColor

setCenterPosition

setCenterPosition(Coordinate coordinate
int zoomLevel)

Sets the map center position by the given coordinate.

Parameters

coordinateA coordinate object for the map to be center to.
zoomLevelA new zoom level.

See Also

getCenterPosition, fitMap

setCenterPosition

setCenterPosition(Address address
int zoomLevel
string countryCode)

Sets the map center position by the given address.

Parameters

addressAn address object for the map to be center to.
zoomLevelA new zoom level.
countryCodeISO ALPHA-3 country code(optional).

See Also

getCenterPosition, fitMap

setCenterPosition

setCenterPosition(Route route
int zoomLevel)

Sets the map center position by the given route.

Parameters

routeA route object for the map to be center to.
zoomLevelA new zoom level.

See Also

getCenterPosition, fitMap

setCenterPositionByIP

setCenterPositionByIP(string ip)

Sets the map center position by the given ip.

Parameters

ipAn IP string for the map to be center to (optional).

setContextMenu

setContextMenu(ContextMenu contextMenu)

Assigns a new context menu to the map.

Parameters

contextMenuThe new context menu in which to set to the map.

See Also

getContextMenu

setCursor

setCursor()

Sets the map’s cursor to the one given by the url param.

Parameters

urlthe url of the cursor graphic.

See Also

<setDefaultCursor>

setCursorToDefault

setCursorToDefault()

Changes the map’s cursor to the default cursor (the default cursor is a “hand pointer”).
You can set the map’s default cursor by the <setDefaultCursor> method.

See Also

<setDefaultCursor>, setCursor

setLayersManager

getLayersManager(LayersManager layersManager)

Sets the layers manager of the map.

Parameters

layersManagerNew layers manager for the map.

See Also

LayersManager, getLayersManager

setLoadingIcon

setLoadingIcon(string path)

Set the map loading icon (acceptable formats: SWF, PNG, JPG, GIF).

Parameters

paththe path of the new icon.

setLoadingIconPosition

setLoadingIconPosition(Anchor anchor
ScreenPoint offsetPosition)

Sets a new position to the map loading icon.  The anchor and the offsetPosition parameters are used to determine alignment of the icon above the map.  Acceptable anchor value are Map.ALIGN_TOP_LEFT, Map.ALIGN_TOP_RIGHT, Map.ALIGN_BOTTOM_LEFT, Map.ALIGN_BOTTOM_RIGHT.  The offsetPosition is relative to the given anchor.

Parameters

anchorthe new anchor position.
offsetPositionthe offset position to be used.

See Also

setLoadingIcon

setMapOverlayCoordinate

setMapOverlayCoordinate(Overlay overlay
LatLong latLong)

Set a new position to an overlay that added to the map as a map overlay (see addOverlayToMap)

Parameters

overlaythe required overlay.
latLongthe new coordinate.

See Also

Overlay, addOverlayToMap, removeOverlay

setMode

setMode(Map Modes mode)

Sets the map mode.

Parameters

modeThe map mode.

See Also

getMode

setOnLoadMovie

setOnLoadMovie(int milliseconds
string URL
ScreenPoint screenPosition)

Sets a movie to display on load.

Our recommendation is to set the size of your movie to be the same size as the map.

Parameters

milliseconds milliseconds that the movie will be shown.
URL the url for the movie file (SWF).
screenPosition the horizontal and vertical position of the movie (optional).

See Also

skipOnLoadMovie

setScaleBarPosition

setScaleBarPosition(Map Anchors anchor
ScreenPoint offsetPosition)

Sets a new position to the map scale bar. the anchor and the offsetPosition parameters are used to determine the alignment of the scale bar above the map.  Acceptable anchor value are Map.ALIGN_TOP_LEFT, Map.ALIGN_TOP_RIGHT, Map.ALIGN_BOTTOM_LEFT, Map.ALIGN_BOTTOM_RIGHT The offsetPosition is relative to the given anchor.

Parameters

anchorthe new anchor position.
offsetPositionthe offset position to be used.

setScreenOverlayPosition

setScreenOverlayPosition(Overlay overlay
Map Anchors anchor
ScreenPoint screenPoint)

Set a new position to an overlay that added to the map as a screen overlay (see addOverlayToScreen)
The anchor and the offsetPosition parameters are used to determine alignment of the overlay above the map.
The offsetPosition is relative to the given anchor.

Parameters

overlaythe required overlay.
anchorthe anchor type to be used.
offsetPositionthe offset position to be used.

See Also

Overlay, addOverlayToScreen, removeOverlay

setSize

setSize(MapSize mapSize)

Sets a new size to the map.

Parameters

mapSizeA new size to the map.

See Also

getSize

setTargetIcon

setTargetIcon(string path
int offestX
int offestY)

Set the map target icon (acceptable formats: SWF, PNG, JPG, GIF).  The offestX, offestY params are used to determine the anchored position of the icon above the map.  If you don’t set the offestX, offestY params, the icon will be placed above the map by the icon’s top left coordinate.

Parameters

paththe path of the new icon.
offestXthe offestX of the icon.
offestYthe offestY of the icon.

See Also

showTargetIcon, hideTargetIcon

setUnits

setUnits(Map Units units)

Sets map units.

Parameters

unitsmap units.

See Also

getUnits

setView

setView(Map Views view)

Sets the map view.

Parameters

viewThe map view.

See Also

getView

setZoomLevel

setZoomLevel(int zoomLevel)

Sets a new zoom level to the map.

Parameters

zoomLevelA new zoom level to the map.

See Also

getZoomLevel

showOverlay

showOverlay(string overlayName)

Hides an overlay from the map.

Parameters

namethe overlay name to be hidden.

See Also

showOverlay, addOverlayToMap

showOverlay

showOverlay(string overlayName)

Shows an overlay above the map.

Parameters

namethe overlay name to be shown.

See Also

<hideOverlay>, addOverlayToMap

showRoute

showRoute(Route route
string countryCode)

Shows a route on the map.  Execute the given route and if succeed, show the route path above the map.

Parameters

routethe route to be executed.
countryCodeISO ALPHA-3 country code(optional).

See Also

clearRoute

showTargetIcon

showTargetIcon(Coordinate coordinate)

Shows a target icon on the map.

Parameters

coordinatetarget coordinate.

See Also

hideTargetIcon

showWaitingMessage

showWaitingMessage()

Shows the waiting message.

See Also

hideWaitingMessage, loadWaitingMessage

skipOnLoadMovie

skipOnLoadMovie()

Skip the on load movie.

See Also

setOnLoadMovie

undoPosition

undoPosition()

Undo map position.

See Also

redoPosition

writeMap

writeMap()

Writes the map component code into the HTML document.

See Also

writeMapToContainer

writeMapToContainer

writeMapToContainer()

Writes the map component into the specified DOM container.

Parameters

domContainerThe DOM container to write the map to.

See Also

writeMap

zoomIn

zoomIn()

Zooms the map in.
Increases the zoom level by one.

See Also

zoomOut

zoomOut

zoomOut()

Zooms the map out.
Decreases the zoom level by one.

See Also

zoomIn

Properties

layersManager

LayersManager layersManager

A LayersManager object that contains the map layers. 

routeVectorLayer

RouteVectorLayer routeVectorLayer

A RouteVectorLayer object that contains the route style which displayed above the map. 

Constants

Map Modes

Map. MODE_PAN

Map.MODE_PAN

Enables the user to pan the map.

Map. MODE_ZOOM_IN

Map.MODE_ZOOM_IN

Enables the user to zoom the map in by a click on the map.

Map. MODE_ZOOM_OUT

Map.MODE_ZOOM_OUT

Enables the user to zoom the map out by a click on the map.

Map. MODE_INSERT_POLYGON

Map.MODE_INSERT_POLYGON

Enables the user to draw a polygon above the map.

Map. MODE_INSERT_POLYLINE

Map.MODE_INSERT_POLYLINE

Enables the user to draw a polyline above the map.

Map. MODE_INSERT_CIRCLE

Map.MODE_INSERT_CIRCLE

Enables the user to draw a circle above the map.

Map. MODE_EDIT_SHAPE

Map.MODE_EDIT_SHAPE

Enables the user to edit shapes (Polygons, Polylines, Circles) above the map.

Map. MODE_MEASURE

Map.MODE_MEASURE

Map. MODE_MEASURE

Map.MODE_MEASURE_EX

Map Events

Map. EVENT_MAP_INITIALIZE

Map.EVENT_MAP_INITIALIZE

This event dispatches after the map has succsesfully initialized.
The event occurs only once during the application run time.

Arguments

senderMap The sender object.

Map. EVENT_MAP_MODIFIED

Map.EVENT_MAP_MODIFIED

This event dispatches after the map has been modified with a new position.

Arguments

senderMap The sender object.

Map. EVENT_MAP_LOADED

Map.EVENT_MAP_LOADED

This event dispatches after the map has succsesfully loaded.

Arguments

senderMap The sender object.

Map. EVENT_MAP_CLICK

Map.EVENT_MAP_CLICK

This event dispatches when the user clicks on the map.

Arguments

senderMap The sender object.
latLongLatLong The coordinate of the click location.

Map. EVENT_MAP_DOUBLE_CLICK

Map.EVENT_MAP_DOUBLE_CLICK

This event dispatches when the user double click on the map.

Arguments

senderMap The sender object.
latLongLatLong The coordinate of the double click location.

Map. EVENT_MAP_MOUSE_MOVE

Map.EVENT_MAP_MOUSE_MOVE

This event dispatches when the user moves on the map.

Arguments

senderMap The sender object.
latLongLatLong The coordinate of the mouse location.

Map. EVENT_MAP_DRAG_START

Map.EVENT_MAP_DRAG_START

This event dispatches when the user starts dragging the map.

Arguments

senderMap The sender object.
latLongLatLong The coordinate where the user starts dragging the map.

Map. EVENT_MAP_DRAG_END

Map.EVENT_MAP_DRAG_END

This event dispatches when the user stops dragging the map.

Arguments

senderMap The sender object.
latLongLatLong The coordinate where the user stops dragging the map.

Map. EVENT_MAP_RESIZE

Map.EVENT_MAP_RESIZE

This event dispatches after the map has been resized.

Arguments

senderMap The sender object.
mapSizeMapSize The new map size.

Map. EVENT_GEO_RESULT

Map.EVENT_GEO_RESULT

This event dispatches after a geocode response has arrived from the server.

Arguments

senderMap The sender object.
geocodeGeocode The geocode of the result.

Map Views

Map. VIEW_VECTOR

Map.VIEW_VECTOR

A vector map view.

Map. VIEW_RASTER

Map.VIEW_RASTER

A raster map view.

Map. VIEW_SATELLITE

Map.VIEW_SATELLITE

A satellite images view.

Map. VIEW_HYBRID

Map.VIEW_HYBRID

An Hybrid view.
The hybrid view is a mix between the standard map and the satellite images.

Map Units

Map. UNIT_METRIC

Map.UNIT_METRIC

metric units.

Map. UNIT_IMPERIAL

Map.UNIT_IMPERIAL

Imperial units.

Map Anchors

Map. ALIGN_TOP_LEFT

Map.ALIGN_TOP_LEFT

The object will be aligned to the top left corner of the map.

Map. ALIGN_TOP_CENTER

Map.ALIGN_TOP_CENTER

The object will be aligned to the map top center.

Map. ALIGN_TOP_RIGHT

Map.ALIGN_TOP_RIGHT

The object will be aligned to the top right corner of the map.

Map. ALIGN_CENTER_LEFT

Map.ALIGN_CENTER_LEFT

The object will be aligned to the map left center.

Map. ALIGN_CENTER_CENTER

Map.ALIGN_CENTER_CENTER

The object will be aligned to the map center.

Map. ALIGN_CENTER_RIGHT

Map.ALIGN_CENTER_RIGHT

The object will be aligned to the map right center.

Map. ALIGN_BOTTOM_LEFT

Map.ALIGN_BOTTOM_LEFT

The object will be aligned to the bottom left corner of the map.

Map. ALIGN_BOTTOM_CENTER

Map.ALIGN_BOTTOM_CENTER

The object will be aligned to the map bottom center.

Map. ALIGN_BOTTOM_RIGHT

Map.ALIGN_BOTTOM_RIGHT

The object will be anchored at the bottom right corner of the map.

The EventListener class helps you to register event handlers defined by this API.
Some of the classes that inherit from this class are: Map, OverviewMap, LayersManager
Map(string width
string height)
The Map constructor.
writeMap()
Writes the map component code into the HTML document.
setBgColor(string bgColor)
Sets the background color of the map.
string getBgColor()
Returns the map background color.
enablePanning()
Enables the map panning.
disablePanning()
Disables the map panning.
isPanningEnabled()
Returns true if the map panning is enabled.
enableMouseWheelZooming()
Enable the option to zoom the map in and out by the mouse wheel.
disableMouseWheelZooming()
Disable the option to zoom the map in and out by the mouse wheel.
isMouseWheelZoomingEnabled()
Returns true if the mouse wheel zooming is enabled.
enableClickPanning()
Enable panning the map to the location the user clicks on the map.
disableClickPanning()
Disable panning the map to the location the user clicks on the map.
isClickPanningEnabled()
Returns true if the map click panning is enabled.
assignSettingsFrom(Map map)
Assign map settings from a specific map.
setContextMenu(ContextMenu contextMenu)
Assigns a new context menu to the map.
getContextMenu()
Returns the map context menu.
setSize(MapSize mapSize)
Sets a new size to the map.
MapSize getSize()
Returns the map size.
setUnits(Map Units units)
Sets map units.
Map Units getUnits()
Returns map units.
string getProjection()
Returns the map projection.
setMode(Map Modes mode)
Sets the map mode.
Map Modes getMode()
Returns the map mode.
setView(Map Views view)
Sets the map view.
Map Views getView()
Returns the map view.
panBy(int deltaX
int deltaY)
Pans the map by a custom amount of client pixels.
printMap()
Prints only the map(usefull for browsers that could not print flash).
redoPosition()
Redo map position.
undoPosition()
Undo map position.
zoomIn()
Zooms the map in.
Increases the zoom level by one.
zoomOut()
Zooms the map out.
Decreases the zoom level by one.
int getMinZoomLevel()
Returns the minimum zoom level available for the map.
int getMaxZoomLevel()
Returns the maximum zoom level available for the map.
setZoomLevel(int zoomLevel)
Sets a new zoom level to the map.
int getZoomLevel()
Returns the zoom level of the map.
ScreenPoint mapToClient(Coordinate coordinate)
Converts a map coordinate (geographical coordinate) to a screen coordinate (in pixels).
Coordinate clientToMap(ScreenPoint screenPoint)
Converts a screen coordinate (in pixels) to a map coordinate (geographical coordinate).
boolean isInsideClientView(Coordinate _coordinate)
Returns true if the given coordinate is inside the current client map view, otherwise returns false.
Bounds getClientViewPosition()
Returns the bounding box (Top Left, Bottom Right) position of the displayed map.
setCenterPosition(Route route
int zoomLevel)
Sets the map center position by the given route.
Coordinate getCenterPosition()
Returns the map center position.
fitToRoute()
Fits the map view to the displayed route.
fitMap(Circle circle)
Fits the map view to the specified circle.
showRoute(Route route)
Shows a route on the map.
clearRoute()
Clears the displayed route from the map.
showTargetIcon(Coordinate coordinate)
Shows a target icon on the map.
hideTargetIcon()
Hides the target icon from the map.
setTargetIcon(string path
int offestX
int offestY)
Set the map target icon (acceptable formats: SWF, PNG, JPG, GIF).
setCursor()
Sets the map’s cursor to the one given by the url param.
setCursorToDefault()
Changes the map’s cursor to the default cursor (the default cursor is a “hand pointer”).
You can set the map’s default cursor by the setDefaultCursor method.
addOverlayToScreen(Overlay overlay
Map Anchors anchor
ScreenPoint screenPoint
int zIndex)
Adds an overlay on top of the map referenced to the client screen.
The overlay position is fixed to screen (it won’t move in any map dragging).
The anchor and the offsetPosition parameters are used to determine alignment of the overlay above the map.
The offsetPosition is relative to the given anchor.
addAdvancedNavigationBar(ScreenPoint screenPoint)
Add the advanced navigation bar to the map.
addCompass(ScreenPoint screenPoint)
Add a compass to the map.
addDefaultNavigationBar(ScreenPoint screenPoint)
Add the basic navigation bar to the map.
addDragBar(ScreenPoint screenPoint)
Add the drag bar to the map.
loadWaitingMessage(Map Anchors anchor
ScreenPoint offsetPosition)
Loads the waiting message to the screen(in hide mode).
showWaitingMessage()
Shows the waiting message.
hideWaitingMessage()
Hides the waiting message from the map.
disableGrayScale()
Disable the grayscale mode.
enableGrayScale()
Enable the grayscale mode.
addOverlayToMap(Overlay overlay)
Adds an overlay on top of the map referenced to the Map.
showOverlay(string overlayName)
Shows an overlay above the map.
isOverlayVisible(string overlayName)
Returns true if the overlay is visible, or false if the overlay is invisible.
Overlay getOverlay()
Returns a reference to the overlay instance with the specified name, or null if there is no overlay with the specified name.
removeOverlay(string name)
Removes from the map the overlay with the specified name.
getLayersManager(LayersManager layersManager)
Sets the layers manager of the map.
LayersManager getLayersManager()
Returns the layers manager of the map.
setLoadingIconPosition(Anchor anchor
ScreenPoint offsetPosition)
Sets a new position to the map loading icon.
setLoadingIcon(string path)
Set the map loading icon (acceptable formats: SWF, PNG, JPG, GIF).
setScaleBarPosition(Map Anchors anchor
ScreenPoint offsetPosition)
Sets a new position to the map scale bar.
Map.MODE_PAN
Enables the user to pan the map.
Map.MODE_ZOOM_IN
Enables the user to zoom the map in by a click on the map.
Map.MODE_ZOOM_OUT
Enables the user to zoom the map out by a click on the map.
Map.MODE_INSERT_POLYGON
Enables the user to draw a polygon above the map.
Map.MODE_INSERT_POLYLINE
Enables the user to draw a polyline above the map.
Map.MODE_INSERT_CIRCLE
Enables the user to draw a circle above the map.
Map.MODE_EDIT_SHAPE
Enables the user to edit shapes (Polygons, Polylines, Circles) above the map.
Map.MODE_MEASURE
Map.EVENT_MAP_INITIALIZE
This event dispatches after the map has succsesfully initialized.
The event occurs only once during the application run time.
Map.EVENT_MAP_MODIFIED
This event dispatches after the map has been modified with a new position.
Map.EVENT_MAP_LOADED
This event dispatches after the map has succsesfully loaded.
Map.EVENT_MAP_CLICK
This event dispatches when the user clicks on the map.
Map.EVENT_MAP_DOUBLE_CLICK
This event dispatches when the user double click on the map.
Map.EVENT_MAP_MOUSE_MOVE
This event dispatches when the user moves on the map.
Map.EVENT_MAP_DRAG_START
This event dispatches when the user starts dragging the map.
Map.EVENT_MAP_DRAG_END
This event dispatches when the user stops dragging the map.
Map.EVENT_MAP_RESIZE
This event dispatches after the map has been resized.
Map.EVENT_GEO_RESULT
This event dispatches after a geocode response has arrived from the server.
Map.VIEW_VECTOR
A vector map view.
Map.VIEW_RASTER
A raster map view.
Map.VIEW_SATELLITE
A satellite images view.
Map.VIEW_HYBRID
An Hybrid view.
The hybrid view is a mix between the standard map and the satellite images.
Map.UNIT_METRIC
metric units.
Map.UNIT_IMPERIAL
Imperial units.
Map.ALIGN_TOP_LEFT
The object will be aligned to the top left corner of the map.
Map.ALIGN_TOP_CENTER
The object will be aligned to the map top center.
Map.ALIGN_TOP_RIGHT
The object will be aligned to the top right corner of the map.
Map.ALIGN_CENTER_LEFT
The object will be aligned to the map left center.
Map.ALIGN_CENTER_CENTER
The object will be aligned to the map center.
Map.ALIGN_CENTER_RIGHT
The object will be aligned to the map right center.
Map.ALIGN_BOTTOM_LEFT
The object will be aligned to the bottom left corner of the map.
Map.ALIGN_BOTTOM_CENTER
The object will be aligned to the map bottom center.
Map.ALIGN_BOTTOM_RIGHT
The object will be anchored at the bottom right corner of the map.
Writes the map component into the specified DOM container.
The ContextMenu class allows you to add a right click context menu to the map.
You should define a ContextMenu object and then attach the instance to the required map(s).
This class defines a map size.
The ScreenPoint class represent a point on the viewport of the map by an X and Y coordinate in pixels.
This is the base class of the provided coordinates classes.
The Bounds class represent a rectangular area of the map in geographical coordinates.
The Address class represent a specific address information, with its coordinates.
Inheritance: EventListener > Route
Inheritance: Layer > VectorLayer > LocalVectorLayer
Inheritance: Layer > LayersCollection
Inheritance: Shape > Marker
Inheritance: Shape > Poly
Inheritance: Shape > Circle
The Overlay class is used to add an HTML based overlay on the map.
Inheritance: Coordinate > LatLong

Inheritance: Layer > LayersCollection > LayersManager
The RouteVectorLayer class is the presented layer of a route above the map.
With this class, you can set the route style.
Inheritance: EventListener > Geocode