Click or drag to resize
LegacyTelogisServiceCreateCategory Method
Print this page
A Category is a collection of markers. Use this method to create a new Category.

Namespace: Telogis.API
 
Syntax
public long CreateCategory(
	string tag,
	Property[] properties
)

Parameters

tag
Type: SystemString
User-defined tag for the new Category
properties
Type: Telogis.APIProperty
User-defined Property objects for the new Category. See Property .

Return Value

Type: Int64
The ID of the created Category.
Examples
C#
// create a Category
long catID = myService.CreateCategory("customers", cust_props);
// add markers to our Category
myService.AddMarkerToCategory(catID, markerID);
...
// list first 10 markers
int i = 0;
OT.Category[] categories = service.ListCategories(0, 10);
foreach (Category c in categories)
    Console.WriteLine("Category {0} is tagged '{1}'", i++, c.Tag);
See Also