Example
import SearchEngine from "gpf-ext-ol/controls/SearchEngine"
ou
import { SearchEngine } from "gpf-ext-ol"
Events
-
searchengine:autocomplete:click
Controls/SearchEngine/SearchEngine.js, line 1899 -
event triggered when an element of the results is clicked for autocompletion
Properties:
Name Type Description type Object event
location Object location
target Object instance SearchEngine
Example
SearchEngine.on("searchengine:autocomplete:click", function (e) { console.log(e.location); })
-
searchengine:coordinates:click
Controls/SearchEngine/SearchEngine.js, line 1616 -
event triggered when we are positioned
Properties:
Name Type Description type Object event
coordinates Object coordinates
target Object instance SearchEngine
Example
SearchEngine.on("searchengine:coordinates:click", function (e) { console.log(e.coordinates); })
-
searchengine:geocode:click
Controls/SearchEngine/SearchEngine.js, line 2075 -
event triggered when an element of the results is clicked for geocoding
Properties:
Name Type Description type Object event
location Object location
target Object instance SearchEngine
Example
SearchEngine.on("searchengine:geocode:click", function (e) { console.log(e.location); })
-
searchengine:geolocation:click
Controls/SearchEngine/SearchEngine.js, line 1555 -
event triggered when i want a geolocation
Properties:
Name Type Description type Object event
coordinates Object coordinates
target Object instance SearchEngine
Example
SearchEngine.on("searchengine:geolocation:click", function (e) { console.log(e.coordinates); })
-
searchengine:search:click
Controls/SearchEngine/SearchEngine.js, line 1971 -
event triggered when an element of the results is clicked for search service
Properties:
Name Type Description type Object event
suggest Object suggest
error Object error
target Object instance SearchEngine
Example
SearchEngine.on("searchengine:search:click", function (e) { console.log(e.suggest); })