maps.nyc.gov

Class: FinderApp

nyc.FinderApp

new FinderApp(options)

An class for creating basic facility finder apps
Parameters:
Name Type Description
options nyc.FinderApp.Options Constructor options
Source:

Members

(static, constant) FULL_SCREEN_INFO_HTML :string

Type:
  • string
Source:

(static, constant) INFO_PAGER_HTML :string

Type:
  • string
Source:

(static, constant) TEMPLATE_HTML :string

Basic HTML to support facility finder
Type:
  • string
Source:

finderSource :nyc.ol.source.FilteringAndSorting

Type:
Source:

map :ol.Map

Type:
  • ol.Map
Source:

view :ol.View

Type:
  • ol.View
Source:

Methods

detailExpanded(event)

Method to handle expanded facility detail
Parameters:
Name Type Description
event JQuery.Event The expand event
Source:

directionsTo(event)

Method to get directions from user location to facility location on directions button click
Parameters:
Name Type Description
event JQuery.Event The button click event
Source:

listFacilities()

Method to list facilities
Source:

listNextPage()

Method to page through facilities
Source:

located(location)

Method to handle nyc.Locate events
Parameters:
Name Type Description
location nyc.Locate.Result The location
Source:

mapClick(event)

Method to handle map click and show popup if appropriate
Parameters:
Name Type Description
event ol.MapBrowserEvent The map click event
Source:

showPopup(features)

Method to show popup on a facility feature
Parameters:
Name Type Description
features Array.<ol.Feature> The features to show in the popup
Source:

zoomTo(event)

Method to zoom to facility location on map button click
Parameters:
Name Type Description
event JQuery.Event The button click event
Source:

Type Definitions

Options

Object type to hold constructor options for nyc.FinderApp
Type:
  • Object
Properties:
Name Type Attributes Default Description
map ol.Map The map for the finder app
finderSource nyc.ol.source.FilteringAndSorting The source of the finder facilities
locationMgr nyc.LocationMgr The location manager
filterControls Array.<nyc.Choice> <optional>
Filter controls for filtering the facilities features
directionsUrl string <optional>
The Google directions API URL with appropriate API key
zoomLevel number <optional>
nyc.ol.Locate.ZOOM_LEVEL The zoom level to zoom to when finding a facility
mapClickOptions Object <optional>
Options to modify map click behavior {@see http://openlayers.org/en/latest/apidoc/ol.Map.html#forEachFeatureAtPixel}
Source: