# Class: Marker

## bemap.Marker(coordinates, options)

Base class for marker.

## Constructor

#### new Marker(coordinates, options)

##### Parameters:

Name | Type | Description
--- | --- | ---
`coordinates` | bemap.Coordinate | in bemap.Coordinate.
`options` | Object | See below the available values. ###### Properties
Name | Type | Description
--- | --- | ---
`icon` | bemap.Icon | Style of marker used by the renderer.
`name` | String | Name of marker.
`properties` | Object | custom object.

Source:
  - bemap-model/bemap-marker.js, line 16

### Members

#### (protected) callback :function

##### Type:

- function

Source:
  - bemap-model/bemap-marker.js, line 77

#### (protected) coordinate :bemap.Coordinate

##### Type:

- bemap.Coordinate

Source:
  - bemap-model/bemap-marker.js, line 41

#### (protected) events :Array

##### Type:

- Array

Source:
  - bemap-model/bemap-marker.js, line 71

#### (protected) icon :bemap.Icon

##### Type:

- bemap.Icon

Source:
  - bemap-model/bemap-marker.js, line 47

#### (protected) id :String

##### Type:

- String

Source:
  - bemap-model/bemap-marker.js, line 53

#### (protected) layer :Object

##### Type:

- Object

Source:
  - bemap-model/bemap-marker.js, line 35

#### (protected) map :Object

##### Type:

- Object

Source:
  - bemap-model/bemap-marker.js, line 29

#### (protected) name :String

##### Type:

- String

Source:
  - bemap-model/bemap-marker.js, line 59

#### (protected) native :Object

##### Type:

- Object

Source:
  - bemap-model/bemap-marker.js, line 23

#### (protected) properties :Object

##### Type:

- Object

Source:
  - bemap-model/bemap-marker.js, line 83

#### (protected) textStyle :String

##### Type:

- String

Source:
  - bemap-model/bemap-marker.js, line 65

### Methods

#### (protected) draggable(callback, options) → {bemap.Listener}

Define the draggable capability for bemap.Marker.

##### Parameters:

Name | Type | Description
--- | --- | ---
`callback` | function | Function will be called when the specified eventType is occur.
`options` | object | Options. ###### Properties
Name | Type | Description
--- | --- | ---
`layerFilter` | bemap.Layer | set the bemap layer used as filter.

Source:
  - bemap-model/bemap-marker.js, line 245

##### Returns:

bemap.listener.

Type
  bemap.Listener

#### getCoordinate() → {bemap.Coordinate}

Return the bemap.Coordinate. See bemap.Coordinate.

Source:
  - bemap-model/bemap-marker.js, line 191

##### Returns:

Return the bemap.Coordinate. See bemap.Coordinate.

Type
  bemap.Coordinate

#### getIcon() → {bemap.Icon}

Return the bemap.Icon that define the style of the marker.

Source:
  - bemap-model/bemap-marker.js, line 91

##### Returns:

Return the bemap.Icon that define the style of the marker.

Type
  bemap.Icon

#### getId() → {String}

Return the id of the marker.

Source:
  - bemap-model/bemap-marker.js, line 111

##### Returns:

Return the id of the marker.

Type
  String

#### getName() → {String}

Return the name of the marker.

Source:
  - bemap-model/bemap-marker.js, line 151

##### Returns:

Return the name of the marker.

Type
  String

#### getProperties() → {String}

Return the properties of the marker.

Source:
  - bemap-model/bemap-marker.js, line 131

##### Returns:

Return the properties of the marker.

Type
  String

#### getTextStyle() → {bemap.TextStyle}

Return the bemap.TextStyle that define the style of text.

Source:
  - bemap-model/bemap-multimarker.js, line 214

##### Returns:

Return the bemap.TextStyle that define the style of text.

Type
  bemap.TextStyle

#### getTextStyle() → {bemap.TextStyle}

Return the bemap.TextStyle that define the style of text.

Source:
  - bemap-model/bemap-marker.js, line 171

##### Returns:

Return the bemap.TextStyle that define the style of text.

Type
  bemap.TextStyle

#### on(eventType, callback, options) → {bemap.Marker}

Set the listner when an specified eventType occur on bemap.Marker.

##### Parameters:

Name | Type | Description
--- | --- | ---
`eventType` | bemap.Map.EventType | Event type.
`callback` | function | Function will be called when the specified eventType is occur.
`options` | object | options.

Source:
  - bemap-model/bemap-marker.js, line 230

##### Returns:

this.

Type
  bemap.Marker

#### remove() → {bemap.Marker}

Remove the Marker from the layer.

Source:
  - bemap-model/bemap-marker.js, line 215

##### Returns:

this

Type
  bemap.Marker

#### setCoordinate(coordinate) → {bemap.Marker}

Set the coordinates of the marker.

##### Parameters:

Name | Type | Description
--- | --- | ---
`coordinate` | bemap.Coordinate | the new coordinates to set.

Source:
  - bemap-model/bemap-marker.js, line 201

##### Returns:

this

Type
  bemap.Marker

#### setIcon(icon) → {bemap.Marker}

Set the icon style of the marker.

##### Parameters:

Name | Type | Description
--- | --- | ---
`icon` | bemap.Icon | the new icon style to set.

Source:
  - bemap-model/bemap-marker.js, line 101

##### Returns:

this

Type
  bemap.Marker

#### setId(id) → {bemap.Marker}

Define the id of marker

##### Parameters:

Name | Type | Description
--- | --- | ---
`id` | String | the new id to set.

Source:
  - bemap-model/bemap-marker.js, line 121

##### Returns:

this

Type
  bemap.Marker

#### setName(name) → {bemap.Marker}

Define the name of polyline

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | String | the new name to set.

Source:
  - bemap-model/bemap-marker.js, line 161

##### Returns:

this

Type
  bemap.Marker

#### setProperties(properties) → {bemap.Marker}

Define the properties of marker

##### Parameters:

Name | Type | Description
--- | --- | ---
`properties` | String | the new properties to set.

Source:
  - bemap-model/bemap-marker.js, line 141

##### Returns:

this

Type
  bemap.Marker

#### setTextStyle(icon) → {bemap.Marker}

Set the text style of the marker.

##### Parameters:

Name | Type | Description
--- | --- | ---
`icon` | bemap.TextStyle | the new text style to set.

Source:
  - bemap-model/bemap-marker.js, line 181

##### Returns:

this

Type
  bemap.Marker

#### setTextStyle(icon) → {bemap.MultiMarker}

Set the text style of the multimarker.

##### Parameters:

Name | Type | Description
--- | --- | ---
`icon` | bemap.TextStyle | the new text style to set.

Source:
  - bemap-model/bemap-multimarker.js, line 224

##### Returns:

this

Type
  bemap.MultiMarker