BaseLayer.js

  • BaseLayer()

    The BaseLayer constructor

  • getIndex()

    Returns the layer's index in the stack of layers

  • setVisible()

    Sets the visibility of the layer to visible or hidden

  • isVisible()

    Returns true if the layer is visible and false otherwise

BaseLayer()


constructor
abstract

The class from which all layer classes inherit

Options:
  • name(String)The name of the layer (default: '')
Events:
  • layer-showThe layer's visibility was changed to visible
  • layer-hideThe layer's visibility was changed to hidden
  • clickA click has been detected on the layer. Includes the position, of type 'LatLng', on the map.
Parameter Type Description
options Object The options of the layer

getIndex()


method

Returns the layer's index in the stack of layers

returns
Number - The layer's index

setVisible()


method

Sets the visibility of the layer to visible or hidden

Parameter Type Description
visible Boolean If true, the the layer will be visible; if false, it will be hidden

isVisible()


method

Returns true if the layer is visible and false otherwise

returns
Boolean - If true, the layer is visible; if false, the layer is hidden