Interface: Locate maps.nyc.gov

nyc.Locate

An interface for geocoding and geolocating
Source:

Members

(static) EventType :string

Enumeration for locate event type
Type:
  • string
Properties:
Name Type Description
GEOCODE string The geocode event type
GEOLOCATION string The geolocation event type
AMBIGUOUS string The ambiguous event type
ERROR string The ambiguous event type
Source:

(static) ResultType :string

Enumeration for locate result type
Type:
  • string
Properties:
Name Type Description
GEOCODE string The geocode result type
GEOLOCATION string The geolocation result type
Source:

Methods

(abstract) locate()

Locate once using device geolocation
Source:
Geocode an input string representing a location
Parameters:
Name Type Description
input string The value to geocode
Source:

(abstract) track(track)

Track using device geolocation
Parameters:
Name Type Description
track boolean Track or not
Source:

Type Definitions

Ambiguous

Object type to hold data about possible locations resulting from a geocoder search
Type:
  • Object
Properties:
Name Type Description
input string The input string on which the geocoding attempt was made
possible Array.<nyc.Locate.Result> An array of possible results to the request
Source:

Result

Object type to hold data about a successful result of a geocoder search or device geolocation
Type:
  • Object
Properties:
Name Type Attributes Description
name string The formatted name of the geocoded location
coordinates Array.<number> | undefined The geocoded location coordinates
accuracy number The accuracy of the geocoded location in meters or units of a specified projection
type nyc.Locate.ResultType They type of result
zip boolean <optional>
Is this the geocoded location a ZIP Code center point
geoJsonGeometry Object <optional>
A geoJSON representation of the geocoded location coordinates
data Object <optional>
Additional properties provided by the geocoder
Source:

Events

ambiguous

The result of an inconclusive search request
Type:
Source:

error

The error object from a locate request error
Type:
  • Object
Source:

geocode

The result of a search request
Type:
Source:

geolocation

The result of a locate request
Type:
Source: