Java SDK for 2D
 All Classes Namespaces Functions Variables Pages
ApiPoi Class Reference

PoiService enum enumerates predefined POI categories. More...

Static Public Member Functions

static String addPoi (Poi poi, int maxTime) throws InvalidLocationException
 Adds user POI to custom category. More...
 
static void addPoiCategory (String category, String bitmapPath, String isoCode, int maxTime) throws GeneralException
 Adds custom POI category. More...
 
static void deletePoiCategory (String category, String isoCode, int maxTime) throws GeneralException
 Deletes custom POI category. More...
 
static String deletePoi (Poi poi, int maxTime) throws InvalidLocationException
 Deletes custom POI from custom category. More...
 
static void makeUserPoiVisible (int categoryId, String category, boolean show, int maxTime) throws GeneralException
 Shows or hides POI category in POI category list. More...
 
static ArrayList< PoigetPoiList (String category, boolean searchAddress, int maxTime) throws GeneralException
 Returns list of POIs from selected category. More...
 
static Poi findNearbyPoi (int categoryNumber, String category, int x, int y, int maxTime) throws GeneralException
 Finds the nearest POI around given position. More...
 
static ArrayList< PoifindNearbyPoiList (int categoryNumber, String category, int x, int y, int maxCount, int maxTime) throws GeneralException
 Finds the nearest POI around given position. More...
 
static ArrayList< PoiCategorygetPoiCategoryList (int maxTime) throws GeneralException
 Returns the list of POI categories. More...
 
static PoiCategory setPoiWarning (PoiCategory poiCategory, int maxTime) throws GeneralException
 Sets the POI warning based on the attributes of the PoiCategory instance. More...
 
static void highlightPoi (String category, String name, String sound, Position pos, int maxTime) throws GeneralException
 Highlights the POI. More...
 

Static Public Attributes

static final int RENT_A_CAR_FACILITY = 1
 
static final int TOURIST_INFORMATION_OFFICE = 2
 
static final int MUSEUM = 3
 
static final int THEATRE = 4
 
static final int CULTURAL_CENTRE = 5
 
static final int SPORTS_CENTRE = 6
 
static final int HOSPITAL_POYCLINIC = 7
 
static final int POLICE_STATION = 8
 
static final int CITY_HALL = 9
 
static final int POST_OFFICE = 10
 
static final int FIRST_AID_POST = 11
 
static final int PHARMACY = 12
 
static final int DEPARTEMENT_STORE = 13
 
static final int BANK = 14
 
static final int TRAVEL_AGENCY = 15
 
static final int PUBLIC_PHONE = 16
 
static final int WAREHOUSE = 17
 
static final int SKI_LIFT_STATION = 18
 
static final int ZOO = 19
 
static final int SCENIC_PANORAMIC_VIEW = 20
 
static final int TRANSPORT_COMPANY = 21
 
static final int CASINO = 22
 
static final int CINEMA = 23
 
static final int WINERY = 24
 
static final int CARGO_CENTRE = 25
 
static final int CAR_SHIPPING_TERMINAL = 26
 
static final int CAMPING_GROUND = 28
 
static final int CARAVAN_SITE = 29
 
static final int COACH_AND_LORRY_PARKING = 30
 
static final int COMMUNITY_CENTRE = 31
 
static final int EMBASSY = 33
 
static final int FRONTIER_CROSSING = 34
 
static final int MOTORING_ORGANIZATION_OFFICE = 35
 
static final int RECREATION_FACILITY = 36
 
static final int ROAD_SIDE_DINER = 37
 
static final int SCHOOL = 38
 
static final int SHOPPING_CENTRE = 39
 
static final int STADIUM = 40
 
static final int TOLL = 41
 
static final int COLLEGE_UNIVERSITY = 42
 
static final int BUSINESS_FACILITY = 43
 
static final int AIRPORT = 44
 
static final int BUS_STATION = 45
 
static final int EXHIBITION_CENTRE = 46
 
static final int KINDERGARTEN = 47
 
static final int EMERGENCY_CALL_STATION = 48
 
