Knowledge Base - Geolocalise tutorial
Welcome to this tutorial for the Geolocalise Plugin for SOBI2 plugin. The screen captures are made with the current version of the plugin and with
Sobi 22.214.171.124, it is possible that some screens are slightly different on your version.
Step 1: Plugin Installation
You just download the plugin. For that you received by email a download link that contains the order number like "1234567890". Keep this email, with them you can download the updates. Customers usualy recieved a download link or you can find it in your download center
- Open your site in backend;
- Select the menu Components > Sobi2;
- Go to the left side menu and choose (1) Plugins > (2) Plugin Manager.
- Click the "Choose File" button and select the file pluginGeolocalise.zip
- (3) Click install and the plugin should be installed.
In case of installation error:
- Check writing privileges (CHMOD) in the folder 'com_sobi2/plugins' in 'components' and 'administrator / components'
- Try to install an official plugin like Gallery from Sigsiu.net
- Perform a system check in Sobi and correct any errors.
Once installation is complete, In SOBI Pluginns, select Geolocalise, go to "Version & registration" tab of your plugin and enter the registration number (for exemple: 123456789) which we mentioned above. Click save. Your plugin is now registered.
In "Version & registration" line you will now see a message in green indicating that the registration is correct (Your product is registred. Thank you.) and that the version is updated.
Note: Your version may be newer than the server, because we do not publish necessarily minor update.
Step 2: General Backend configuration
- For this plugin to function properly it is necessary to have or create 2 custom fields, latitude and longitude (existing in sobi from version 126.96.36.199).
- The plugin need to know the fields you used to defined the address (City, Street, Zip code, ...) of the entries. For that first you need to create that fields and assign each fields in Geolocalise plugin Parameters Tab. Normaly that fields are installed by default. If you deleted you need to re-create because the plugin is unusable without it.
- Your website need to have the Google API Key defined. Google Maps API lets you embed Google Maps in your own web pages. A single Maps API key is valid for a single "directory" or domain.
Get Google API key follow this link and insert in SOBI Configuration > View Configuration > Google Maps
2.1) Setting the Geolocalise plugin parameters
Open your site in backend, and select the menu Components > Sobi2. Once in the component Sobi2, go to the left side menu and choose Plugins > Plugin Manager and choose Geolocalise. Go to Parameters tab and find "Geocode parameters" line.
- Latitude and Longitude fields: Assign the items with the SOBI2 Fields (1), defined in SOBI Custom Fields Manager for latidute and longitude values.
- Valid latitude: If you need to limit the latitude for SOBI entries, please choose desired value (2). If leave emty you have no restriction for latitude coordinates.
- Valid longitude: If you need to limit the longitude for SOBI entries, please choose desired value (3). If leave emty you have no restriction for longitude coordinates.
Seting the other parameters:
- Google server: Use the google server of the country where are your entries. Example: maps.google.com; maps.google.fr...
- Number of entries: Number of entries to manage of each step;
- Precision: Setting the position precision for entry on the map: choosing the high precision get the exact coordinates, the medium use the random tolerance of about 100m and the low about 1 km.
2.2) Setting the Fields parameters
Here you can define one by one corresponding fields for postal address. Please assign the items with the SOBI2 fields for: Adress; Postcode; City; Country; State; County.
Open your site in backend, and select the menu Components > Sobi2. Once in the component Sobi2, go to the left side menu and choose Plugins > Plugin Manager and choose Geolocalise. Go to Parameters tab and find " Fields parameters" line and set the items as shown bellow.
2.3) Usage in custom template
This plugin dont have any frontend in detailled and category view. The standard Sobi2 map is shown.
If you are using a custom entry form, you need to set this code at the place where the plugin will appears:
Step 3: Frontend configuration
Here you can configure in wich way Geolocalise will use the add entry data and the appearance of Geolocalise in SOBI Add Entry Form.
Open your site in backend, and select the menu Components > Sobi2. Once in the component Sobi2, go to the left side menu and choose Plugins > Plugin Manager and choose Geolocalise. Go to Parameters tab and find "Frontend configuration" line.
3.1 Map type
Set display mode for the Google Map in SOBI Add Entry form: "Info map", "pickable and draggable map" or "no map" are possible.
3.2 Get position on the map using an image
The plugin are capable to search about coordinates in images of SOBI Gallery Plugin. This option will be active during the add entry process, the user simpley use "Search coordinates on images" button.
To allow this function, it's necessary to make a little modification to the Gallery plugin. This because the Gallery plugin lose the geodata from the images.Follow the help tab of the plugin.
The zip package of our plugin Geolocalise contains the actual version of the Gallery Plugin (modified), and a sample geo taged image.
Testing the plugin using Coordinates on images function
- Go to SOBI Add Entry Form and find Image Gallery
- (1) (2) Upload own pictures your own image or use the a sample geo taged image from your default Geolocalise Zip package.
- (3) Get the coordinates
- (4) If the GPS coordinates was found it the Geolocalise preview map will show. Click on the map to select coordinates.
- (5) Apply to confirm selection
- (6) The final position will show on the map
3.3 Controls layout
You can add or remove Geolocalise buttons in SOBI Add Entry form of your website. The buttons of Geocoder are:
(1) "Search coordinates from address" : After the address fields are filled if the user use this buttons, the Google coordinates wil be extract automaticaly using the postal address.
(2) "Search coordinates in images" : This function will search about coordinates in images of SOBI Gallery Plugin as was shown in "3.2 Get position on the map using an image" of this tutorial.
3.4 Plugin position
Here you can set the plugin position in SOBI2 add entry form. For that simply enter the order number for plugin.
3.5 Geocode during save
Allow to geocode the entries automaticaly durring the save proccess.
3.6 Geocode during update
Allow to geocode the entries automaticaly durring the update proccess.
Step 4: Entries managment
Open your site in backend, and select the menu Components > Sobi2. Once in the component Sobi2, go to the left side menu and choose Plugins > Plugin Manager and choose Geolocalise. Go to Entries managment. Here you will see two line:
4.1 . "Action": manage the made request for Google Maps for your SOBI adds.
Remember: Google dont allow more than 15000 request by 24h period and by IP, do not abuse, else Google can be remove your apiKey and block your account.
4.2 "Geocoding options"
- Category choice: Choose the SOBI category for Geolocalise
- Common Address: If you have a part of addreses of your SOBI entry defined in same way, you can add a common complementar address for each entries. For example: Paris+France. Please separate all items with the \'+\' charter.
- Include childs: include sub-categories entries
- Include unpublished: include the unpublished entries
- Options: You can choose between entries without coordinates or entries with coordinates defined.