This project contains a few simple examples of add-ins that can be opened in the right-side panel of the Maps or Trips History pages of MyGeotab. Each add-in uses one or more Geotab Map API services.
- events - shows how to subscribe to different events from map
services.events; - tooltip - shows to show additional information in map tooltips or show your own tooltip
services.tooltip; - action - shows how to add a custom button in different map action list
services.actionList; - localStorage - shows how to set/get/remove items from local storage
services.localStorage; - request - shows how to request Geotab data from server
services.api; - page - shows how to change page state and handle state changes that happens on the page
services.page; - mapElements - shows how to draw different elements on the map and catch events from them
services.canvas; - map - shows how to control map view and catch events from it
services.map; - html - shows how use html file as a amin file for map add-in.
- makeModelYearTooltip - shows how to display additional information retrieved using the SDK in the tooltip;
- odometerFuelLevelTooltip - shows how to display additional information (i.e. StatusData) retrieved using the SDK in the tooltip and using session storage
services.events,services.tooltip,services.api; - vehicleInfo - shows how to use the MyGeotab APIs and Map events to display current vehicle information when the user clicks on a vehicle on the map.
To try it:
- Create
.ziparchive from a folder (for Mac and Linux users it can be done with one command:zip -r addin.zip {{addinFolder}}) - Add it as usual add-in on the system settings page.
If you want to try it on tripsHistory page, change the page name in configuration.json file: from "page": "map" to "page": "tripsHistory".
If you want to build all the add-ins to test them, run the ./build.sh command and get any zip file from the ./dist folder.