.. ================================================== .. FOR YOUR INFORMATION .. -------------------------------------------------- .. -*- coding: utf-8 -*- with BOM. .. include:: ../../Includes.txt .. _integrators_nearestlocation: Nearest Location ================ You can determine the position of the website visitor. Radialsearch stored both datas in the session: * the latitude and the longitude of the visitors position * the uid of the "nearest" record of a given table Preconditions ------------- * The visitor has to allow to get his position * You have a table with records, which contains the latitude and the longitude Setup ----- Include the static template * Radial Search [2.0] Nearest location Constant Editor --------------- Select * RADIAL SEARCH - NEAREST LOCATION Enter * The name of your table * The name of the fields for title, lat, lon and location (like city) Use the session data -------------------- .. code:: php // Get the uid of the "nearest" record of the given table data = session: tx_radialsearch_pi1|nearestLocation|{$plugin.tx_radialsearch_pi1.nearestlocation.table} // Get the latitude and the longitude of the user position data = session: tx_radialsearch_pi1|userPosition|lat data = session: tx_radialsearch_pi1|userPosition|lat Developers ----------- Please refer to :ref:`Developers > Background Knowledge > Nearest Location `