Class: MapMgr

nyc/ol/MapMgr~ MapMgr


<abstract> new MapMgr(options)

Create an instance of Basemap

Parameters:
Name Type Description
options module:nyc/ol/MapMgr~MapMgr.Options

Constructor options

Source:

Mixins

FEATURE_DECORATIONS

Members


layer :ol.layer.Vector

The vector layer for facilities

Type:
  • ol.layer.Vector
Source:

locationMgr :module:nyc/ol/LocationMgr~LocationMgr

The LocationMgr

Type:
Source:

map :ol.Map

The map

Type:
  • ol.Map
Source:

The popup

Type:
Source:

source :module:nyc/ol/source/FilterAndSort~FilterAndSort

The data to display in the map layer

Type:
Source:

view :ol.View

The view

Type:
  • ol.View
Source:

Methods


<static> tipFunction(feature)

Default facility feature decorations

Parameters:
Name Type Description
feature ol.Feature

The feature

Source:
Returns:

The tip

Type
Object.<string, string>

<abstract> createDecorations(options)

Create the feature decorations

Parameters:
Name Type Description
options module:nyc/ol/MapMgr~MapMgr.Options

Constructor options

Source:
Returns:

The embellished decorations

Type
Array.<Object.<string, Object>>

<abstract> createLayer(source, style)

Create the leayer

Parameters:
Name Type Description
source module:nyc/ol/MapMgr~MapMgr.Options

The data source for the layer

style ol.style.Style

The style for the layer

Source:
Returns:

The layer

Type
ol.layer.Vector

<abstract> createParentFormat(options)

Create the parent format for the source

Parameters:
Name Type Description
options module:nyc/ol/MapMgr~MapMgr.Options

Constructor options

Source:
Returns:

The parent format

Type
ol.format.Feature

directionsTo(feature)

Provides directions to the provided facility feature

Parameters:
Name Type Description
feature ol.Feature

OpenLayers feature

Source:

<protected> expandDetail(event)

Handles the event triggered when a rendered feature's collapsible details is expanded

Parameters:
Name Type Description
event Object

Event object

Source:

<protected> getFromAddr()

Convert current user location into usable form for Google directions API

Source:
Returns:

Location coordinates or name

Type
string | Array.<number>

highlight( [feature])

Highlight a single feature on the map

Parameters:
Name Type Argument Description
feature ol.Feature <optional>

The feature

Source:

<protected> located(location)

Handles geocoded and geolocated events

Parameters:
Name Type Description
location module:nyc/Locator~Locator.Result

Location

Source:

<protected> ready(features)

Handles features after they are loaded

Parameters:
Name Type Description
features Array.<ol.Feature>

The facility features

Source:

resetList(event)

Reset the facilities list

Parameters:
Name Type Description
event Object

Event object

Source:

zoomTo(feature)

Centers and zooms to the provided feature

Parameters:
Name Type Description
feature ol.Feature

OpenLayers feature

Source:

Type Definitions


Options

Constructor options for module:nyc/ol/MapMgr~MapMgr

Type:
  • Object
Properties:
Name Type Argument Default Description
facilityUrl string

The URL for the facility features data

geoclientUrl string

The URL for the Geoclient geocoder with approriate keys

mapTarget jQuery | Element | string

The target element for the map

searchTarget jQuery | Element | string | boolean

The target element for search input

listTarget jQuery | Element | string

The target element for facility list

facilityType string <optional>
Facilities

Title for the facilites list

locationMarkerUrl string <optional>

A URL to an image for use as the search location symbol

facilityMarkerUrl string <optional>

A URL to an image for use as a falcility symbol

facilityMarkerColor Array.<number> <optional>

An RGB color for use as a falcility symbol

facilityStyle ol.style.Style <optional>

The styling for the facilities layer

highlightStyle ol.style.Style <optional>

The styling for highlighting facilities layer

facilitySearch module:nyc/Search~Search.FeatureSearchOptions | boolean <optional>
true

Search options for feature searches or true to use default search options

mouseWheelZoom boolean <optional>
false

Allow mouse wheel map zooming

startAt string <optional>

A starting location

metric boolean <optional>
false

Use metric distance units

Source: