# Class: Map

## vcs.vcm.maps.Map

Map Base Class, each different map is derived from this abstract base class.

#### new vcs.vcm.maps.Map(options)

  Name | Type | Description
  --- | --- | ---
  `options` | Object |

  ##### Fires:

  - `CLICKED` (vcs.vcm.maps) - vcs.vcm.event.EventType.CLICKED is triggered when the globe is clicked, is always called before `vcs.vcm.maps#event:MAP_CLICKED` and FEATURE_CLICKED and `vcs.vcm.maps.Cesium#event:CLICKED_FIRST_HIT`. The clicked position in WGS84 coordinates as longitude, latitude and height properties. The clicked position is always the point on the terrain.
  - `FEATURE_CLICKED` (vcs.vcm.maps) - vcs.vcm.event.EventType.FEATURE_CLICKED is called when a feature is clicked for example a building or a vector object. Is Exclusive with `vcs.vcm.maps#event:MAP_CLICKED` & `vcs.vcm.maps#event:FEATURE_CTRL_CLICKED`. `vcs.vcm.layer.Layer` the layer which the feature is part of
  - `FEATURE_CTRL_CLICKED` (vcs.vcm.maps) - vcs.vcm.event.EventType.FEATURE_CTRL_CLICKED is called when a feature is clicked AND the CTRL key is pressed for example a building or a vector object. Is Exclusive with `vcs.vcm.maps#event:MAP_CLICKED` & `vcs.vcm.maps#event:FEATURE_CLICKED`. `vcs.vcm.layer.Layer` the layer which the feature is part of
  - `MAP_CLICKED` (vcs.vcm.maps) - vcs.vcm.event.EventType.MAP_CLICKED is triggered when the map is clicked. Is not triggered if the click is on a 3d object. This is providing the same data as the CLICKED Event but is only called if the click is directly on the map.

### Subclasses

- vcs.vcm.maps.Cesium
- vcs.vcm.maps.Oblique
- vcs.vcm.maps.Openlayers

### Extends

- vcs.vcm.Object

### Members

#### className{string}

  class Name of the Object

#### mapElement{HTMLElement}

#### movementDisabled{boolean}

  if true, no movements should occur

#### name{string}

  unique Name

### Methods

#### activate(viewPoint){Promise}

  activates the map, if necessary initializes the map. this is a dummy method most likely to be overwritten by the specific map class.

  Name | Type | Description
  --- | --- | ---
  `viewPoint` | vcs.vcm.util.ViewPoint | the optional starting Viewpoint of the map after activation.

  ##### Fires:

  - `MAP_ACTIVATED` (vcs.vcm.maps) - vcs.vcm.event.EventType.MAP_ACTIVATED is triggered when a map is activated (and on each map switch).

#### activateMouseClickEvents(activate)

  activates mouseClick Events on objects

  Name | Type | Description
  --- | --- | ---
  `activate` | boolean |

  Deprecated
    - 3.5

#### deactivate(){Promise}

  deactivates the map returns the current viewpoint of the map to enable a change between different maps.

  ##### Returns:

  position returns the current viewpoint of the map.

#### dispose()

  disposes the map

#### getActiveMouseClickEvents(){boolean}

  returns whether mouse click events is activated or not

  Deprecated
    - 3.5

#### getClassName(){string} inherited

  returns the class name of this object.

  Deprecated
    - Yes

  ##### Returns:

  className

#### getConfigObject(){Object} inherited

#### getId(){string} inherited

  returns the id of this object

  Deprecated
    - Yes

#### getName(){string} inherited

  returns the name of the Object, the name is either given by the config Object or a uuid is generated

  Deprecated
    - Yes

#### getViewPoint(opt_GroundPosition, opt_promise_flag){vcs.vcm.util.ViewPoint|Promise.<vcs.vcm.util.ViewPoint>}

  Name | Type | Description
  --- | --- | ---
  `GroundPosition` | boolean | whether to return the groundposition or not
  `promise_flag` | boolean |

#### gotoViewPoint(viewpoint, opt_duration, opt_maximumHeight, opt_callback)

  sets the view to the given viewpoint

  Name | Type | Description
  --- | --- | ---
  `viewpoint` | vcs.vcm.util.ViewPoint |
  `duration` | number | of the animation in secs
  `maximumHeight` | number | during animation (can be used to get rid of the bunny hop) gotoViewPoint
  `callback` | function |

#### isActive(){boolean}

  returns if this map is currently active

#### isInitialized(){boolean}

  checks if the mapobject is already initialized

  Deprecated
    - 3.5

#### isSupported(){boolean}

  checks if the current browser supports the MAP, also checks if all dependencies are there

  Deprecated
    - 3.5

#### pointIsVisible(coords){boolean}

  Name | Type | Description
  --- | --- | ---
  `coords` | ol.Coordinate | in WGS84 degrees