Class: LayerDetailsView

LayerDetailsView()

A panel with additional information about a Layer (a Map Asset like imagery or vector data), plus some UI for updating the appearance of the Layer on the map, such as the opacity.

Screenshot

Constructor

new LayerDetailsView()

Since:
  • 2.18.0
Source:

Extends

  • Backbone.View

Members

className :string

The HTML classes to use for this view's element
Type:
  • string
Source:

classes :Object

Classes that are used to identify the HTML elements that comprise this view.
Type:
  • Object
Properties:
Name Type Description
open string The class to add to the outermost HTML element for this view when the layer details view is open/expanded (not hidden)
toggle string The element in the template that acts as a toggle to close/hide the details view
sections string The container for all of the LayerDetailViews.
label string The label element for the layer that displays a title in the header of the details view
notification string The element that holds the notification message, if there is one. Inserted before all the details sections.
badge string The class to add to the badge element that is shown when the layer has a notification message.
Source:

isOpen :Boolean

Whether or not the layer details view is open
Type:
  • Boolean
Source:

model :MapAsset

The MapAsset model that this view uses
Type:
Source:

sections :Array.<DetailSectionOption>

A list of sections to render within this view that give details about the MapAsset, or allow editing of the MapAsset appearance. Each section will have a title and its content will be collapsible.
Type:
Source:

template :Underscore.template

The primary HTML template for this view
Type:
  • Underscore.template
Source:

type :string

The type of View this is
Type:
  • string
Source:

Methods

close()

Hide/collapse the Layer Details panel. Closing the panel also changes the MapAsset model's 'selected attribute' to false.
Source:

events() → {Object}

Creates an object that gives the events this view will listen to and the associated function to call. Each entry in the object has the format 'event selector': 'function'.
Source:
Returns:
Type
Object

initialize(optionsopt)

Executed when a new LayerDetailsView is created
Parameters:
Name Type Attributes Description
options Object <optional>
A literal object with options to pass to the view
Source:

open()

Show/expand the Layer Details panel. Opening the panel also changes the MapAsset model's 'selected attribute' to true.
Source:

render() → {LayerDetailsView}

Renders this view
Source:
Returns:
Returns the rendered view element
Type
LayerDetailsView

updateModel(newModel)

Updates the MapAsset model set on the view then re-renders the view and displays information about the new model.
Parameters:
Name Type Description
newModel MapAsset | null the new MapAsset model to use to render the view. If set to null, then the view will be rendered without any layer information.
Source: