{
  "custom": {},
  "params": {},
  "permissions": {
    "securityLevels": [],
    "type": "AnyOf"
  },
  "props": {
    "defaultSize": {
      "height": 1080,
      "width": 1920
    }
  },
  "root": {
    "children": [
      {
        "custom": {
          "AnalysisExamples": "value"
        },
        "meta": {
          "name": "Map"
        },
        "position": {
          "height": 1,
          "width": 1
        },
        "propConfig": {
          "props.layers.raster.tile[0].url": {
            "binding": {
              "config": {
                "path": "session.props.theme"
              },
              "transforms": [
                {
                  "code": "\tif value \u003d\u003d \u0027dark\u0027:\n\t\treturn \u0027https://server.arcgisonline.com/arcgis/rest/services/Canvas/World_Dark_Gray_Base/MapServer/tile/{z}/{y}/{x} 6\u0027\n\telse:\n\t\treturn \u0027https://server.arcgisonline.com/arcgis/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x} 3\u0027",
                  "type": "script"
                }
              ],
              "type": "property"
            }
          }
        },
        "props": {
          "fadeAnimation": false,
          "hideViewMarkersOnZoom": false,
          "init": {
            "center": {
              "lat": "38.63697",
              "lng": "-121.06573"
            },
            "zoom": 5
          },
          "layers": {
            "raster": {
              "tile": [
                {
                  "WMS": {
                    "format": "image/jpeg",
                    "layers": "",
                    "styles": "",
                    "transparent": false,
                    "uppercase": false,
                    "version": "1.1.1"
                  },
                  "options": {
                    "attribution": "Map data \u0026copy; \u003ca href\u003d\u0027https://www.openstreetmap.org/\u0027\u003eOpenStreetMap\u003c/a\u003e contributors, \u003ca href\u003d\u0027https://creativecommons.org/licenses/by-sa/2.0/\u0027\u003eCC-BY-SA\u003c/a\u003e",
                    "crossOrigin": false,
                    "detectRetina": false,
                    "errorTileUrl": "",
                    "opacity": 1,
                    "subdomains": [
                      "a",
                      "b",
                      "c"
                    ],
                    "tileSize": {
                      "height": 256,
                      "width": 256
                    },
                    "tms": false,
                    "update": {
                      "interval": 200,
                      "whenIdle": false,
                      "whenZooming": true
                    },
                    "zIndex": 1,
                    "zoom": {
                      "max": 18,
                      "min": 0,
                      "native": {
                        "max": null,
                        "min": null
                      },
                      "offset": 0,
                      "reverse": false
                    }
                  },
                  "urlTemplateParams": {}
                }
              ]
            }
          },
          "location": {
            "enabled": true
          },
          "trackResize": true,
          "zoom": {
            "animation": {
              "enabled": false
            }
          }
        },
        "type": "ia.display.map"
      }
    ],
    "events": {
      "system": {
        "onStartup": {
          "config": {
            "script": "\t\n\tdef getMarker(lat,lng, siteName, eqPath):\n\t\treturn {\n\t\t  \"name\": siteName,\n\t\t  \"properties\": {},\n\t\t  \"enabled\": True,\n\t\t  \"lat\": float(lat),\n\t\t  \"lng\": float(lng),\n\t\t  \"opacity\": 1,\n\t\t  \"icon\": {\n\t\t    \"path\": \"material/apartment\",\n\t\t    \"color\": \"#29E307\",\n\t\t    \"size\": {\n\t\t      \"width\": 30,\n\t\t      \"height\": 30\n\t\t    },\n\t\t    \"style\": {\n\t\t      \"classes\": \"\"\n\t\t    }\n\t\t  },\n\t\t  \"event\": {\n\t\t    \"stopPropagation\": True\n\t\t  },\n\t\t  \"tooltip\": {\n\t\t    \"content\": {\n\t\t      \"text\": \"\",\n\t\t      \"view\": {\n\t\t        \"path\": \"\"\n\t\t      }\n\t\t    },\n\t\t    \"direction\": \"auto\",\n\t\t    \"permanent\": True,\n\t\t    \"sticky\": True,\n\t\t    \"opacity\": 1\n\t\t  },\n\t\t  \"popup\": {\n\t\t    \"enabled\": False,\n\t\t    \"content\": {\n\t\t      \"text\": \"\",\n\t\t      \"view\": {\n\t\t        \"path\": \"Page/Enterprise/SiteInfo\",\n\t\t        \"params\": {\n\t\t          \"eqPath\": eqPath\n\t\t        }\n\t\t      }\n\t\t    },\n\t\t    \"width\": {\n\t\t      \"max\": 900,\n\t\t      \"min\": 50\n\t\t    },\n\t\t    \"height\": {\n\t\t      \"max\": None\n\t\t    },\n\t\t    \"pan\": {\n\t\t      \"auto\": True\n\t\t    },\n\t\t    \"closeButton\": True,\n\t\t    \"autoClose\": True,\n\t\t    \"closeOnEscapeKey\": True,\n\t\t    \"closeOnClick\": None\n\t\t  }\n\t\t}\n\tmarkers \u003d []\n\tfilters \u003d system.mes.object.filter.createFilter()\n\tfilters.setMESObjectTypeName(\u0027Site\u0027)\n\tfilters.setEnableStateName(\u0027Enabled\u0027)\n\tsiteLinks \u003d system.mes.searchMESObjects(filters)\n\tfor site in siteLinks:\n\t\tsiteObj \u003d site.getMESObject()\n\t\t\n\t\tlat \u003d siteObj.getPropertyValue(\u0027lat\u0027)\n\t\tlng \u003d siteObj.getPropertyValue(\u0027lng\u0027)\n\t\tif not(lat or lng):\n\t\t\tlogger \u003d system.util.getLogger(\u0027Site Configuration\u0027)\n\t\t\tlogger.warn(siteObj.getName() +\u0027 lat or lng value is not configured\u0027)\n\t\t\tlat \u003d 0\n\t\t\tlng \u003d 0\n\t\tsiteName \u003d siteObj.getName()\n\t\teqPath \u003d siteObj.getEquipmentPath()\n\t\tmarkers.append(getMarker(lat,lng, siteName, eqPath))\n\t\n\tself.getChild(\"Map\").props.layers.ui.marker \u003d markers\n\t\n\tif len(markers) \u003d\u003d 1:\n\t\tself.getChild(\"Map\").props.init.center.lat \u003d lat\n\t\tself.getChild(\"Map\").props.init.center.lng \u003d lng\n\t\tself.getChild(\"Map\").props.init.zoom \u003d 5"
          },
          "scope": "G",
          "type": "script"
        }
      }
    },
    "meta": {
      "name": "root"
    },
    "position": {
      "x": -0.2948,
      "y": -0.3444
    },
    "props": {
      "mode": "percent"
    },
    "type": "ia.container.coord"
  }
}