- Source:
Type Definitions
Icon
Facility icon configuration for nyc.template.facility.Type or nyc.template.facility.MapConfig
Type:
- Object
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
url |
string |
<optional> |
URL to a square icon image | |
stroke |
string |
<optional> |
rgba(0,0,0,1) | A stroke color for the pin icon if no URL is specified |
fill |
string |
<optional> |
rgba(0,0,0,0.5) | A fill color for the pin icon if no URL is specified |
size |
number |
<optional> |
64 | The width of the icon image if a URL is specified |
- Source:
MapConfig
Map configuration for templated facility map
Type:
- Object
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
url |
string | URL to a facility CSV file | ||
xCol |
string | Name of the CSV column containing X coordinate or longitude of facility location | ||
yCol |
string | Name of the CSV column containing Y coordinate or latitude of facility location | ||
projection |
string |
<optional> |
The EPSG code for the coordinate data (if not provided EPSG:4326 will be assumed for longitude and latitude coordinates, otherwise EPSG:2263 will be assumed) | |
geoclientAppId |
string | A Geoclient application id | ||
geoclientAppKey |
string | A Geoclient API key | ||
icon |
nyc.template.facility.Icon |
<optional> |
An icon to apply to all facility features if icons are not specified for facility types | |
autoLocate |
boolean |
<optional> |
false | Automatically locate using device geolocation |
selectionColor |
string |
<optional> |
rgba(255,255,0,0.5) | Color for highlighting selected facilities |
htmlRow |
function | A function where 'this' is an instance of ol.Feature, and returns an HTML table row | ||
click |
function | A function to call when a facility is clicked on the map or in the table | ||
css |
string |
<optional> |
URL to custom CSS | |
facilityTypes |
nyc.template.facility.Types |
<optional> |
Facility types mapped by the type value from the facility CSV |
- Source:
Type
Facility type configuration for nyc.template.facility.Types
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
name |
string | The alias for the coded values in the CSV type column | |
icon |
nyc.template.facility.Icon |
<optional> |
An icon to display as a map marker for a facility of this type |
- Source:
Types
Facility types configuration for nyc.template.facility.MapConfig
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
column |
string | Name of the CSV column containing the facility type | |
facilityTypes |
Object.<string, nyc.template.facility.Type> |
<optional> |
Facility types mapped by the type value from the facility type column |
- Source: