Actions relating to zones. Zones are geographic regions in that vehicles can enter and exit. Zones can be associated with alerts to raise a notification automatically when a vehicle enters or exits a zone.

Zones can exist within or on top of each other, and a vehicle can exist within multiple zones at once.

Action-Get

Return all zones associated with the account, in GeoJSON format.

module=zones&action=get

Returned data

An array of zones as a FeatureCollection, contained within the property "features", with the below details. If returned as XML, data is contained inside the <data> tag.

NameDescriptionExample
idThe unique ID of the zonev0v60I5kQ7wY
typeSpecification for GeoJSON identifying this zone as a map feature.Feature
geometryZone geometry information.

Further info is below.
{ ... }
geometry.coordinatesInformation on the points (latitude and longitude) that make up the zone perimeter[[[145.0483, -37.72928], [145.05034, -37.72948], [145.05131, -37.72962], [145.05108, -37.73051],…]]
,...
geometry.typeSpecification for GeoJSON identifying this zone as a map feature of type PolygonPolygon
geometry.coordinates_encodedThe encoded polyline that makes up the zone perimeter

Learn more about the Polyline Algorithm at Google
~~geF{vhtZf@wKZaEfDRY`GnDd@g@xI
propertiesZone properties information.

Further info is below.
{ ... }
properties.nameThe name of the zoneTrack My Ride Heidelberg West
properties.visibleIs this zone visible or hidden? Visible = 1, hidden = 01
properties.logbookIsBusinessIs this zone flagged as being business-related for our Tax Logbook
Report? 1 = yes, 0 = no
1
properties.lineColorHexadecimal line colour for this zone.# 66B032
properties.fillColorHexadecimal fill colour for this zone# FE2712
properties.fillOpacityFill opacity as a float, 0 = invisible, 1 = 100% visible.0.2
properties.lineOpacityLine opacity as a float, 0 = invisible, 1 = 100% visible.1
properties.lineWeightThe thickness of the line5

Action-Save

Create or update a zone record.

module=zones&action=save

Required data

To update an existing Zone, send through the following parameters as query params or via form-data.

Data is to be supplied within the array variable "data". For example, to set the variable "name" to "Home Address" for an existing record, add data[unique_id]=<unique_id> and data[name]=Home Address to your request.

To create a new Zone, send through the following parameters as query params or via form-data excluding the unique_id variable. If the unique_id variable is excluded or passed as 0 a new record will be created and its new unique_id will be returned.

❗️

Updating

When updating a zone, if a variable is not supplied in the update request it will remain set to its current value.

Notes

You can test your encoded polyline using Google's polyline utility to visualise your polyline.

Paste your polyline into the field Encoded Polyline and press the Decode button.

Description of zone data properties

VariableDescriptionRequiredExample
unique_idUnique id for the zone (12 alphanumeric characters)

To edit an existing record, pass this variable to identify the record you wish to edit.

To create a new record, don't pass this variable, or pass the value 0.
create a new record: no

update existing record: yes
v0v60I5kQ7wY
nameThe name of the zoneyesHome Address
lineColorHexadecimal line colour for this zone, prefixed by #no

Defaults to red
#66B032
fillColorHexadecimal fill colour for this zone, prefixed by #no

defaults to blue
#FE2712
logbookIsBusinessIs this zone considered business or private for our Journey classification algorithm?

Alternatively, it can be set to be either business or private and ignored by the algorithm.

As used in the journey reports and tax logbook reports to classify a journey as business or private.

2 = ignore
1 = business
0 = private
no

defaults to 0
1
pointsThe perimeter of the zone as represented by an open encoded Polyline

To be a valid shape, the polyline should not cross itself.

You do not need to close the shape of your supplied polyline when defining the shape of your zone. The TMR system will automatically close the shape by joining your first and last encoded point.

Learn more about the Polyline Algorithm at Google
yes~~geF{vhtZf@wKZaEpDl@c@fFnDd@g@xI

Example Request and Returned Data

For further info see here

Action-Delete

Delete an existing alert.

module=zones&action=delete

Required data

To delete a Zone, add the zone's unique ID into the data variable unique_id. For example, data[unique_id]=v0v60I5kQ7wY

Example Request and Returned Data

For further info see here