new SearchGPS( [Control])
Parameters:
| Name | Type | Argument | Default | Description | 
|---|---|---|---|---|
| Control | Object | <optional> | options. | |
| options.className | string | <optional> | control class name | |
| options.target | Element | string | undefined | <optional> | Specify a target if you want the control to be rendered outside of the map's viewport. | |
| options.label | string | undefined | <optional> | search | Text label to use for the search button, default "search" | 
| options.labelGPS | string | undefined | <optional> | "Locate with GPS" | placeholder, default "Locate with GPS" | 
| options.typing | number | undefined | <optional> | 300 | a delay on each typing to start searching (ms), default 300. | 
| options.minLength | integer | undefined | <optional> | 1 | minimum length to start searching, default 1 | 
| options.maxItems | integer | undefined | <optional> | 10 | maximum number of items to display in the autocomplete list, default 10 | 
Fires:
- event:select
Extends
Members
- 
    _history
- 
    
    Current history - Inherited From:
- Overrides:
 
Methods
- 
    _getTitleTxt(f)
- 
    
    Returns title as text Parameters:Name Type Description fany feature to be displayed - Inherited From:
- Overrides:
 Returns:- Type
- string
 
- 
    autocomplete(s)
- 
    
    Autocomplete function Parameters:Name Type Description sstring search string - Overrides:
 Returns:an array of search solutions - Type
- Array.<any> | false
 
- 
    clearHistory()
- 
    
    Remove previous history - Inherited From:
- Overrides:
 
- 
    collapse( [b])
- 
    
    Collapse the search Parameters:Name Type Argument Default Description bboolean <optional> 
 true - Inherited From:
- Overrides:
 
- 
    equalFeatures(f1, f2)
- 
    
    Test if 2 features are equal Parameters:Name Type Description f1any f2any - Inherited From:
- Overrides:
 Returns:- Type
- boolean
 
- 
    getHistory()
- 
    
    Get history table - Inherited From:
- Overrides:
 
- 
    getInputField()
- 
    
    Get the input field - Inherited From:
- Overrides:
 Returns:- Type
- Element
 
- 
    getTitle(f)
- 
    
    Returns the text to be displayed in the menu Parameters:Name Type Description fany feature to be displayed - Inherited From:
- Overrides:
 Returns:the text to be displayed in the index, default f.name - Type
- string
 
- 
    restoreHistory()
- 
    
    Restore history (from the localstorage) - Inherited From:
- Overrides:
 
- 
    reverseGeocode(coord, cback)
- 
    
    Reverse geocode Parameters:Name Type Description coordol.coordinate cbackfunction | undefined a callback function, default trigger a select event - Inherited From:
- Overrides:
 
- 
    saveHistory()
- 
    
    Save history (in the localstorage) - Inherited From:
- Overrides:
 
- 
    search()
- 
    
    Force search to refresh - Inherited From:
- Overrides:
 
- 
    select(f, reverse, coord, options)
- 
    
    A line has been clicked in the menu > dispatch event Parameters:Name Type Description fany the feature, as passed in the autocomplete reverseboolean true if reverse geocode coordol.coordinate options* options passed to the event - Inherited From:
- Overrides:
 
- 
    setInput( [coord])
- 
    
    Set the input value in the form (for initialisation purpose) Parameters:Name Type Argument Description coordArray.<number> <optional> 
 if none get the map center - Overrides:
 
- 
    setMap(map)
- 
    
    Remove the control from its current map and attach it to the new map. Subclasses may set up event handlers to get notified about changes to the map here. Parameters:Name Type Description mapol.Map Map. - Inherited From:
- Overrides: