Class: Map

Map

new Map(string, spaceTypeEnum, coordinateSystem)

Parameters:
Name Type Description
string mapName

The name of the map.

spaceTypeEnum SpaceTypeEnum

The variety of mathematical space this map considers.

coordinateSystem CoordinateSystem

The coordinate system with respect to which this map gives position.

Source:

Methods

addEntity(entity) → {boolean}

Attach an entity to this map. This does not entail giving it a position.

Parameters:
Name Type Description
entity Entity

The entity to be attached to this map

Source:
Returns:

if successful returns true, false otherwise.

Type
boolean

mapEntitiesToSVG(width, width) → {string}

Create an SVG format image of the entities on the map, from placements having 2D center coordinates.

Parameters:
Name Type Description
width number

The pixel width of the image.

width number

The pixel height of the image.

Source:
Returns:

An SVG image displaying the contents of the map.

Type
string

removeEntity(entity) → {boolean}

Unattach an entity from this map.

Parameters:
Name Type Description
entity Entity

The entity to be unattached from this map

Source:
Returns:

if successful returns true, false otherwise.

Type
boolean

toString() → {string}

Source:
Returns:

string representation of this object.

Type
string