static final int EMERGENCY_MEDICAL_SERVICE = 49
 
static final int FIRE_BRIGADE = 50
 
static final int FREEPORT = 51
 
static final int COMPANY = 52
 
static final int ATM = 53
 
static final int HIPPODROME = 54
 
static final int BEACH = 55
 
static final int RESTAURANT_AREA = 56
 
static final int ICE_SKATING_RINK = 57
 
static final int COURTHOUSE = 58
 
static final int MOUNTAIN_PEAK = 59
 
static final int OPERA = 60
 
static final int CONCERT_HALL = 61
 
static final int BOVAG_GARAGE = 62
 
static final int TENNIS_COURT = 63
 
static final int SKATING_RINK = 64
 
static final int WATER_SPORT = 65
 
static final int MUSIC_CENTRE = 66
 
static final int DOCTOR = 67
 
static final int DENTIST = 68
 
static final int VETERINARIAN = 69
 
static final int CAFE_PUB = 70
 
static final int CONVENTION_CENTRE = 71
 
static final int LEISURE_CENTRE = 72
 
static final int NIGHTLIFE = 73
 
static final int YACHT_BASIN = 74
 
static final int CONDOMINIUM = 75
 
static final int COMMERCIAL_BUILDING = 76
 
static final int INDUSTRIAL_BUILDING = 77
 
static final int NATIVES_RESERVATION = 78
 
static final int CEMETERY = 79
 
static final int BREAKDOWN_SERVICE = 81
 
static final int VEHICLE_EQUIPMENT_PROVIDER = 82
 
static final int ENTERTAINMENT = 83
 
static final int ABBEY = 84
 
static final int AMUSEMENT_PARK = 85
 
static final int ARTS_CENTRE = 86
 
static final int BUILDING_FOOTPRINT = 87
 
static final int CASTLE = 88
 
static final int CHURCH = 89
 
static final int FACTORY_GROUND_PHILIPS = 90
 
static final int FORTRESS = 91
 
static final int GOLF_COURSE = 92
 
static final int HOLIDAY_AREA = 93
 
static final int LIBRARY = 94
 
static final int LIGHTHOUSE = 95
 
static final int MILITARY_CEMETERY = 96
 
static final int MONASTERY = 97
 
static final int MONUMENT = 98
 
static final int NATURAL_RESERVE = 99
 
static final int PRISON = 100
 
static final int ROCKS = 101
 
static final int SPORTS_HALL = 102
 
static final int STATE_POLICE_OFFICE = 103
 
static final int WALKING_AREA = 104
 
static final int WATER_MILL = 105
 
static final int WINDMILL = 106
 
static final int RENT_A_CAR_PARKING = 107
 
static final int CAR_RACETRACK = 108
 
static final int MOUNTAIN_PASS = 109
 
static final int SWIMMING_POOL = 110
 
static final int GOVERNMENT_OFFICE = 111
 
static final int PARKING_GARAGE = 150
 
static final int PLACE_OF_WORSHIP = 151
 
static final int FERRY_TERMINAL = 152
 
static final int AIRLINE_ACCESS = 153
 
static final int OPEN_PARKING_AREA = 154
 
static final int IMPORTANT_TOURIST_ATTRACTION = 155
 
static final int RAILWAY_STATION = 156
 
static final int REST_AREA = 157
 
static final int SHOP = 158
 
static final int PARK_AND_RECREATION_AREA = 159
 
static final int FOREST_AREA = 160
 
static final int MILITARY_INSTALLATION = 161
 
static final int PUBLIC_TRANSPORT_STOP = 162
 
static final int CAR_REPAIR_FACILITY = 200
 
static final int PETROL_STATION = 201
 
static final int HOTEL_OR_MOTEL = 202
 
static final int RESTAURANT = 203
 
static final int CASH_DISPENSER = 204
 
static final int CAR_DEALER = 205
 
static final int USERDEFINE = 255
 

Detailed Description

PoiService enum enumerates predefined POI categories.

Member Function Documentation

