OpenSpace.Layer.MapOverlay

Instances of OpenSpace.Layer.MapOverlay are used to display HTML data that scrolls and zooms with the map.  The overlay has a given position and size in map units.

Inherits from

  • <OpenLayers.Layer>
Summary
OpenSpace.Layer.MapOverlayInstances of OpenSpace.Layer.MapOverlay are used to display HTML data that scrolls and zooms with the map.
Properties
position{OpenSpace.MapPoint} Position of the overlay on the map.
size{OpenSpace.MapSize} Size of the overlay on the map.
html{<String>} Contents of the overlay to display on the map.
Constructor
OpenSpace.Layer.MapOverlay
Functions
destroyDestroy this overlay layer.
setHTMLSet new HTML contents for this overlay.
setPositionSet a new position for this overlay.
setSizeSet a new size for this overlay.
moveToMove the overlay when the base map layer is moved.

Properties

position

{OpenSpace.MapPoint} Position of the overlay on the map.

size

{OpenSpace.MapSize} Size of the overlay on the map.

html

{<String>} Contents of the overlay to display on the map.  Can contain HTML tags.

Constructor

OpenSpace.Layer.MapOverlay

Parameters

name{String}
options{Object} Can set position, size and html contents

Functions

destroy

destroy: function()

Destroy this overlay layer.

setHTML

setHTML: function(html)

Set new HTML contents for this overlay.

Parameters

html{String}

setPosition

setPosition: function(px)

Set a new position for this overlay.

Parameters

px{OpenSpace.MapPoint}

setSize

setSize: function(size)

Set a new size for this overlay.

Parameters

size{OpenSpace.MapSize}

moveTo

moveTo:function(bounds,
zoomChanged,
dragging)

Move the overlay when the base map layer is moved.

Parameters

bound{<OpenLayers.Bounds>}
zoomChanged{Boolean} Tells when zoom has changed, as layers have to do some init work in that case.
dragging{Boolean}
This class represents an eastings and northings pair of coordinates in British National Grid (BNG) format
Instances of this class represent a width/height pair in map units
destroy: function()
Destroy this overlay layer.
setHTML: function(html)
Set new HTML contents for this overlay.
setPosition: function(px)
Set a new position for this overlay.
setSize: function(size)
Set a new size for this overlay.
moveTo:function(bounds,
zoomChanged,
dragging)
Move the overlay when the base map layer is moved.
Close