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
- Mixes In:
- Source:
Properties:
Name Type Default Description BASEstring base Label type for base layer
PHOTOstring photo Label type for photo layer
Methods
-
getBaseLayers()
-
Returns the base layers
- Source:
Returns:
-
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 targetElement 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 labelTypemodule:nyc/BasemapHelper~BasemapHelper The label type to show
- Source:
-
showPhoto( [year])
-
Show photo layer
Parameters:
Name Type Argument Description yearnumber <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
- Source:
Properties:
Name Type Description targetElement | string The target DOM node for creating the map
-
BaseLayers
-
Object type to hold base layers
Type:
- Object
- Mixes In:
- Source:
Properties:
Name Type Description baseObject The base layer
labelsObject.<string, (ol.layer.Base|L.Layer)> The label layers
photosObject.<string, (ol.layer.Base|L.Layer)> The photo layers