Class: Basemap

nyc/leaf/Basemap~ Basemap


new Basemap(options)

Class that provides an L.Map with base layers and labels

Parameters:
Name Type Description
options module:nyc/leaf/Basemap~Basemap.Options

Constructor options

Mixes In:
Source:
See:

Extends

  • L.Map

Members


<static, constant> CENTER :L.LatLng

The center of New York City

Type:
  • L.LatLng
Source:

<static, constant> EXTENT :L.LatLngBounds

The bounds of New York City

Type:
  • L.LatLngBounds
Source:

LabelType :string

Enumerator for label types

Type:
  • string
Properties:
Name Type Default Description
BASE string base

Label type for base layer

PHOTO string photo

Label type for photo layer

Mixes In:
Source:

Methods


getBaseLayers()

Returns the base layers

Source:
Returns:
Type
module:nyc/BasemapHelper~BasemapHelper.BaseLayers

getStorage()

Get the storage used for laoding and saving data

Source:
Returns:

srorage

Type
module:nyc/leaf/LocalStorage~LocalStorage

hidePhoto()

Hide photo layer

Source:

hookupEvents(target)

Hook up events

Parameters:
Name Type Description
target Element

The DOM node for the map

Mixes In:
Source:

loadLayer()

Returns the base layers

Mixes In:
Source:
Returns:
Type
jQuery.Event

showLabels(labelType)

Show photo layer

Parameters:
Name Type Description
labelType module:nyc/BasemapHelper~BasemapHelper

The label type to show

Source:

showPhoto( [year])

Show photo layer

Parameters:
Name Type Argument Description
year number <optional>

The photo year to show - shows the latest year if not provided

Source:

sortedPhotos()

Returns the base layers

Mixes In:
Source:
Returns:
Type
Array.<(ol.layer.Base|L.Layer)>

Type Definitions


Options

Constructor options for module:nyc/leaf/Basemap~Basemap

Type:
  • Object
Properties:
Name Type Description
target Element | string

The target DOM node for creating the map

Source:

BaseLayers

Object type to hold base layers

Type:
  • Object
Properties:
Name Type Description
base Object

The base layer

labels Object.<string, (ol.layer.Base|L.Layer)>

The label layers

photos Object.<string, (ol.layer.Base|L.Layer)>

The photo layers

Mixes In:
Source: