Class: ZoomSearch maps.nyc.gov

nyc.ZoomSearch

new ZoomSearch(useSearchTypeMenuopt)

Abstract class for zoom and search controls
Parameters:
Name Type Attributes Default Description
useSearchTypeMenu boolean <optional>
false Use search types menu
Source:

Extends

Members

(static) EventType :string

Enumeration for control action event type
Type:
  • string
Properties:
Name Type Description
SEARCH string The search event type
GEOLOCATE string The geolocate event type
DISAMBIGUATED string The disambiguated event type
Source:

Methods

(abstract) container() → {JQuery}

A method to return the map container HTML element wrapped in a JQuery
Source:
Returns:
The the map container HTML element wrapped in a JQuery
Type
JQuery

disambiguate(ambiguous)

Displays possible address matches
Parameters:
Name Type Description
ambiguous nyc.Locate.Ambiguous Possible locations resulting from a geocoder search to display to the user
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:

searching(show)

Set searching status to display to the user
Parameters:
Name Type Description
show boolean Show searching status
Source:

setFeatures(featureTypeName, featureTypeTitle, placeholder, features)

Add searchable features
Parameters:
Name Type Description
featureTypeName string The name of the layer or feature type the features are from
featureTypeTitle string A title for the search type menu
placeholder string A placeholder for the search field
features Array.<Object> The features that to be searched
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:

val(valopt) → {string}

Set or get the value of the search field
Parameters:
Name Type Attributes Description
val string <optional>
The value for the search field
Source:
Returns:
The value of the search field
Type
string

(abstract) zoom(event)

Handle the zoom event triggered by user interaction
Parameters:
Name Type Description
event The DOM event triggered by the zoom buttons
Source:

Events

disambiguated

The user has chosen a location from a list of possible locations
Type:
Source:

geolocate

A geolcation determination is requested
Source:

search

The value enterd in the search field
Type:
  • string
Source: