- globalmapper.AddCustomAreaClass(string aName, GM_AreaStyle_t aStyle) GM_Error_t32, AreaFeatureClass_t16
-
Adds a new custom area classification. If this function succeeds, the new feature classification code will be returned as a AreaFeatureClass_t16 value. This code can then be used as the feature classification for area features.
- Parameters:
-
aName (str) – Custom type name
aStyle (GM_AreaStyle_t) – Default draw style for features of this type
- Returns:
-
Error Code
- Return type:
-
GM_Error_t32
- Returns:
-
Classification code for new type
- Return type:
-
AreaFeatureClass_t16
Example
The following is an example of AddCustomAreaClass.
import globalmapper as gm
### START SAMPLE
err_AddCustomAreaClass, area_class = gm.AddCustomAreaClass("Small Park", gm.GM_AreaStyle_t())
### END SAMPLE
assert (
gm.GM_Error_None == err_AddCustomAreaClass
), f"AddCustomAreaClass: Expected {gm.GM_Error_None}, got {err_AddCustomAreaClass}"