new ZoomSearch(useSearchTypeMenuopt)
Abstract class for zoom and search controls
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
useSearchTypeMenu |
boolean |
<optional> |
false | Use search types menu |
- Mixes In:
- 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
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:
(abstract) featureAsLocation(feature, options) → {nyc.Locate.Result}
Parameters:
| Name | Type | Description |
|---|---|---|
feature |
Object | The feature object |
options |
nyc.ZoomSearch.FeatureSearchOptions | The options passed to setFeature |
- Source:
Returns:
- Type
- nyc.Locate.Result
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:
removeFeatures(featureTypeName)
Remove searchable features
Parameters:
| Name | Type | Description |
|---|---|---|
featureTypeName |
string | The featureTypeName used when the features were set |
- Source:
searching(show)
Set searching status to display to the user
Parameters:
| Name | Type | Description |
|---|---|---|
show |
boolean | Show searching status |
- Source:
setFeatures(options)
Add searchable features
Parameters:
| Name | Type | Description |
|---|---|---|
options |
nyc.ZoomSearch.FeatureSearchOptions | The options for creating a feature search |
- 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:
Type Definitions
FeatureSearchOptions
Object type to hold data about possible locations resulting from a geocoder search
Type:
- Object
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
features |
Array.<(Object|ol.Feature)> | The features to be searched | ||
featureTypeName |
string | The name of the layer or feature type the features are from | ||
nameField |
string |
<optional> |
"name" | The name attribute field of the feature |
labelField |
string |
<optional> |
The attribute field to use as the label value for the generated list item | |
featureTypeTitle |
string |
<optional> |
A title for the search type menu | |
placeholder |
string |
<optional> |
A placeholder for the search field |
- 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: