Overview

Layer styles are defined by an AQS query, which determines the asset data that is overlaid on to a map when the associated layer is active.

Editing layer style query

You can also edit the query that defines the data that is displayed by the style.

  1. Open the Layers panel to display list of layers.
  2. Select a layer to display the list of styles within the layer.
  3. Select the style that you want to edit to view its details, the General page is displayed by default.
  4. Select the Style rules page to view the query, see Alloy Query Syntax.
  5. Select the edit icon . You can now access the query editor or AQS builder to edit the query that defines the data in the style.

alt text

  1. Select the Save button when you have finished editing the style details.

Example style structure

This is an example of a simple inspections query that is created when you add a style based on the inspections design to a layer, in this example all the inspections are included in the overlay on the map, see Query node.

{
  "type": "Query",
  "properties": {
   "dodiCode": "designs_inspections",
   "attributes": [
     "all"
   ]
  }
}

You can edit the query so that the style only displays inspections with a specific status, for example, Proposed inspections.

{
  "type": "Query",
  "properties": {
    "dodiCode": "designInterfaces_inspections"
  },
  "children": [
    {
      "type": "Equals",
      "properties": {
        "ignoreCase": false
      },
      "children": [
        {
          "type": "Attribute",
          "properties": {
            "attributeCode": "attributes_taskStatusTypesStatus",
            "path": "root.attributes_tasksStatus.attributes_taskStatusesStatusType"
          }
        },
        {
          "type": "String",
          "properties": {
            "value": [
              "Proposed"
            ]
          }
        }
      ]
    }
  ]
}