Grid tilestyle file description

Feedback


When you publish a grid tile as map services, you can specify styles for the map, The built-in style templates in iServer are files【SuperMapiServer installation directory】\webapps\iserver\templates\rasterstyles\RasterTilesStyle.json.

The parameters in the style file are described in detail below:

name:map name. Customization is supported. Optional parameters. It needs to be expressed in the form of placeholders.

maxZoom: The maximum level of the map that can be displayed. Optional parameters.

center: The center point of the map. Optional parameters.

scale: initially visible scale. Optional parameters.

sources: Source data. Optional. Specifically, the following parameters are included:

{datasetName}:dataset name. Optional parameters.

bounds:dataset extent. Optional parameters.

layers: layer information. Required. Specifically, the following parameters are included:

visible: Whether the layer is visible. Optional parameters.

maxScale: The maximum visible scale. Optional parameters.

colorSpaceType: Band style (currently only RGB is supported). Set for multiband data only. Required parameters.

displayBandIndexes: The displayed band indexes. For example, the default band indexes corresponding to RGB are 0, 1, and 2. Set for multiband data only. Required parameters.

colorMap: A color table that consists of a mapping between the break values of the grid and the color stops, such as 0.3->d9f0a3ff refers to 0, 0.3) showing d9f0a3ff. Set for single band data only. Optional parameters.

bandIndex: The index of the band. The default value is 0. Set for single band data only. Required parameters.

display Mode: display style. SINGLE (single band) and COMBINE (multi-band) are currently supported. Required parameters

name: dataset name. It needs to be expressed in the form of placeholders. Optional parameters.

minScale: Minimum visible scale. Optional parameters.

 

Examples are as follows

The style file of multi-band raster data is as follows:

[

    {

        "name": "TIF",

        "maxZoom": 20,

        "center": [

            12523441.1217011,

            389855.552409316

        ],

        "scale": 1.73072749732112E-06,

        "sources": {

            "layerName": {

                "bounds": [

                    12355889.7056718,

                    333516.988881971,

                    12690992.5377304,

                    446194.11593666

                ]

            }

        },

        "layers": [

            {

                "visible": true,

                "maxScale": 6.92290998928448E-06,

                "colorSpaceType": "RGB",

                "displayBandIndexes": [

                    2,

                    1,

                    0

                ],

                "caption": null,

                "description": null,

                "subLayers": {

                    "layers": []

                },

                "type": "CUSTOM",

                "displayMode": "COMBINE",

                "queryable": false,

                "name": "TIF",

                "bounds": null,

                "minScale": 6.76065428641062E-09

            }

        ]

    }

]