getPOICategories

fun getPOICategories(minClassID: Long = CartoConst.KB_VEHICLE_REPAIR.toLong(), maxClassID: Long = CartoConst.KB_TRUCK_REPAIR_AND_SERVICE.toLong()): List<POICategory>

Returns the POI categories of this map style, sorted by ascending class ID (BENAV5-1511).

A class is listed if:

  • its ID is between minClassID and maxClassID (both included);

  • it is a POI class of the address search, so the city centres (7379) and hamlets (7381) are never listed;

  • this map style draws its points with an image (POICategory.iconPath).

Only the map style is read, so the list does not depend on the Core, the licence or the installed maps. Every class ID of the range is checked, so keep the range narrow: a range wider than 65536 class IDs is refused (empty list), because it would block the main thread. To list only the categories present in the installed map files, call getMapDataPOIClassIDs off the main thread and keep the categories of this list whose class ID it returns.

This method must be called on the main thread, where the map styles are created and deleted: map style lookups are not synchronized.

Return

the POI categories, or an empty list if none is found.

Since

v2.11.0 Creation

Parameters

minClassID

the lowest class ID to list (default CartoConst.KB_VEHICLE_REPAIR, 7310).

maxClassID

the highest class ID to list (default CartoConst.KB_TRUCK_REPAIR_AND_SERVICE, 9958).