SDK Package

Custom controls

For Custom controls, it can be accessed by assigning a class UNLMapView. For Example:

   var mapView: UnlMapView
                                                         

Grid Controls

Grid controls can be enabled in your activity initialisation by passing the setGridControls second param as true. With this approach, the grid control will be initialised with the default options.

the following options can be specified during the GridControl initialisation:

Option Type Default Description
defaultPrecision CellPrecision 9 Default precision of the cells. It can be changed manually via the grid selector
lineColor ResourceColor default_grid_line_color Grid line's colour
lineWidth Float 1f Grid line's width

If GridControl is enabled, the grid lines will be generated at certain zoom levels, dependant on the selected precision, according to the following table:

Precision Zoom level
10 20
9 18
8 16
7 14
6 12
5 10
4 8
3 4
2 3
1 2

Tiles selector

Tile selector can be enabled in your activity, initialisation by passing the enableTileSelector param true. With this approach, the tile selector control will be initialised with the default options.

the following options can be specified during the TilesSelectorControl initialisation:

Option Type Default Description
tile [Enum] TERRAIN, VECTORIAL,BASE,TRAFFIC,SATELLITE The options that will be included in the tiles selector

Custom tile selector

UnlMapView also provide access to use custom tile selecter with the following function:

Method loadStyle

This method takes a TileEnum parameter and updates the selected tile from the map.

The supported TileEnum values are: TERRAIN, VECTORIAL, BASE, TRAFFIC, SATELLITE.

Example


                                                         unlMap.loadStyle(TileEnum.BASE)