EMS.BaseMap

This defines the standard WhereIs base map.

Inherits from

Summary
EMS.BaseMapThis defines the standard WhereIs base map.
Properties
minZoomLevel{Integer}|{EMS.Zoom} Minimum (most zoomed out) level.
maxZoomLevel{Integer}|{EMS.Zoom} Maximum (most zoomed in) level.
textSize{EMS.TextSize} Text size on the maps.
fullsizeControls{Boolean} a flag indicating whether to use fullsize controls.
zoomFocus{OpenLayers.Pixel} zoomFocus as a pixel location.
Constants
EVENT_TYPES{Array}
Constructor
EMS.BaseMapConstructs a map.
Functions
deactivateMake the map unresponsive to all mouse and keyboard input.
activateMake the map respond to mouse and keyboard input again.
updateSizeThis function should be called by any external code which dynamically changes the size of the map div (because mozilla wont let us catch the “onresize” for an element)
getMinZoomLevel{Integer} Returns the minimum zoom level.
getMaxZoomLevel{Integer} Returns the maximum zoom level.
addMarkerShortcut method for adding a marker to the map.
removeMarkerShortcut method for removing a marker from the map.
clearMarkersShortcut method for clearing all markers from the map.
getMarkers
setRouteShortcut method for setting the route.
getRouteShortcut method for getting the current route, which might be null if not set.
clearRouteShortcut method for clearing any route from the current map.
getLayerByNameFinds a layer by a given name.
setZoomFocusSets the focus in pixels for zoom in and zoom out events (null for default behaviour)

Properties

minZoomLevel

{Integer}|{EMS.Zoom} Minimum (most zoomed out) level.

maxZoomLevel

{Integer}|{EMS.Zoom} Maximum (most zoomed in) level.

textSize

{EMS.TextSize} Text size on the maps.  Set to EMS.TextSize.BIGTEXT for large text maps.  Defaults to EMS.TextSize.NORMAL.

fullsizeControls

{Boolean} a flag indicating whether to use fullsize controls.  If true, the controls will be fullsize, if false they will be small.  If not set they will be handled dynamically.

zoomFocus

{OpenLayers.Pixel} zoomFocus as a pixel location.  Leave null for default behaviour

Constants

EVENT_TYPES

{Array}

Constructor

EMS.BaseMap

Constructs a map.

Parameters

div{Mixed} is either a {String} which represents the HTML id or a {DOMElement} to place the map into.  This will also accept a {JQuery} object and inject the map into the first item in object.
options{Object} properties that can be used to override current map properties.  Available parameters include:
onInita callback function to which the map object should be passed once initialised.
controlsspecifies a list of controls that should be displayed.
zoom{Number} specifies a zoom level EMS.Zoom.MINIMUM and EMS.Zoom.MAXIMUM.
center{EMS.LonLat} specifies the maps center point
showMaxExtent{Boolean} When set to true (default) and no center is provided the full map of Australia will display.  If set to false no map will be displayed until a center point or bounds are set.  If you find Australia flashing up before going to your location set this to false.
fullsizeControls{Boolean} specifies if the default map controls should be used or the fullsize map controls.
textSize{EMS.TextSize} Set to EMS.TextSize.BIGTEXT for large text maps.  Default: EMS.TextSize.NORMAL

Functions

deactivate

deactivate: function()

Make the map unresponsive to all mouse and keyboard input.

Will still respond to the inactiveclick event however.

activate

activate: function()

Make the map respond to mouse and keyboard input again.

updateSize

updateSize: function()

This function should be called by any external code which dynamically changes the size of the map div (because mozilla wont let us catch the “onresize” for an element)

getMinZoomLevel

getMinZoomLevel: function()

Returns

{Integer} Returns the minimum zoom level.

getMaxZoomLevel

getMaxZoomLevel: function()

Returns

{Integer} Returns the maximum zoom level.

addMarker

addMarker: function(marker)

Shortcut method for adding a marker to the map.

Parameters

marker{<EMS.Marker>}

removeMarker

removeMarker: function(marker)

Shortcut method for removing a marker from the map.

Parameters

marker{<EMS.Marker>}

clearMarkers

clearMarkers: function()

Shortcut method for clearing all markers from the map.  If multiple markers layers are present, it will clear them all.

getMarkers

getMarkers: function()

Returns

{Array}returns all the markers on the map.  This will never return null, even if no markers layer has been defined, it will always return an empty array.

setRoute

setRoute: function(route)

Shortcut method for setting the route.  This simply delegates to the route layer.

Parameters

route{Object} route object.

getRoute

getRoute: function()

Shortcut method for getting the current route, which might be null if not set.  This simply delegates to the route layer.

Returns

{<EMS.Route>}this current route, this may return null.

clearRoute

clearRoute: function()

Shortcut method for clearing any route from the current map.  This simply delegates to the route layer.

getLayerByName

getLayerByName: function(name)

Finds a layer by a given name.

Parameters

name{EMS.Layer}|{String} is the name of the layer.  See EMS.Layer for default defined names.

Returns

{OpenLayers.Layer} If one exists for the given name, null otherwise.

setZoomFocus

setZoomFocus: function(focus)

Sets the focus in pixels for zoom in and zoom out events (null for default behaviour)

Parameters

focus{OpenLayers.Pixel} the pixel location of the zoom focus
Defines the namespace for EMS.TextSize.
This class represents a screen coordinate, in x and y coordinates
deactivate: function()
Make the map unresponsive to all mouse and keyboard input.
activate: function()
Make the map respond to mouse and keyboard input again.
updateSize: function()
This function should be called by any external code which dynamically changes the size of the map div (because mozilla wont let us catch the “onresize” for an element)
getMinZoomLevel: function()
{Integer} Returns the minimum zoom level.
getMaxZoomLevel: function()
{Integer} Returns the maximum zoom level.
addMarker: function(marker)
Shortcut method for adding a marker to the map.
removeMarker: function(marker)
Shortcut method for removing a marker from the map.
clearMarkers: function()
Shortcut method for clearing all markers from the map.
getMarkers: function()
setRoute: function(route)
Shortcut method for setting the route.
getRoute: function()
Shortcut method for getting the current route, which might be null if not set.
clearRoute: function()
Shortcut method for clearing any route from the current map.
getLayerByName: function(name)
Finds a layer by a given name.
setZoomFocus: function(focus)
Sets the focus in pixels for zoom in and zoom out events (null for default behaviour)
Instances of OpenLayers.Map are interactive maps embedded in a web page.
Minimum (most zoomed out) value.
Maximum (most zoomed in) value.
Defines the namespace for EMS.Layer.
Close