Import Zones Example
Skill level:

This example demonstrates a tool that can be built with an advanced-level knowledge of the MyGeotab system. It is suitable for those who have a well-versed understanding of the entire Geotab ecosystem and are confident with the MyGeotab SDK and leveraging the MyGeotab APIs within their projects.

This utility helps you import zones to your account using comma separated values (CSV). Initially a cache will be created of all the zones currently on your account. The input provided is parsed and a set of boundary points is created at the specified coordinates. These points are the extents of the new zone and are then saved to your account. For a simpler approach to understanding the necessary trigonometry involved, see the JavaScript SDK sample "AddZone".
In this example
API Methods:Add Get
API Entities:Group Zone ZoneType

Use the text box below to import multiple zones at a time. Place each zone on its own line as follows:

Name1,Latitude,Longitude,Size(m or ft),Red(0 to 255),Green(0 to 255),Blue(0 to 255),Transparency(0 to 255),GroupName1|GroupName2|...|GroupNameN,ZoneTypeName1|ZoneTypeName2|...|ZoneTypeNameN,Comment
Name2,Latitude,Longitude,Size(m or ft),Red(0 to 255),Green(0 to 255),Blue(0 to 255),Transparency(0 to 255),GroupName1|GroupName2|...|GroupNameN,ZoneTypeName1|ZoneTypeName2|...|ZoneTypeNameN,Comment
Name3,Latitude,Longitude,Size(m or ft),Red(0 to 255),Green(0 to 255),Blue(0 to 255),Transparency(0 to 255),GroupName1|GroupName2|...|GroupNameN,ZoneTypeName1|ZoneTypeName2|...|ZoneTypeNameN,Comment

Template

Overview
Example Entry:
ExampleTestZoneSDK1,43.7,-79.6,100,10,20,30,40,Live|Driver Category,Home|Office,Comment goes here

For a simpler approach to understanding the necessary trigonometry involved, see the JavaScript SDK sample "AddZone".