Loading...
Skip navigation
Please note that this documentation is for the most recent version of this extension. It may not be relevant for older versions. Related documentation can be found in the documentation directory of the extension.

Insert a location button

A location button lets visitors determine their current location via the browser. The resulting geo coordinates arethen used directly for the radius search.

Requirements

  • The Location filter field must be enabled in the search plugin, so that the fields address-location-field,address-latitude-field and address-longitude-field are available in the form.
  • The JavaScript AddressManagerGetGeoLocation.js is included automatically by the extension's TypoScript setup.
  • Browsers only provide the Geolocation API in a secure context (HTTPS).
  • The visitor must allow access to their location in the browser.

Insert the button

The button is identified by the ID get-location-button. Add it, for example, in your own template or partial(e.g. in a copy of Partials/Address/FilterFields/Location.html):

<button type="button" id="get-location-button" data-location-text="My location">
    Use my location
</button>

The data-location-text attribute defines the text shown in the location field after the location has beendetermined successfully. Use type="button" so that the button does not submit the form by itself.

Attention:

The ID get-location-button must only be used once per page.

Behavior

After a click (on touch devices on the touchend event) the visitor's location is requested. On success, latitude andlongitude are written into the hidden form fields and the search is executed:

  • List/map with search form: The search is updated via AJAX, just like when submitting the search form.Pagination is reset to the first page and any pending geocoding of a free-text input is discarded. There is noredirect to the JSON endpoint.
  • Search plugin with display type "Filter only" (FilterOnly): The form address-search-form-redirect issubmitted regularly and the visitor is redirected to the configured list page (settings.list.defaultPid).

If the browser does not support geolocation, the button is hidden automatically. If the visitor denies the request orno location can be determined, an error message is shown as a browser alert.

Notice:

When using the radius search, results are always sorted by distance!

Last change: 2026-11-15
Documentation
TYPO3 Address-Manager Extension

TYPO3 Address-Manager by coding.ms

Filial-finder, radius-search, location-overview, store-finder, radial-search, radius-search, people-directory, person-database, employee-directory: Manages and displays address and person records. Comes with three kinds of categories (groups, organisations and positions) with frontend filtering and full-text search. Includes Google Maps and SEO support.

Menu

Contact request

You can contact us at any time

Stop! Playing in the meantime?
Stop! Playing in the meantime?
Stop! Playing in the meantime?

Stop! Playing in the meantime?

Break the highscore

Press Start
Contact request
Screenreader label
Security question
GRR_________8HD______
E______K______P___ZUX
U94___PE5___F7N______
M_T____E____P_____PDH
XPJ_________4BQ______
Dein Online-
Adventskalender
Entdecken →