new Basemap(options, preloadopt)
Class that provides an ol.Map with base layers and labels
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options |
Object | Constructor options | ||
preload |
number |
<optional> |
0 | Preload option for base layer |
- Mixes In:
- Source:
- See:
Extends
- ol.Map
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 | Description |
|---|---|---|
BASE |
string | Label type for base layer |
PHOTO |
string | Label type for photo layer |
- Mixes In:
- Source:
Methods
getBaseLayers() → {nyc.Basemap.BaseLayers}
Returns the base layers
- Source:
Returns:
hidePhoto()
Hide photo layer
- Source:
showLabels(labelType)
Show the specified label layer
Parameters:
| Name | Type | Description |
|---|---|---|
labelType |
nyc.Basemap.BaseLayers | The label type to show |
- Source:
showPhoto(layer)
Show photo layer
Parameters:
| Name | Type | Description |
|---|---|---|
layer |
number | The photo year to show |
- Source:
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: