Customising The Map Look

Customising The Map Look

wat

 

Overview


Pathway Pro navigation engine (powering both Navmii Applications and Pathway Pro Mobile SDKs) provides a highly customisable map renderer configured by map colour schemes. It is possible to create colour schemes (for example, for day and night driving, pedestrian mode etc.) and switch them dynamically at a runtime.

Each colour scheme allows to customise:

  • road colours

  • road widths and road outline

  • road presence at a particular zoom level

  • road font style (including font outline)

  • route number look

  • city labels font style (per city class)

  • map background colour

  • polygon fill colour 

  • water area style

  • polygons font style

  • maximum zoom level for house numbers

  • traffic colour and texture

  • GPS position cursor image

  • skybox background image

  • border line style

  • ferry route style

  • tunnels style

  • bridges style

  • direction arrow style and colour

  • various graphic textures (e.g. finish flag)

Most of the items above can be customised per country. E.g. road color may be different for UK and France in the same application.

Map colour schemes are stored in a style set folder and described by a ResourcesSdk2.jsonfile which shall reside in the root of the folder containing the style set.

 

Getting started


If you're working on the map colour schemes in the Pathway Pro SDK repository, follow this link for further information.

If you're creating a custom map colour scheme as a user of the Pathway Pro SDK, proceed to the next chapter.

 

Map style folder structure


If you're working on the map colour schemes in the Pathway Pro SDK repository, follow this link for further information.

 

Map folder structure is flexible: none of the files, except ResourcesSdk2.json are required. Folder structure and file names are defined in ResourcesSdk2.json.

The most primitive SDK core scheme will consist of:

  • at least one Fonts.col file for font aliases

  • at least one MyMap.col file for Roads and polygons styling

  • one MyCities.col file for City/Towns labels

  • one RouteNumbers.col file for route numbers

  • two zoom table files for 2D and 3D

The most primitive color scheme you will create may consist of:

  • one MyStyle.json (or MyStyle.col) override file

  • other required files will be inherited from the core SDK scheme

 

Setting up a test environment


If you're working on the map colour schemes in the Pathway Pro SDK repository, follow this link for information on how to set up the test environment.

If you're creating a custom map colour scheme as a user of the Pathway Pro SDK, follow this link for a detailed example of creating a small custom map colour scheme.

 

Explaining a map color scheme


Important

Each scheme must be added to the ResourcesSdk2.json screens.schemes array for the Pathway Pro SDK to be able to use it.

See an example of the ResourcesSdk2.json file in the end of this chapter for reference. It defines one screen object for screens up to 500 dpi and one colour scheme with id Day-Car@2x.

Below you can find description of the objects used in the ResourcesSdk2.json file.

Screen object

Defines set of color schemes (styles) for a certain DPI. Application will pick up style automatically trying to match the closest DPI range from the "screen" array. If only one screen element is available it will be used for all DPI's

Attribute Name

Type

Description

Mandatory?

Attribute Name

Type

Description

Mandatory?

name

string

Friendly name of the screen resolution

Yes

maxDPI

int

Maximum screen DPI the style set will be used for

Yes

schemes

array

List of styles (color schemes)

Yes (at least one)

Scheme object

Defines parameters of map style. ResourcesSdk2.json has to have at least one scheme added.

Attribute Name

Type

Description

Mandatory?

Attribute Name

Type

Description

Mandatory?

id

string

ID which will be used in API to load the scheme

Yes

vehicleType

enum

Type of vehicle this scheme will be load for. Use "*" to use the scheme with all vehicle types.

Yes

isNight

array

Night or Day scheme. In case night scheme is missing in the list, day scheme will be loaded

Yes

fontFiles

array

Defines set of fonts used for map styling. You can add one file per operating system plus one default. See "FontFile" object also.

Yes

routeNumberPaths

array

List of paths to RouteNumber.col files defining look of Route Shields

No