Class: Basemap

nyc/leaf/Basemap~ Basemap


new Basemap(options)

Create an instance of Basemap

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:

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:

Base layer object

Type
module:nyc/BasemapHelper~BasemapHelper.BaseLayers

getStorage()

Get the storage used for loading and saving data

Source:
Returns:

srorage

Type
module:nyc/leaf/LocalStorage~LocalStorage

hidePhoto()

Hide photo layer

Source:

hookupEvents(node)

Hook up events

Parameters:
Name Type Description
node Element

The DOM node for the map

Mixes In:
Source:

hookupEvents(node)

Hook up events

Parameters:
Name Type Description
node Element

The DOM node for the map

Mixes In:
Source:

loadLayer(event)

Loads a layer from a file

Parameters:
Name Type Description
event jQuery.Event

Event object

Mixes In:
Source:

loadLayer(event)

Loads a layer from a file

Parameters:
Name Type Description
event jQuery.Event

Event object

Mixes In:
Source:

showLabels(labelType)

Show labels by type

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 photo layers ordered by year

Mixes In:
Source:
Returns:

Array of photo layers

Type
Array.<(ol.layer.Base|L.Layer)>

sortedPhotos()

Returns the photo layers ordered by year

Mixes In:
Source:
Returns:

Array of photo layers

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:

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: