Geolocation Coordinates


Modules for Joomla 3.10 and Joomla 4.X

 

Description

Geolocation is a Joomla extension for developers made to get and record the user's coordinates, latitude and longitude in decimal format, using his browser functions. The data is saved in the Joomla session as two variables, "iciLat" for the Latitude and "iciLon" for the Longitude. These data can be retrieved by using standard Joomla function :

  • Joomla\CMS\Factory::getApplication()->getSession()->get('iciLat'); for Latitude
  • Joomla\CMS\Factory::getApplication()->getSession()->get('iciLon'); for Longitude

This extension contains two different modules :

  • mod_geoloc_session.php : the main module that actually gets the coordinates from the user's browser and sets them into the current user session data. The module asks the coordinates to the user's browser only at the first time it is activated. If the coordinates are already in the session data, it does nothing. This module always sends his data back to the page (URL) that asked them.
  • mod_geoloc_display.php : this optionnal module displays the coordinates produced by mod_geoloc_session module, it can be used for testing purpose. You can see it on the left of this page (or top on mobile screen) as "Geolocation Data", your current geolocation latitude and longitude are displayed using this module.

 

Installation

  1. Download the zip file that contains both modules (see below).
  2. You must unzip the file after downloading it to get the two separate zip files used to install the modules : mod_geoloc_session.zip and mod_geoloc_display.zip.
  3. Install first mod_geoloc_session.zip using Joomla standard installation process.
  4. If nedded, install mod_geoloc_display.zip using Joomla standard installation process.
  5. Enable the module mod_geoloc_session "Geolocation to Session" in the template position you choose and the page(s) you choose, don't let the module title be displayed.
  6. If you need it, enable the module mod_geoloc_display "Display User Geolocation Data" in the template position you choose.

 

Download

 Click on this link to download the zip file : geolocation_v100_UNZIPME.zip

 

On the JED

See this extension on the Joomla Extensions Directory

 

Contact