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

Static Public Member Functions

static void switchMap (String loadPath, int maxTime) throws GeneralException
 Loads map from .mlm file. More...
 
static void showCoordinatesOnMap (Position location, int zoom, int maxTime) throws GeneralException
 Shows taken location on BrowseMap. More...
 
static void showRectangleOnMap (Rectangle rect, int maxTime) throws GeneralException
 Shows taken rectangle on the BrowseMap. More...
 
static int addBitmapToMap (String bitmapPath, int x, int y, int maxTime) throws GeneralException
 Shows picture on BrowseMap. More...
 
static void removeBitmap (int bitmapId, int maxTime) throws GeneralException
 Removes picture from BrowseMap. More...
 
static void removeAllBitmaps (int maxTime) throws GeneralException
 Removes all pictures from BrowseMap. More...
 
static void showBitmap (int bitmapId, boolean show, int maxTime) throws GeneralException
 Shows or hides picture on BrowseMap. More...
 
static void moveBitmap (int bitmapId, int x, int y, int maxTime) throws GeneralException
 Moves picture on BrowseMap. More...
 
static void loadGFFile (String path, int maxTime) throws GeneralException
 The function loads a GF file then draws GF data on map. More...
 
static void unloadGFFile (String path, int maxTime) throws GeneralException
 The function unloads GF file and erases all lines drawn before. More...
 
static void loadExternalFile (String path, int type, int maxTime) throws GeneralException
 Loads external file. More...
 
static void unloadExternalFile (String path, int type, int maxTime) throws GeneralException
 Unloads external file. More...
 
static void reloadExternalFiles (int maxTime) throws GeneralException
 Reloads all external files stored in geofiles folder. More...
 

Member Function Documentation

static int addBitmapToMap ( String  bitmapPath,
int  x,
int  y,
int  maxTime 
) throws GeneralException
static

Shows picture on BrowseMap.

Parameters
bitmapPathFull path to desired picture.
xX-coordinate of picture position on BrowseMap.
yY-coordinate of picture position on BrowseMap.
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Returns
int which contains returned picture ID that can be used later to manipulate with picture. Value is set by AddBitmapToMap function.

Notes:
Picture must be of 32 bit bmp format.
X and Y coordinates represents geographical longitude and latitude taken in meters.
BrowseMap is map shown on after clicking Browse Map menu button. BrowseMap allows browse the loaded maps and change zoom.

Exceptions
GeneralExceptionthe general exception

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

static void loadExternalFile ( String  path,
int  type,
int  maxTime 
) throws GeneralException
static

Loads external file.

Parameters
paththe full path to file
typeExternal file type 1 - GF file, 2 - TMC file
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 loadGFFile ( String  path,
int  maxTime 
) throws GeneralException
static

The function loads a GF file then draws GF data on map.

Parameters
pathPath to the GF file
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 moveBitmap ( int  bitmapId,
int  x,
int  y,
int  maxTime 
) throws GeneralException
static

Moves picture on BrowseMap.

Parameters
bitmapIdPicture ID returned from addBitmapToMap(String, int, int, int) function. Identifies picture to be moved.
xX-coordinate of picture position on BrowseMap.
yY-coordinate of picture position on BrowseMap.
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.

Notes:
X and Y coordinates represents geographical longitude and latitude taken in meters.
BrowseMap is map shown on after clicking Browse Map menu button. BrowseMap allows browse the loaded maps and change zoom.

Exceptions
GeneralExceptionthe general exception

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

static void reloadExternalFiles ( int  maxTime) throws GeneralException
static

Reloads all external files stored in geofiles folder.

Parameters
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 removeAllBitmaps ( int  maxTime) throws GeneralException
static

Removes all pictures from BrowseMap.

Parameters
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.

Notes:
RemoveBitmap function removes bitmap from BrowseMap and also deletes all alocated memory.
BrowseMap is map shown on after clicking Browse Map menu button. BrowseMap allows browse the loaded maps and change zoom.

Exceptions
GeneralExceptionthe general exception

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

static void removeBitmap ( int  bitmapId,
int  maxTime 
) throws GeneralException
static

Removes picture from BrowseMap.

Parameters
bitmapIdPicture ID retrieved from addBitmapToMap(String, int, int, int) function. Identifies picture to be removed.
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.

Notes:
RemoveBitmap function removes bitmap from BrowseMap and also deletes all alocated memory.
BrowseMap is map shown on after clicking Browse Map menu button. BrowseMap allows browse the loaded maps and change zoom.

Exceptions
GeneralExceptionthe general exception

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

static void showBitmap ( int  bitmapId,
boolean  show,
int  maxTime 
) throws GeneralException
static

Shows or hides picture on BrowseMap.

Parameters
bitmapIdPicture ID returned from addBitmapToMap(String, int, int, int) function. Identifies picture to be shown/hidden.
showDetermines whether picture will be shown or hidden.
true - Picture will be shown.
false - Picture will be hidden.
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.

Notes:
BrowseMap is map shown on after clicking Browse Map menu button. BrowseMap allows browse the loaded maps and change zoom.

Exceptions
GeneralExceptionthe general exception

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

static void showCoordinatesOnMap ( Position  location,
int  zoom,
int  maxTime 
) throws GeneralException
static

Shows taken location on BrowseMap.

Parameters
locationPosition instance which contains location which will be shown on BrowseMap.
zoomDistance (in meters) form ground.Range of this parameter should be between 50 and 30000000.
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.

Notes:
Point with taken location will be shown in the middle of BrowseMap.
BrowseMap is map shown on after clicking Browse Map menu button. BrowseMap allows browse the loaded maps and change zoom.

Exceptions
GeneralExceptionthe general exception

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

static void showRectangleOnMap ( Rectangle  rect,
int  maxTime 
) throws GeneralException
static

Shows taken rectangle on the BrowseMap.

Parameters
rectRectangle instance which contains rectangle to show on the BrowseMap.
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.

Notes:
Zoom will be adjusted so that entire rectangle will be shown.
BrowseMap is map shown on after clicking Browse Map menu button. BrowseMap allows browse the loaded maps and change zoom.

Exceptions
GeneralExceptionthe general exception

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

static void switchMap ( String  loadPath,
int  maxTime 
) throws GeneralException
static

Loads map from .mlm file.

Parameters
loadPathFull path to .mlm file.
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 unloadExternalFile ( String  path,
int  type,
int  maxTime 
) throws GeneralException
static

Unloads external file.

Parameters
paththe full path to file
typeExternal file type 1 - GF file, 2 - TMC file
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 unloadGFFile ( String  path,
int  maxTime 
) throws GeneralException
static

The function unloads GF file and erases all lines drawn before.

Parameters
pathPath to the GF file
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().