Class: Decidim::Map::Autocomplete::Builder
- Inherits:
-
Frontend::Builder
- Object
- Frontend::Builder
- Decidim::Map::Autocomplete::Builder
- Defined in:
- decidim-core/lib/decidim/map/autocomplete.rb
Overview
A builder for the geocoding autocompletion to be attached to the views. Provides all the necessary functionality to initialize the front-end geocoding autocompletion functionality.
Direct Known Subclasses
Provider::Autocomplete::Here::Builder, Provider::Autocomplete::Osm::Builder, Provider::Autocomplete::Test::Builder
Instance Method Summary collapse
-
#geocoding_field(object_name, method, options = {}) ⇒ String
Renders the geocoding field element for the view.
Methods inherited from Frontend::Builder
Constructor Details
This class inherits a constructor from Decidim::Map::Frontend::Builder
Instance Method Details
#geocoding_field(object_name, method, options = {}) ⇒ String
Renders the geocoding field element for the view. If the component supports geolocation (as determined by ‘show_my_location_button?`), the field will include a button allowing the user to use their current location to autofill the address. Otherwise, a standard geocoding input field is rendered without the location button.
23 24 25 26 27 28 29 30 31 32 |
# File 'decidim-core/lib/decidim/map/autocomplete.rb', line 23 def geocoding_field(object_name, method, = {}) [:autocomplete] ||= "off" append_assets if (object_name, method, ) else (object_name, method, ) end end |