static String addPoi ( Poi  poi,
int  maxTime 
) throws InvalidLocationException
static

Adds user POI to custom category.

Parameters
poiPoi instance which contains informations about POI to add.
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Returns
address of location if Poi#isSearchAddress() is true, else null
Exceptions
InvalidLocationExceptionthe invalid location exception

References Api.getInstance(), Api.getService(), and Poi.writeBundle().

static void addPoiCategory ( String  category,
String  bitmapPath,
String  isoCode,
int  maxTime 
) throws GeneralException
static

Adds custom POI category.

Parameters
categoryName of category to add.
bitmapPathPath to icon of category. It is relative path from ($ResDir)/Icons/ directory.
isoCodeISO code of map (country) for which category will be created. This parameter is obligatory.
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.

Notes:
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.

Exceptions
GeneralExceptionthe general exception

References Api.getInstance(), and Api.getService().

static String deletePoi ( Poi  poi,
int  maxTime 
) throws InvalidLocationException
static

Deletes custom POI from custom category.

Parameters
poiPoi instance which contains informations about POI to remove.
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Returns
address of Poi if search address is true Notes:
It is necessary to fill Location and Name members of Poi (see Poi class). DeletePoi function deletes just item which has same value of Location and Name like taken Poi.
Exceptions
InvalidLocationExceptionthe invalid location exception

References Api.getInstance(), Api.getService(), and Poi.writeBundle().

static void deletePoiCategory ( String  category,
String  isoCode,
int  maxTime 
) throws GeneralException
static

Deletes custom POI category.

Parameters
categoryName of category to add.
isoCodeISO code of map (country) for which category will be created. This parameter is obligatory.
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.

Notes:
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.

Exceptions
GeneralExceptionthe general exception

References Api.getInstance(), and Api.getService().

static Poi findNearbyPoi ( int  categoryNumber,
String  category,
int  x,
int  y,
int  maxTime 
) throws GeneralException
static

Finds the nearest POI around given position.

The POI may be from the original map POIs or it may be a custom POI.

Parameters
categoryNumberCategory ID. If this value is filled with standard value, original POIs are found. Set to PoiService.USERDEFINE for custom POI. Possible values are enumerated in ApiPoi enum.
categoryCustom POI category name, if custom POI is searched.
xX-coordinate of place, where to search.
yY-coordinate of place, where to search.
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Returns
Poi Poi instance which contains information about the found POI.

Notes:
Distance between taken position and POI is computed bee-line.
If dwCategory=PoiService.USERDEFINE it is necessary to set also category. Otherwise category name is obtained from category ID.
X and Y coordinates are geographical longitude and latitude in degrees multiplied by 100000.

Exceptions
GeneralExceptionthe general exception

References Api.getInstance(), Api.getService(), and Poi.readBundle().

static ArrayList<Poi> findNearbyPoiList ( int  categoryNumber,
String  category,
int  x,
int  y,
int  maxCount,
int  maxTime 
) throws GeneralException
static

Finds the nearest POI around given position.

The POI may be from the original map POIs or it may be a custom POI.

Parameters
categoryNumberCategory ID. If this value is filled with standard value, original POIs are found. Set to PoiService.USERDEFINE for custom POI. Possible values are enumerated in ApiPoi enum.
categoryCustom POI category name, if custom POI is searched.
xX-coordinate of place, where to search.
yY-coordinate of place, where to search.
maxCountthe max count of array elements to return
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Returns
ArrayList of found Pois

Notes:
Distance between taken position and POI is computed bee-line.
If dwCategory=PoiService.USERDEFINE it is necessary to set also category. Otherwise category name is obtained from category ID.
X and Y coordinates are geographical longitude and latitude in degrees multiplied by 100000.

Exceptions
GeneralExceptionthe general exception

References Api.getInstance(), Api.getService(), and Poi.readBundle().

static ArrayList<PoiCategory> getPoiCategoryList ( int  maxTime) throws GeneralException
static

Returns the list of POI categories.

Parameters
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Returns
ArrayList of found PoiCategory items.
Exceptions
GeneralExceptionthe general exception

