new ZoomSearch(map, useSearchTypeMenuopt)
Class for providing a set of buttons to zoom and search.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
map |
ol.Map | The OpenLayers map that will be controlled | ||
useSearchTypeMenu |
boolean |
<optional> |
false | Use search types menu |
- Source:
Fires:
Extends
Methods
container() → {JQuery}
A method to return the map container HTML element wrapped in a JQuery
- Overrides:
- 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 |
- Inherited From:
- Source:
featureAsLocation(feature, options) → {nyc.Locate.Result}
Parameters:
| Name | Type | Description |
|---|---|---|
feature |
Object | The feature object |
options |
nyc.ZoomSearch.FeatureSearchOptions | The options passed to setFeature |
- Overrides:
- 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 |
- Inherited From:
- Source:
searching(show)
Set searching status to display to the user
Parameters:
| Name | Type | Description |
|---|---|---|
show |
boolean | Show searching status |
- Inherited From:
- Source:
setFeatures(options)
Add searchable features
Parameters:
| Name | Type | Description |
|---|---|---|
options |
nyc.ZoomSearch.FeatureSearchOptions | The options for creating a feature search |
- Inherited From:
- 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 |
- Inherited From:
- Source:
Returns:
The value of the search field
- Type
- string
zoom(event)
Handle the zoom event triggered by user interaction
Parameters:
| Name | Type | Description |
|---|---|---|
event |
The DOM event triggered by the zoom buttons |
- Overrides:
- Source:
Events
disambiguated
The user has chosen a location from a list of possible locations
Type:
- Inherited From:
- Source:
geolocate
A geolcation determination is requested
- Inherited From:
- Source:
search
The value enterd in the search field
Type:
- string
- Inherited From:
- Source: