Example - Using the REST API to display number of users per geofence on a webpage

Description

This example is written in HTML and PHP and uses the GpsGate REST API to retrieve information about existing geofences and number of users found in them and present it as a list. The attached example reloads every 10 seconds (unless changed) and can be added as a panel to your GpsGate UI.

 

mceclip0.png

Requirements

Setup

  1. Decompress the attached .zip file
  2. Change the parameters in settings.php
  3. Upload the files to the webserver

Add as a panel

  1. Go to Admin > Development > App Builder
  2. Create new app, add a name and select which roles that can access this app
  3. Add a Click Script of type WindowsMenu, add the following code:
     ui.iframe("testKey","GeofenceUsers","https://<YOUR URL TO FILE>/geofenceusers.php",100,100,400,650);log("OK");
  4. Save
  5. Go to the main menu and Windows, you should now see your app listed there. Select it, the webpage should now be loaded in a window in the UI.
  6. Right click on the header bar and select Panel
    mceclip0.png
  7. Save the workspace to have this panel opened every time you logon.

    mceclip1.png