References Api.getInstance(), Api.getService(), and PoiCategory.readBundle().

static ArrayList<Poi> getPoiList ( String  category,
boolean  searchAddress,
int  maxTime 
) throws GeneralException
static

Returns list of POIs from selected category.

Parameters
categoryCategory name. It is name of category we want to retrieve list of POIs from.
searchAddressSpecifies whether GetPoisList function searches for address or not. If searchAddress=true GetPoiList fills address member of each PoiArr item (see Poi class) with corresponding address.
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Returns
ArrayList of retrieved Poi items.
Exceptions
GeneralExceptionthe general exception

References Api.getInstance(), Api.getService(), and Poi.readBundle().

static void highlightPoi ( String  category,
String  name,
String  sound,
Position  pos,
int  maxTime 
) throws GeneralException
static

Highlights the POI.

Parameters
categorythe category of POI
namethe name of POI
soundthe sound
postho position of POI
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Exceptions
GeneralExceptionthe general exception

References Api.getInstance(), and Api.getService().

static void makeUserPoiVisible ( int  categoryId,
String  category,
boolean  show,
int  maxTime 
) throws GeneralException
static

Shows or hides POI category in POI category list.

Parameters
categoryIdCategory ID. Possible values are enumerated in ApiPoi enum.
categoryCustom category name to show/hide.
showDetermines whether MakeUserPoiVisible shows or hides category. If bShow=true category will be shown if bShow=false category will be hidden.
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.

Notes:
If MakeUserPoiVisible hides custom category the category does not occur in category list.
If dwCategory=PoiService.USERDEFINE it is necessary to set also category. Otherwise category name is obtained from category ID.

Exceptions
GeneralExceptionthe general exception

References Api.getInstance(), and Api.getService().

static PoiCategory setPoiWarning ( PoiCategory  poiCategory,
int  maxTime 
) throws GeneralException
static

Sets the POI warning based on the attributes of the PoiCategory instance.

Parameters
poiCategoryPoiCategory instance which contains information about POI category to set.
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Returns
the poi category
Exceptions
GeneralExceptionthe general exception

References Api.getInstance(), Api.getService(), PoiCategory.readBundle(), and PoiCategory.writeBundle().

Member Data Documentation

