{
  "GLayers": [
    {
      "groupID": "淡海共管設備",
      "groupName": "淡海共管設備",
      "groupVisible": true,
      "isAddToMap": true,
      "sublayers": [
        {
          "id": "d1_door",
          "title": "門禁"
        },
        {
          "id": "d2_pump",
          "title": "抽水泵"
        },
        {
          "id": "d3_air",
          "title": "排風機"
        },
        {
          "id": "d4_light",
          "title": "照明"
        },
        {
          "id": "d5_fire",
          "title": "火警分區"
        },
        {
          "id": "d6_plc",
          "title": "PLC狀態"
        },
        {
          "id": "d7_aircot",
          "title": "氣體偵測"
        }
      ]
    }
  ],
  "LayerDefs": [
    {
      "id": "d1_door",
      "title": "門禁",
      "refreshInterval": 0.1,
      "visible": true,
      "fields": [
        {
          "name": "objectid",
          "alias": "objectid",
          "type": "oid"
        },
        {
          "name": "holeid",
          "alias": "holeid",
          "type": "string"
        },
        {
          "name": "fvalue",
          "alias": "狀態",
          "type": "integer"
        }
      ],
      "objectIdField": "objectid",
      "geometryType": "point",
      "spatialReference": { "wkid": 4326 },
      "source": [],
      "popupTemplate": {
        "title": "{holeid}",
        "content": "fvalue:{fvalue}"
      },
      "labelingInfo": [
        {
          "labelExpressionInfo": {
            "expression": "$feature.holeid"
          },
          "labelPlacement": "above-right",
          "symbol": {
            "type": "text",
            "font": {
              "size": 12,
              "weight": "bold"
            },
            "color": "white",
            "haloColor": "blue",
            "haloSize": 1
          }
        }
      ],
      "renderer": {
        "type": "unique-value",
        "field": "fvalue",

        "uniqueValueInfos": [
          {
            "label": "關閉",
            "value": 0,
            "symbol": {
              "type": "point-3d",
              "symbolLayers": [
                {
                  "type": "icon",
                  "width": 5,
                  "resource": {
                    "primitive": "square"
                  },
                  "material": {
                    "color": "#4d4d4d"
                  }
                }
              ]
            }
          },
          {
            "label": "開啟",
            "value": 1,
            "symbol": {
              "type": "point-3d",
              "symbolLayers": [
                {
                  "type": "icon",
                  "width": 10,
                  "resource": {
                    "primitive": "square"
                  },
                  "material": {
                    "color": "green"
                  }
                }
              ]
            }
          }
        ]
      },
      "elevationInfo": {
        "mode": "relative-to-scene",
        "offset": 1,
        "featureExpressionInfo": {
          "expression": ""
        },
        "unit": "meters"
      }
    },
    {
      "id": "d2_pump",
      "title": "抽水泵",
      "refreshInterval": 0.1,
      "visible": false,
      "fields": [
        {
          "name": "objectid",
          "alias": "objectid",
          "type": "oid"
        },
        {
          "name": "dvid",
          "alias": "dvid",
          "type": "string"
        },
        {
          "name": "fvalue",
          "alias": "狀態",
          "type": "integer"
        }
      ],
      "objectIdField": "objectid",
      "geometryType": "point",
      "spatialReference": { "wkid": 4326 },
      "source": [],
      "popupTemplate": {
        "title": "{dvid}",
        "content": "fvalue:{fvalue}"
      },
       "labelingInfo": [
        {
          "labelExpressionInfo": {
            "expression": "$feature.dvid"
          },
          "labelPlacement": "above-right",
          "symbol": {
            "type": "text",
            "font": {
              "size": 10
            },
            "color": "white",
            "haloColor": "blue",
            "haloSize": 0.5
          }
        }
      ],
      "renderer": {
        "type": "unique-value",
        "field": "fvalue",

        "uniqueValueInfos": [
          {
            "label": "待機",
            "value": 0,
            "symbol": {
              "type": "point-3d",
              "symbolLayers": [
                {
                  "type": "icon",
                  "width": 5,
                  "resource": {
                    "primitive": "circle"
                  },
                  "material": {
                    "color": "#4d4d4d"
                  }
                }
              ]
            }
          },
          {
            "label": "運轉中",
            "value": 1,
            "symbol": {
              "type": "point-3d",
              "symbolLayers": [
                {
                  "type": "icon",
                  "width": 10,
                  "resource": {
                    "primitive": "circle"
                  },
                  "material": {
                    "color": "green"
                  },
                  "outline": {
                    "color": "white",
                    "size": 1
                  }
                }
              ]
            }
          },
          {
            "label": "故障",
            "value": 2,
            "symbol": {
              "type": "point-3d",
              "symbolLayers": [
                {
                  "type": "icon",
                  "width": 10,
                  "resource": {
                    "primitive": "circle"
                  },
                  "material": {
                    "color": "red"
                  },
                  "outline": {
                    "color": "white",
                    "size": 1
                  }
                }
              ]
            }
          }
        ]
      },
      "elevationInfo": {
        "mode": "relative-to-scene",
        "offset": 1,
        "featureExpressionInfo": {
          "expression": ""
        },
        "unit": "meters"
      }
    },
    {
      "id": "d3_air",
      "title": "排風機",
      "refreshInterval": 0.1,
      "visible": false,
      "fields": [
        {
          "name": "objectid",
          "alias": "objectid",
          "type": "oid"
        },
        {
          "name": "dvid",
          "alias": "dvid",
          "type": "string"
        },
        {
          "name": "fvalue",
          "alias": "狀態",
          "type": "integer"
        }
      ],
      "objectIdField": "objectid",
      "geometryType": "point",
      "spatialReference": { "wkid": 4326 },
      "source": [],
      "popupTemplate": {
        "title": "{dvid}",
        "content": "fvalue:{fvalue}"
      },
      "labelingInfo": [
        {
          "labelExpressionInfo": {
            "expression": "$feature.dvid"
          },
          "labelPlacement": "above-right",
          "symbol": {
            "type": "text",
            "font": {
              "size": 10
            },
            "color": "white",
            "haloColor": "blue",
            "haloSize": 0.5
          }
        }
      ],
      "renderer": {
        "type": "unique-value",
        "field": "fvalue",

        "uniqueValueInfos": [
          {
            "label": "待機",
            "value": 0,
            "symbol": {
              "type": "point-3d",
              "symbolLayers": [
                {
                  "type": "icon",
                  "width": 5,
                  "resource": {
                    "primitive": "kite"
                  },
                  "material": {
                    "color": "#4d4d4d"
                  }
                }
              ]
            }
          },
          {
            "label": "運轉中",
            "value": 1,
            "symbol": {
              "type": "point-3d",
              "symbolLayers": [
                {
                  "type": "icon",
                  "width": 10,
                  "resource": {
                    "primitive": "kite"
                  },
                  "material": {
                    "color": "green"
                  },
                  "outline": {
                    "color": "white",
                    "size": 1
                  }
                }
              ]
            }
          },
          {
            "label": "故障",
            "value": 2,
            "symbol": {
              "type": "point-3d",
              "symbolLayers": [
                {
                  "type": "icon",
                  "width": 10,
                  "resource": {
                    "primitive": "kite"
                  },
                  "material": {
                    "color": "red"
                  },
                  "outline": {
                    "color": "white",
                    "size": 1
                  }
                }
              ]
            }
          }
        ]
      },
      "elevationInfo": {
        "mode": "relative-to-scene",
        "offset": 1,
        "featureExpressionInfo": {
          "expression": ""
        },
        "unit": "meters"
      }
    },
    {
      "id": "d4_light",
      "title": "照明",
      "refreshInterval": 0.1,
      "visible": false,
      "fields": [
        {
          "name": "objectid",
          "alias": "objectid",
          "type": "oid"
        },
        {
          "name": "dvid",
          "alias": "dvid",
          "type": "string"
        },
        {
          "name": "fvalue",
          "alias": "狀態",
          "type": "integer"
        }
      ],
      "objectIdField": "objectid",
      "geometryType": "point",
      "spatialReference": { "wkid": 4326 },
      "source": [],
      "popupTemplate": {
        "title": "{dvid}",
        "content": "fvalue:{fvalue}"
      },
      "labelingInfo": [
        {
          "labelExpressionInfo": {
            "expression": "$feature.dvid"
          },
          "labelPlacement": "above-right",
          "symbol": {
            "type": "text",
            "font": {
              "size": 10
            },
            "color": "white",
            "haloColor": "blue",
            "haloSize": 0.5
          }
        }
      ],
      "renderer": {
        "type": "unique-value",
        "field": "fvalue",

        "uniqueValueInfos": [
          {
            "label": "關閉",
            "value": 0,
            "symbol": {
              "type": "point-3d",
              "symbolLayers": [
                {
                  "type": "icon",
                  "width": 5,
                  "resource": {
                    "primitive": "triangle"
                  },
                  "material": {
                    "color": "#4d4d4d"
                  }
                }
              ]
            }
          },
          {
            "label": "開啟",
            "value": 1,
            "symbol": {
              "type": "point-3d",
              "symbolLayers": [
                {
                  "type": "icon",
                  "width": 10,
                  "resource": {
                    "primitive": "triangle"
                  },
                  "material": {
                    "color": "green"
                  },
                  "outline": {
                    "color": "white",
                    "size": 1
                  }
                }
              ]
            }
          }
        ]
      },
      "elevationInfo": {
        "mode": "relative-to-scene",
        "offset": 1,
        "featureExpressionInfo": {
          "expression": ""
        },
        "unit": "meters"
      }
    },
    {
      "id": "d5_fire",
      "title": "火警分區",
      "refreshInterval": 0.1,
      "visible": false,
      "fields": [
        {
          "name": "objectid",
          "alias": "objectid",
          "type": "oid"
        },
        {
          "name": "dvid",
          "alias": "dvid",
          "type": "string"
        },
        {
          "name": "fvalue",
          "alias": "狀態",
          "type": "integer"
        }
      ],
      "objectIdField": "objectid",
      "geometryType": "point",
      "spatialReference": { "wkid": 4326 },
      "source": [],
      "popupTemplate": {
        "title": "{dvid}",
        "content": "fvalue:{fvalue}"
      },
      "labelingInfo": [
        {
          "labelExpressionInfo": {
            "expression": "$feature.dvid"
          },
          "labelPlacement": "above-right",
          "symbol": {
            "type": "text",
            "font": {
              "size": 10
            },
            "color": "white",
            "haloColor": "blue",
            "haloSize": 0.5
          }
        }
      ],
      "renderer": {
        "type": "unique-value",
        "field": "fvalue",

        "uniqueValueInfos": [
          {
            "label": "正常",
            "value": 0,
            "symbol": {
              "type": "point-3d",
              "symbolLayers": [
                {
                  "type": "icon",
                  "width": 5,
                  "resource": {
                    "primitive": "circle"
                  },
                  "material": {
                    "color": "#4d4d4d"
                  }
                }
              ]
            }
          },
          {
            "label": "警示",
            "value": 1,
            "symbol": {
              "type": "point-3d",
              "symbolLayers": [
                {
                  "type": "icon",
                  "width": 10,
                  "resource": {
                    "primitive": "circle"
                  },
                  "material": {
                    "color": "red"
                  },
                  "outline": {
                    "color": "white",
                    "size": 1
                  }
                }
              ]
            }
          }
        ]
      },
      "elevationInfo": {
        "mode": "relative-to-scene",
        "offset": 1,
        "featureExpressionInfo": {
          "expression": ""
        },
        "unit": "meters"
      }
    },
    {
      "id": "d6_plc",
      "title": "PLC狀態",
      "refreshInterval": 0.1,
      "visible": false,
      "fields": [
        {
          "name": "objectid",
          "alias": "objectid",
          "type": "oid"
        },
        {
          "name": "dvid",
          "alias": "dvid",
          "type": "string"
        },
        {
          "name": "fvalue",
          "alias": "狀態",
          "type": "integer"
        }
      ],
      "objectIdField": "objectid",
      "geometryType": "point",
      "spatialReference": { "wkid": 4326 },
      "source": [],
      "popupTemplate": {
        "title": "{dvid}",
        "content": "fvalue:{fvalue}"
      },
      "labelingInfo": [
        {
          "labelExpressionInfo": {
            "expression": "$feature.dvid"
          },
          "labelPlacement": "above-right",
          "symbol": {
            "type": "text",
            "font": {
              "size": 10
            },
            "color": "white",
            "haloColor": "blue",
            "haloSize": 0.5
          }
        }
      ],
      "renderer": {
        "type": "unique-value",
        "field": "fvalue",

        "uniqueValueInfos": [
          {
            "label": "正常",
            "value": 0,
            "symbol": {
              "type": "point-3d",
              "symbolLayers": [
                {
                  "type": "icon",
                  "width": 5,
                  "resource": {
                    "primitive": "circle"
                  },
                  "material": {
                    "color": "green"
                  }
                }
              ]
            }
          },
          {
            "label": "斷訊",
            "value": 1,
            "symbol": {
              "type": "point-3d",
              "symbolLayers": [
                {
                  "type": "icon",
                  "width": 10,
                  "resource": {
                    "primitive": "circle"
                  },
                  "material": {
                    "color": "red"
                  },
                  "outline": {
                    "color": "white",
                    "size": 1
                  }
                }
              ]
            }
          }
        ]
      },
      "elevationInfo": {
        "mode": "relative-to-scene",
        "offset": 1,
        "featureExpressionInfo": {
          "expression": ""
        },
        "unit": "meters"
      }
    },
    {
      "id": "d7_aircot",
      "title": "氣體偵測",
      "refreshInterval": 0.1,
      "visible": false,
      "minScale": 3000,
      "fields": [
        {
          "name": "objectid",
          "alias": "objectid",
          "type": "oid"
        },
        {
          "name": "type",
          "alias": "type",
          "type": "string"
        },
        {
          "name": "dvid",
          "alias": "dvid",
          "type": "string"
        },
        {
          "name": "fvalue",
          "alias": "狀態",
          "type": "double"
        }
      ],
      "objectIdField": "objectid",
      "geometryType": "point",
      "spatialReference": { "wkid": 4326 },
      "source": [],
      "popupTemplate": {
        "type": "{type}",
        "title": "{dvid}",
        "content": "fvalue:{fvalue}"
      },
      "labelingInfo": [
        {
          "labelExpressionInfo": {
            "expression": "$feature.dvid +':'+$feature.fvalue + ' ppm'"
          },
          "labelPlacement": "above-right",
          "where": "type = 'C' and fvalue <> 0",
          "symbol": {
            "type": "text",
            "font": {
              "size": 12,
              "weight": "bold"
            },
            "color": "white",
            "haloColor": "purple",
            "haloSize": 1
          }
        },
        {
          "labelExpressionInfo": {
            "expression": "$feature.dvid +':'+ $feature.fvalue + ' vol%'"
          },
          "labelPlacement": "above-right",
          "where": "type = 'O' and fvalue <> 0",
          "symbol": {
            "type": "text",
            "font": {
              "size": 12,
              "weight": "bold"
            },
            "color": "white",
            "haloColor": "blue",
            "haloSize": 1
          }
        },
        {
          "labelExpressionInfo": {
            "expression": "$feature.dvid +':'+$feature.fvalue + ' ℃'"
          },
          "labelPlacement": "above-right",
          "where": "type = 'T' and fvalue <> 0",
          "symbol": {
            "type": "text",
            "font": {
              "size": 12,
              "weight": "bold"
            },
            "color": "white",
            "haloColor": "orange",
            "haloSize": 1
          }
        }
      ],
      "renderer": {
        "type": "unique-value",
        "field": "type",

        "uniqueValueInfos": [
          {
            "label": "一氧化碳",
            "value": "C",
            "symbol": {
              "type": "simple-marker",
              "color": [ 102, 0, 153, 0.6 ],
              "size": 4,
              "outline": {
                "color": [ 0, 0, 0, 0.4 ],
                "width": 0.5
              }
            }
          },
          {
            "label": "氧氣",
            "value": "O",
            "symbol": {
              "type": "simple-marker",
              "color": [ 0, 0, 255, 0.6 ],
              "size": 4,
              "outline": {
                "color": [ 0, 0, 0, 0.4 ],
                "width": 0.5
              }
            }
          },
          {
            "label": "溫度",
            "value": "T",
            "symbol": {
              "type": "simple-marker",
              "color": [ 255, 104, 31, 0.6 ],
              "size": 4,
              "outline": {
                "color": [ 0, 0, 0, 0.4 ],
                "width": 0.5
              }
            }
          }
        ]
      },
      "elevationInfo": {
        "mode": "relative-to-scene",
        "offset": 1,
        "featureExpressionInfo": {
          "expression": ""
        },
        "unit": "meters"
      }
    }
  ]

}