new FinderApp(options)
A class for creating basic facility finder apps
Parameters:
| Name | Type | Description |
|---|---|---|
options |
nyc.FinderApp.Options | Constructor options |
Members
(static, constant) FULL_SCREEN_INFO_HTML :string
Type:
- string
(static, constant) INFO_PAGER_HTML :string
Type:
- string
(static, constant) TEMPLATE_HTML :Object
Basic HTML to support facility finder
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} | |
loading |
nyc.Loading |
<optional> |
Loading splash | |
ready |
callback | Ready callback nyc.FinderApp.Options; /** |
finderSource :nyc.ol.source.FilteringAndSorting
Type:
map :ol.Map
Type:
- ol.Map
view :ol.View
Type:
- ol.View
Methods
detailExpanded(event)
Method to handle expanded facility detail
Parameters:
| Name | Type | Description |
|---|---|---|
event |
JQuery.Event | The expand event |
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 |
listFacilities()
Method to list facilities
listNextPage()
Method to page through facilities
located(location)
Method to handle nyc.Locate events
Parameters:
| Name | Type | Description |
|---|---|---|
location |
nyc.Locate.Result | The location |
mapClick(event)
Method to handle map click and show popup if appropriate
Parameters:
| Name | Type | Description |
|---|---|---|
event |
ol.MapBrowserEvent | The map click event |
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 |
zoomTo(event)
Method to zoom to facility location on map button click
Parameters:
| Name | Type | Description |
|---|---|---|
event |
JQuery.Event | The button click event |