final int ABBEY = 84
static
final int AIRLINE_ACCESS = 153
static
final int AIRPORT = 44
static
final int AMUSEMENT_PARK = 85
static
final int ARTS_CENTRE = 86
static
final int ATM = 53
static
final int BANK = 14
static
final int BEACH = 55
static
final int BOVAG_GARAGE = 62
static
final int BREAKDOWN_SERVICE = 81
static
final int BUILDING_FOOTPRINT = 87
static
final int BUS_STATION = 45
static
final int BUSINESS_FACILITY = 43
static
final int CAFE_PUB = 70
static
final int CAMPING_GROUND = 28
static
final int CAR_DEALER = 205
static
final int CAR_RACETRACK = 108
static
final int CAR_REPAIR_FACILITY = 200
static
final int CAR_SHIPPING_TERMINAL = 26
static
final int CARAVAN_SITE = 29
static
final int CARGO_CENTRE = 25
static
final int CASH_DISPENSER = 204
static
final int CASINO = 22
static
final int CASTLE = 88
static
final int CEMETERY = 79
static
final int CHURCH = 89
static
final int CINEMA = 23
static
final int CITY_HALL = 9
static
final int COACH_AND_LORRY_PARKING = 30
static
final int COLLEGE_UNIVERSITY = 42
static
final int COMMERCIAL_BUILDING = 76
static
final int COMMUNITY_CENTRE = 31
static
final int COMPANY = 52
static
final int CONCERT_HALL = 61
static
final int CONDOMINIUM = 75
static
final int CONVENTION_CENTRE = 71
static
final int COURTHOUSE = 58
static
final int CULTURAL_CENTRE = 5
static
final int DENTIST = 68
static
final int DEPARTEMENT_STORE = 13
static
final int DOCTOR = 67
static
final int EMBASSY = 33
static
final int EMERGENCY_CALL_STATION = 48
static
final int EMERGENCY_MEDICAL_SERVICE = 49
static
final int ENTERTAINMENT = 83
static
final int EXHIBITION_CENTRE = 46
static
final int FACTORY_GROUND_PHILIPS = 90
static
final int FERRY_TERMINAL = 152
static
final int FIRE_BRIGADE = 50
static
final int FIRST_AID_POST = 11
static
final int FOREST_AREA = 160
static
final int FORTRESS = 91
static
final int FREEPORT = 51
static
final int FRONTIER_CROSSING = 34
static
final int GOLF_COURSE = 92
static
final int GOVERNMENT_OFFICE = 111
static
final int HIPPODROME = 54
static
final int HOLIDAY_AREA = 93
static
final int HOSPITAL_POYCLINIC = 7
static
final int HOTEL_OR_MOTEL = 202
static
final int ICE_SKATING_RINK = 57
static
final int IMPORTANT_TOURIST_ATTRACTION = 155
static
final int INDUSTRIAL_BUILDING = 77
static
final int KINDERGARTEN = 47
static
final int LEISURE_CENTRE = 72
static
final int LIBRARY = 94
static
final int LIGHTHOUSE = 95
static
final int MILITARY_CEMETERY = 96
static
final int MILITARY_INSTALLATION = 161
static
final int MONASTERY = 97
static
final int MONUMENT = 98
static
final int MOTORING_ORGANIZATION_OFFICE = 35
static
final int MOUNTAIN_PASS = 109
static
final int MOUNTAIN_PEAK = 59
static
final int MUSEUM = 3
static
final int MUSIC_CENTRE = 66
static
final int NATIVES_RESERVATION = 78
static
final int NATURAL_RESERVE = 99
static
final int NIGHTLIFE = 73
static
final int OPEN_PARKING_AREA = 154
static
final int OPERA = 60
static
final int PARK_AND_RECREATION_AREA = 159
static
final int PARKING_GARAGE = 150
static
final int PETROL_STATION = 201
static
final int PHARMACY = 12
static
final int PLACE_OF_WORSHIP = 151
static
final int POLICE_STATION = 8
static
final int POST_OFFICE = 10
static
final int PRISON = 100
static
final int PUBLIC_PHONE = 16
static
final int PUBLIC_TRANSPORT_STOP = 162
static
final int RAILWAY_STATION = 156
static
final int RECREATION_FACILITY = 36
static
final int RENT_A_CAR_FACILITY = 1
static
final int RENT_A_CAR_PARKING = 107
static
final int REST_AREA = 157
static
final int RESTAURANT = 203
static
final int RESTAURANT_AREA = 56
static
final int ROAD_SIDE_DINER = 37
static
final int ROCKS = 101
static
final int SCENIC_PANORAMIC_VIEW = 20
static
final int SCHOOL = 38
static
final int SHOP = 158
static
final int SHOPPING_CENTRE = 39
static
final int SKATING_RINK = 64
static
final int SKI_LIFT_STATION = 18
static
final int SPORTS_CENTRE = 6
static
final int SPORTS_HALL = 102
static
final int STADIUM = 40
static
final int STATE_POLICE_OFFICE = 103
static
final int SWIMMING_POOL = 110
static
final int TENNIS_COURT = 63
static
final int THEATRE = 4
static
final int TOLL = 41
static
final int TOURIST_INFORMATION_OFFICE = 2
static
final int TRANSPORT_COMPANY = 21
static
final int TRAVEL_AGENCY = 15
static
final int USERDEFINE = 255
static
final int VEHICLE_EQUIPMENT_PROVIDER = 82
static
final int VETERINARIAN = 69
static
final int WALKING_AREA = 104
static
final int WAREHOUSE = 17
static
final int WATER_MILL = 105
static
final int WATER_SPORT = 65
static
final int WINDMILL = 106
static
final int WINERY = 24
static
final int YACHT_BASIN = 74
static
final int ZOO = 19
static