Custom panel example: Real-time weather
You’ll learn how to add a custom panel for real-time weather to GpsGate in this quick start guide. As you move the map, the weather will update based on the location shown.
- Enable the App Builder as shown here.
Add a custom panel for real-time weather to your workspace like this:
1. Download the source code
2. Extract the zip file
3. Create a folder called CustomPanels under \GpsGateServer\IIS\VehicleTracker\
4. Copy the content to \GpsGateServer\IIS\VehicleTracker\CustomPanels folder on your GpsGate server
The custom panel is now installed on your GpsGate server.
Creating the Click Script
1. Go to Admin > Development > App Builder
2. Click on + App button and choose a name for the app.
3. In the second step, (Click Scripts) press + Click Script button
4. Choose WindowsMenu as Kind and press Edit button to write your script
5. Copy and paste the following script and press Save. (remember to replace localhost in the script with your actual server’s address)
ui.iframe('weather', 'weather', 'http://localhost/gpsgateserver/VehicleTracker/CustomPanels/WeatherPanel/weather.html', 100, 100, 400, 310); log("OK");
6. Go to Window menu
7. Select the script name.
Now you have a window script that opens our custom panel!
The Window Script has the following capabilities:
- Be Integrated into a workspace
- Switched to a window or panel
- Moved around
- Saved as any other panel