Class: Polyline

bemap.Polyline(coordinates, options)

Base class for Polyline.

Constructor

new Polyline(coordinates, options)

Parameters:
Name Type Description
coordinates bemap.Coordinate Array of bemap.Coordinate.
options Object See below the available values.
Properties
Name Type Description
style bemap.LineStyle Style of poyline used by the renderer.
name String Name of polyline.
properties Object custom object.
Source:

Members

(protected) callback :function

Type:
  • function
Source:

(protected) coords :Array.<bemap.Coordinate>

Type:
Source:

(protected) events :Array

Type:
  • Array
Source:

(protected) id :String

Type:
  • String
Source:

(protected) layer :Object

Type:
  • Object
Source:

(protected) map :Object

Type:
  • Object
Source:

(protected) name :String

Type:
  • String
Source:

(protected) native :Object

Type:
  • Object
Source:

(protected) properties :Object

Type:
  • Object
Source:

(protected) style :bemap.LineStyle

Type:
Source:

Methods

addCoordinate(coordinate) → {bemap.Polyline}

Add a coordinate.
Parameters:
Name Type Description
coordinate bemap.Coordinate bemap.Coordinate.
Source:
Returns:
this
Type
bemap.Polyline

addLonLat(lon, lat) → {bemap.Polyline}

Add a coordinate.
Parameters:
Name Type Description
lon double Longitude in degres deciaml (WGS84).
lat double Latitude in degres deciaml (WGS84).
Source:
Returns:
this
Type
bemap.Polyline

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

Define the draggable capability for bemap.Polyline.
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:
Returns:
bemap.listener.
Type
bemap.Listener

getCoordinate(index) → {bemap.Coordinate}

Return the coordinate. See bemap.Coordinate.
Parameters:
Name Type Description
index int Index of coordinate in polyline.
Source:
Returns:
Return the coordinate. See bemap.Coordinate.
Type
bemap.Coordinate

getCoordinates() → {bemap.Coordinate}

Return an array of coordinate. See bemap.Coordinate.
Source:
Returns:
Return an array of the coordinate. See bemap.Coordinate.
Type
bemap.Coordinate

getId() → {String}

Return the id of the polyline.
Source:
Returns:
Return the id of the polyline.
Type
String

getLatLonArray(index) → {array}

Return an array with latitude and longitude in degres decimal (WGS94).
Parameters:
Name Type Description
index int Index of coordinate in polyline.
Source:
Returns:
Return an array with latitude and longitude in degres decimal (WGS94).
Type
array

getLatLonArrays() → {array}

Return an array with latitude and longitude in degres decimal (WGS94). Example: [ [lat, lon], [lat, lon], ... ]
Source:
Returns:
Return an array with latitude and longitude in degres decimal (WGS94).
Type
array

getLonLatArray(index) → {array}

Return an array with longitude and latitude in degres decimal (WGS94).
Parameters:
Name Type Description
index int Index of coordinate in polyline.
Source:
Returns:
Return an array with longitude and latitude in degres decimal (WGS94).
Type
array

getLonLatArrays() → {array}

Return an array with longitude and latitude in degres decimal (WGS94). Example: [ [lon, lat], [lon, lat], ... ]
Source:
Returns:
Return an array with longitude and latitude in degres decimal (WGS94).
Type
array

getName() → {String}

Return the name of the polyline.
Source:
Returns:
Return the name of the polyline.
Type
String

getStyle() → {bemap.LineStyle}

Return the style of the polyline.
Source:
Returns:
Return the style of the polyline.
Type
bemap.LineStyle

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

Set the listner when an specified eventType occur on bemap.Polyline.
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:
Returns:
this.
Type
bemap.Polyline

remove() → {bemap.Polyline}

Remove the Polyline from the layer.
Source:
Returns:
this
Type
bemap.Polyline

setId(id) → {bemap.Polyline}

Define the id of polyline
Parameters:
Name Type Description
id String the new id to set.
Source:
Returns:
this
Type
bemap.Polyline

setName(name) → {bemap.Polyline}

Define the name of polyline
Parameters:
Name Type Description
name String the new name to set.
Source:
Returns:
this
Type
bemap.Polyline