new Finder()
A class for retrieving proximity information (Not ready for prime time)
- Mixes In:
- Source:
Fires:
Extends
Members
(static) EventType :string
Enumeration for proximity and info types
Type:
- string
Properties:
| Name | Type | Description |
|---|---|---|
INFO |
string | The info event type |
PROXIMITY |
string | The proximity event type |
NEAREST |
string | The nearest event type |
- Source:
(static) NEAREST_DISTANCE :number
Valid distances for nearest searches
Type:
- number
Properties:
| Name | Type | Description |
|---|---|---|
500ft |
number | 500 feet |
1000ft |
number | 1000 feet |
1mi |
number | 1 mile |
5mi |
number | 5 miles |
150m |
number | 150 meters |
300m |
number | 300 meters |
"1.5km" |
number | 1.5 kilometers |
8km |
number | 8 kilometers |
- Source:
(static) PROXIMITY_DISTANCE :string
Valid distances for address proximity searches
Type:
- string
Properties:
| Name | Type | Description |
|---|---|---|
50ft |
string | 50 feet |
100ft |
string | 100 feet |
200ft |
string | 200 feet |
400ft |
string | 400 feet |
15m |
string | 15 meters |
30m |
string | 30 meters |
60m |
string | 60 meters |
120m |
string | 120 meters |
- Source:
Methods
info(options)
Return all building and tax lot features at a point
Parameters:
| Name | Type | Description |
|---|---|---|
options |
nyc.info.Finder.PointRequest | nyc.info.Finder.BinBblRequest |
- Source:
nearest(options)
Return all features of the specified layer within a the specified distance of a point
Parameters:
| Name | Type | Description |
|---|---|---|
options |
nyc.info.Finder.NearestRequest |
- Source:
off(eventName, evtHdlr, hdlrScopeopt)
Remove a previously connected event handler
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
eventName |
string | The name of the event to which the handler will be connected | |
evtHdlr |
function | The event handler function | |
hdlrScope |
Object |
<optional> |
The scope in which to invoke the event handler |
- Inherited From:
- Source:
on(eventName, evtHdlr, hdlrScopeopt)
Connect a function to an event
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
eventName |
string | The name of the event to which the handler will be connected | |
evtHdlr |
function | The event handler function | |
hdlrScope |
Object |
<optional> |
The scope in which to invoke the event handler |
- Inherited From:
- Source:
one(eventName, evtHdlr, hdlrScopeopt)
Connect a function to an event for a single invocation
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
eventName |
string | The name of the event to which the handler will be connected | |
evtHdlr |
function | The event handler function | |
hdlrScope |
Object |
<optional> |
The scope in which to invoke the event handler |
- Inherited From:
- Source:
proximity(options)
Return all address features within a distance of a point
Parameters:
| Name | Type | Description |
|---|---|---|
options |
nyc.info.Finder.ProximityRequest |
- Source:
trigger(eventName, dataopt)
Trigger a named event with event data
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
eventName |
string | The name of the event to trigger | |
data |
Object |
<optional> |
The event data |
- Inherited From:
- Source:
Type Definitions
BinBblRequest
Object type to hold options for nyc.info.Finder#info
Type:
- Object
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
binOrBbl |
string | A valid BIN or BBL | ||
projection |
string |
<optional> |
EPSG:3857 | The projection of input coordinates and output features |
callback |
function |
<optional> |
Callback function that receives GeoJSON FeatureCollection |
- Source:
NearestRequest
Object type to hold options for nyc.info.Finder#nearest
Type:
- Object
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
coordinates |
Array.<number> | Coordinates | ||
namespace |
string | The namespace for the layer | ||
layer |
string | The layer name | ||
distance |
nyc.info.Finder.PROXIMITY_DISTANCE |
<optional> |
1000:feet | The distance |
projection |
string |
<optional> |
EPSG:3857 | The projection of input coordinates and output features |
callback |
function |
<optional> |
Callback function that receives GeoJSON FeatureCollection |
- Source:
PointRequest
Object type to hold options for nyc.info.Finder#info
Type:
- Object
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
coordinates |
Array.<number> | Coordinates | ||
projection |
string |
<optional> |
EPSG:3857 | The projection of input coordinates and output features |
callback |
function |
<optional> |
Callback function that recieves GeoJSON FeatureCollection |
- Source:
ProximityRequest
Object type to hold options for nyc.info.Finder#proximity
Type:
- Object
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
coordinates |
Array.<number> | Coordinates | ||
distance |
nyc.info.Finder.PROXIMITY_DISTANCE |
<optional> |
100:feet | The distance |
projection |
string |
<optional> |
EPSG:3857 | The projection of input coordinates and output features |
callback |
function |
<optional> |
Callback function that recieves GeoJSON FeatureCollection |
- Source:
Events
info
The result of a info request
Type:
- Object
- Source:
proximity
The result of a proximity request
Type:
- Object
- Source: