Class: Basemap

nyc/ol/Basemap~ Basemap


new Basemap(options [, preload])

Create an instance of Basemap

Parameters:
Name Type Argument Default Description
options olx.MapOptions

Constructor options

preload number <optional>
0

Preload option for base layer

Mixes In:
Source:
See:

Extends

  • ol.PluggableMap

Members


<static, constant> CENTER :ol.Coordinate

The center of New York City

Type:
  • ol.Coordinate
Source:

<static, constant> EXTENT :ol.Extent

The bounds of New York City

Type:
  • ol.Extent
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 layers

Type
nyc.Basemap.BaseLayers

<protected> getStorage()

Get the storage used for loading and saving data

Source:
Returns:

srorage

Type
nyc.ol.storage.Local

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 the specified label layer

Parameters:
Name Type Description
labelType nyc.Basemap.BaseLayers

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


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: