C# SDK

◆ AddPoiCategory()

static int AddPoiCategory ( out SError  Error,
string  strCategory,
string  strBitmapPath,
string  strIsoCode,
Int32  MaxTime 
)
inlinestatic

The function adds custom POI category.

Parameters
ErrorAdditional error information returned from Drive.
strCategoryName of category to add.
strBitmapPathPath to icon of category. It is relative path from ($ResDir)\ icons\ poi\ directory.
strIsoCodeISO code of map (country) for which category will be created. This parameter is obligatory.
MaxTimeMaximum time (in milliseconds) function can take. If MaxTime=0 function execution is not time limited.
Returns
1 if successful, other value otherwise.

Parameter strIsoCode is official ISO code of the country. The list of ISO codes can be found at http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_3166.html.

ISO code of United States of America consists of character "U" plus code of state. E.g New York has ISO code UNY. Indian states ISO codes can be found at http://devforum.sygic.com/viewtopic.php?f=15&t=2925&p=3646&hilit=I01&sid=354efb86bb92dc0dcdfcc1bb8d656c20#p3646



Icon of category will be displayed on the left of category name in POI categories list. Pictures for icons must be stored in ($ResDir)\ Icons\ directory and be in 32 bit bmp format.

AddPoiCategory function adds new category just into datas of taken map. The category occurs in POI categories list if correspoinging map is loaded. When you add new item which is situated in other country to this category, category is automatically added to map of this country.

Possible error codes returned from Drive are:

  • 0 - Function not succeeded.
  • 1 - Function succeeded.
  • 2 - Drive not succeeded.
  • 3 - Function reached timeout.



SError error;
string strCategory = "MyCategory";
string strISOCode = "SVK";
string strBitmapPath = "MyIcon.bmp";
int nMaxTime = 10000;
CApplicationAPI.AddPoiCategory(error, strCategory, strBitmapPath, strISOCode, nMaxTime);

References SError.SizeOf().