{
  "widgetsBundle": {
    "alias": "maps",
    "title": "Maps",
    "image": null
  },
  "widgetTypes": [
    {
      "alias": "google_maps",
      "name": "Google Maps",
      "descriptor": {
        "type": "latest",
        "sizeX": 8.5,
        "sizeY": 6,
        "resources": [],
        "templateHtml": "",
        "templateCss": ".error {\n    color: red;\n}\n.tb-labels {\n  color: #222;\n  font: 12px/1.5 \"Helvetica Neue\", Arial, Helvetica, sans-serif;\n  text-align: center;\n  width: 100px;\n  white-space: nowrap;\n}",
        "controllerScript": "self.onInit = function() {\n    self.ctx.map = new TbMapWidget('google-map', false, self.ctx);\n}\n\nself.onDataUpdated = function() {\n    self.ctx.map.update();\n}\n\nself.onResize = function() {\n    self.ctx.map.resize();\n}\n\nself.onDestroy = function() {\n}\n",
        "settingsSchema": "{\n  \"schema\": {\n    \"title\": \"Google Map Configuration\",\n    \"type\": \"object\",\n    \"properties\": {\n      \"gmApiKey\": {\n        \"title\": \"Google Maps API Key\",\n        \"type\": \"string\"\n      },\n      \"gmDefaultMapType\": {\n          \"title\": \"Default map type\",\n          \"type\": \"string\",\n          \"default\": \"roadmap\"\n      },\n      \"defaultZoomLevel\": {\n         \"title\": \"Default map zoom level (1 - 20)\",\n         \"type\": \"number\"\n      },\n      \"fitMapBounds\": {\n          \"title\": \"Fit map bounds to cover all markers\",\n          \"type\": \"boolean\",\n          \"default\": true\n      },\n      \"markersSettings\": {\n            \"title\": \"Markers\",\n            \"type\": \"array\",\n            \"items\": {\n              \"title\": \"Marker settings\",\n              \"type\": \"object\",\n              \"properties\": {\n                  \"latKeyName\": {\n                    \"title\": \"Latitude key name\",\n                    \"type\": \"string\",\n                    \"default\": \"lat\"\n                  },\n                  \"lngKeyName\": {\n                    \"title\": \"Longitude key name\",\n                    \"type\": \"string\",\n                    \"default\": \"lng\"\n                  },                  \n                  \"showLabel\": {\n                    \"title\": \"Show label\",\n                    \"type\": \"boolean\",\n                    \"default\": true\n                  },                  \n                  \"label\": {\n                    \"title\": \"Label\",\n                    \"type\": \"string\"\n                  },\n                  \"tooltipPattern\": {\n                    \"title\": \"Pattern ( for ex. 'Text ${keyName} units.' or '${#<key index>} units'  )\",\n                    \"type\": \"string\",\n                    \"default\": \"<b>Latitude:</b> ${lat:7}<br/><b>Longitude:</b> ${lng:7}\"\n                  },\n                  \"color\": {\n                    \"title\": \"Color\",\n                    \"type\": \"string\"\n                  },\n                  \"useColorFunction\": {\n                    \"title\": \"Use color function\",\n                    \"type\": \"boolean\",\n                    \"default\": false\n                  },\n                  \"colorFunction\": {\n                    \"title\": \"Color function: f(data)\",\n                    \"type\": \"string\"\n                  },\n                  \"markerImage\": {\n                    \"title\": \"Custom marker image\",\n                    \"type\": \"string\"\n                  },\n                  \"markerImageSize\": {\n                     \"title\": \"Custom marker image size (px)\",\n                     \"type\": \"number\",\n                     \"default\": 34\n                  },\n                  \"useMarkerImageFunction\": {\n                    \"title\": \"Use marker image function\",\n                    \"type\": \"boolean\",\n                    \"default\": false\n                  },\n                  \"markerImageFunction\": {\n                    \"title\": \"Marker image function: f(data, images)\",\n                    \"type\": \"string\"\n                  },\n                  \"markerImages\": {\n                        \"title\": \"Marker images\",\n                        \"type\": \"array\",\n                        \"items\": {\n                          \"title\": \"Marker image\",\n                          \"type\": \"string\"\n                        }\n                  }\n              }\n            }\n      }\n    },\n    \"required\": [\n      \"gmApiKey\"\n    ]\n  },\n  \"form\": [\n    \"gmApiKey\",\n    {\n        \"key\": \"gmDefaultMapType\",\n        \"type\": \"rc-select\",\n        \"multiple\": false,\n        \"items\": [\n            {\n                \"value\": \"roadmap\",\n                \"label\": \"Roadmap\"\n            },\n            {\n                \"value\": \"satellite\",\n                \"label\": \"Satellite\"\n            },\n            {\n                \"value\": \"hybrid\",\n                \"label\": \"Hybrid\"\n            },\n            {\n                \"value\": \"terrain\",\n                \"label\": \"Terrain\"\n            }\n        ]\n    },\n    \"defaultZoomLevel\",\n    \"fitMapBounds\",\n    {\n        \"key\": \"markersSettings\",\n        \"items\": [\n            \"markersSettings[].latKeyName\",\n            \"markersSettings[].lngKeyName\",\n            \"markersSettings[].showLabel\",\n            \"markersSettings[].label\",\n            \"markersSettings[].tooltipPattern\",\n            {\n                \"key\": \"markersSettings[].color\",\n                \"type\": \"color\"\n            },\n            \"markersSettings[].useColorFunction\",\n            {\n                \"key\": \"markersSettings[].colorFunction\",\n                \"type\": \"javascript\"\n            },\n            {\n                \"key\": \"markersSettings[].markerImage\",\n                \"type\": \"image\"\n            },\n            \"markersSettings[].markerImageSize\",\n            \"markersSettings[].useMarkerImageFunction\",\n            {\n                \"key\": \"markersSettings[].markerImageFunction\",\n                \"type\": \"javascript\"\n            },\n            {\n                \"key\": \"markersSettings[].markerImages\",\n                \"items\": [\n                    {\n                        \"key\": \"markersSettings[].markerImages[]\",\n                        \"type\": \"image\"\n                    }\n                ]\n            }\n        ]\n    }\n  ]\n}",
        "dataKeySettingsSchema": "{}\n",
        "defaultConfig": "{\"datasources\":[{\"type\":\"function\",\"name\":\"function\",\"dataKeys\":[{\"name\":\"f(x)\",\"type\":\"function\",\"label\":\"latitude\",\"color\":\"#2196f3\",\"settings\":{},\"_hash\":0.05427416942713381,\"funcBody\":\"var value = prevValue || 15.833293;\\nif (time % 5000 < 500) {\\n    value += Math.random() * 0.05 - 0.025;\\n}\\nreturn value;\"},{\"name\":\"f(x)\",\"type\":\"function\",\"label\":\"longitude\",\"color\":\"#4caf50\",\"settings\":{},\"_hash\":0.680594833308841,\"funcBody\":\"var value = prevValue || -90.454350;\\nif (time % 5000 < 500) {\\n    value += Math.random() * 0.05 - 0.025;\\n}\\nreturn value;\"}]},{\"type\":\"function\",\"name\":\"function\",\"dataKeys\":[{\"name\":\"f(x)\",\"type\":\"function\",\"label\":\"lat\",\"color\":\"#f44336\",\"settings\":{},\"_hash\":0.05012157428742059,\"funcBody\":\"var value = prevValue || 14.450463;\\nif (time % 4000 < 500) {\\n    value += Math.random() * 0.05 - 0.025;\\n}\\nreturn value;\"},{\"name\":\"f(x)\",\"type\":\"function\",\"label\":\"lng\",\"color\":\"#ffc107\",\"settings\":{},\"_hash\":0.6742359401617628,\"funcBody\":\"var value = prevValue || -84.845334;\\nif (time % 4000 < 500) {\\n    value += Math.random() * 0.05 - 0.025;\\n}\\nreturn value;\"}]},{\"type\":\"function\",\"name\":\"function\",\"dataKeys\":[{\"name\":\"f(x)\",\"type\":\"function\",\"label\":\"temperature\",\"color\":\"#607d8b\",\"settings\":{},\"_hash\":0.799863043034289,\"funcBody\":\"var value = prevValue + Math.random() * 40 - 20;\\nif (value < -60) {\\n\\tvalue = -60;\\n} else if (value > 60) {\\n\\tvalue = 60;\\n}\\nreturn value;\"}]}],\"timewindow\":{\"realtime\":{\"timewindowMs\":60000}},\"showTitle\":true,\"backgroundColor\":\"#fff\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"padding\":\"8px\",\"settings\":{\"gmApiKey\":\"AIzaSyDoEx2kaGz3PxwbI9T7ccTSg5xjdw8Nw8Q\",\"markersSettings\":[{\"label\":\"First point\",\"color\":\"#1e88e5\",\"latKeyName\":\"latitude\",\"lngKeyName\":\"longitude\",\"showLabel\":true,\"tooltipPattern\":\"<b>Latitude:</b> ${latitude:7}<br/><b>Longitude:</b> ${longitude:7}<br/><b>Temperature:</b> ${temperature} °C<br/><small>See advanced settings for details</small>\",\"useColorFunction\":true,\"colorFunction\":\"var temperature = data['temperature'];\\nif (typeof temperature !== undefined) {\\n    var percent = (temperature + 60)/120 * 100;\\n    return tinycolor.mix('blue', 'red', amount = percent).toHexString();\\n}\\nreturn 'blue';\",\"markerImages\":[],\"useMarkerImageFunction\":false},{\"label\":\"Second point\",\"color\":\"#fdd835\",\"latKeyName\":\"lat\",\"lngKeyName\":\"lng\",\"showLabel\":true,\"tooltipPattern\":\"<b>Latitude:</b> ${lat:7}<br/><b>Longitude:</b> ${lng:7}<br/><b>Temperature:</b> ${temperature} °C<br/><small>See advanced settings for details</small>\",\"markerImageSize\":34,\"markerImages\":[\"data:image/png;base64,[encoded data, 4316 characters]\",\"data:image/png;base64,[encoded data, 4932 characters]\",\"data:image/png;base64,[encoded data, 4468 characters]\",\"data:image/png;base64,[encoded data, 4376 characters]\"],\"useMarkerImageFunction\":true,\"markerImageFunction\":\"var res = {\\n    url: images[0],\\n    size: 40\\n}\\nvar temperature = data['temperature'];\\nif (typeof temperature !== undefined) {\\n    var percent = (temperature + 60)/120;\\n    var index = Math.floor(4 * percent);\\n    res.url = images[index];\\n}\\nreturn res;\",\"useColorFunction\":false}],\"fitMapBounds\":true,\"gmDefaultMapType\":\"roadmap\"},\"title\":\"Google Maps\",\"dropShadow\":true,\"enableFullscreen\":true,\"titleStyle\":{\"fontSize\":\"16px\",\"fontWeight\":400},\"useDashboardTimewindow\":true,\"showLegend\":false}"
      }
    },
    {
      "alias": "openstreetmap",
      "name": "OpenStreetMap",
      "descriptor": {
        "type": "latest",
        "sizeX": 8.5,
        "sizeY": 6,
        "resources": [],
        "templateHtml": "",
        "templateCss": ".leaflet-zoom-box {\n\tz-index: 9;\n}\n\n.leaflet-pane         { z-index: 4; }\n\n.leaflet-tile-pane    { z-index: 2; }\n.leaflet-overlay-pane { z-index: 4; }\n.leaflet-shadow-pane  { z-index: 5; }\n.leaflet-marker-pane  { z-index: 6; }\n.leaflet-tooltip-pane   { z-index: 7; }\n.leaflet-popup-pane   { z-index: 8; }\n\n.leaflet-map-pane canvas { z-index: 1; }\n.leaflet-map-pane svg    { z-index: 2; }\n\n.leaflet-control {\n\tz-index: 9;\n}\n.leaflet-top,\n.leaflet-bottom {\n\tz-index: 11;\n}\n\n.tb-marker-label {\n    border: none;\n    background: none;\n    box-shadow: none;\n}\n\n.tb-marker-label:before {\n    border: none;\n    background: none;\n}\n",
        "controllerScript": "self.onInit = function() {\n    self.ctx.map = new TbMapWidget('openstreet-map', false, self.ctx);\n}\n\nself.onDataUpdated = function() {\n    self.ctx.map.update();\n}\n\nself.onResize = function() {\n    self.ctx.map.resize();\n}\n\nself.onDestroy = function() {\n}\n",
        "settingsSchema": "{\n  \"schema\": {\n    \"title\": \"Google Map Configuration\",\n    \"type\": \"object\",\n    \"properties\": {\n      \"defaultZoomLevel\": {\n         \"title\": \"Default map zoom level (1 - 20)\",\n         \"type\": \"number\"\n      },\n      \"fitMapBounds\": {\n          \"title\": \"Fit map bounds to cover all markers\",\n          \"type\": \"boolean\",\n          \"default\": true\n      },\n      \"markersSettings\": {\n            \"title\": \"Markers\",\n            \"type\": \"array\",\n            \"items\": {\n              \"title\": \"Marker settings\",\n              \"type\": \"object\",\n              \"properties\": {\n                  \"latKeyName\": {\n                    \"title\": \"Latitude key name\",\n                    \"type\": \"string\",\n                    \"default\": \"lat\"\n                  },\n                  \"lngKeyName\": {\n                    \"title\": \"Longitude key name\",\n                    \"type\": \"string\",\n                    \"default\": \"lng\"\n                  },                  \n                  \"showLabel\": {\n                    \"title\": \"Show label\",\n                    \"type\": \"boolean\",\n                    \"default\": true\n                  },                  \n                  \"label\": {\n                    \"title\": \"Label\",\n                    \"type\": \"string\"\n                  },\n                  \"tooltipPattern\": {\n                    \"title\": \"Pattern ( for ex. 'Text ${keyName} units.' or '${#<key index>} units'  )\",\n                    \"type\": \"string\",\n                    \"default\": \"<b>Latitude:</b> ${lat:7}<br/><b>Longitude:</b> ${lng:7}\"\n                  },\n                  \"color\": {\n                    \"title\": \"Color\",\n                    \"type\": \"string\"\n                  },\n                  \"useColorFunction\": {\n                    \"title\": \"Use color function\",\n                    \"type\": \"boolean\",\n                    \"default\": false\n                  },\n                  \"colorFunction\": {\n                    \"title\": \"Color function: f(data)\",\n                    \"type\": \"string\"\n                  },\n                  \"markerImage\": {\n                    \"title\": \"Custom marker image\",\n                    \"type\": \"string\"\n                  },\n                  \"markerImageSize\": {\n                    \"title\": \"Custom marker image size (px)\",\n                    \"type\": \"number\",\n                    \"default\": 34\n                  },\n                  \"useMarkerImageFunction\": {\n                    \"title\": \"Use marker image function\",\n                    \"type\": \"boolean\",\n                    \"default\": false\n                  },\n                  \"markerImageFunction\": {\n                    \"title\": \"Marker image function: f(data, images)\",\n                    \"type\": \"string\"\n                  },\n                  \"markerImages\": {\n                        \"title\": \"Marker images\",\n                        \"type\": \"array\",\n                        \"items\": {\n                          \"title\": \"Marker image\",\n                          \"type\": \"string\"\n                        }\n                  }\n              }\n           }\n       }\n    },\n    \"required\": [\n    ]\n  },\n  \"form\": [\n    \"defaultZoomLevel\",\n    \"fitMapBounds\",\n    {\n        \"key\": \"markersSettings\",\n        \"items\": [\n            \"markersSettings[].latKeyName\",\n            \"markersSettings[].lngKeyName\",\n            \"markersSettings[].showLabel\",\n            \"markersSettings[].label\",\n            \"markersSettings[].tooltipPattern\",\n            {\n                \"key\": \"markersSettings[].color\",\n                \"type\": \"color\"\n            },\n            \"markersSettings[].useColorFunction\",\n            {\n                \"key\": \"markersSettings[].colorFunction\",\n                \"type\": \"javascript\"\n            },\n            {\n                \"key\": \"markersSettings[].markerImage\",\n                \"type\": \"image\"\n            },\n            \"markersSettings[].markerImageSize\",\n            \"markersSettings[].useMarkerImageFunction\",\n            {\n                \"key\": \"markersSettings[].markerImageFunction\",\n                \"type\": \"javascript\"\n            },\n            {\n                \"key\": \"markersSettings[].markerImages\",\n                \"items\": [\n                    {\n                        \"key\": \"markersSettings[].markerImages[]\",\n                        \"type\": \"image\"\n                    }\n                ]\n            }\n        ]\n    }\n  ]\n}",
        "dataKeySettingsSchema": "{}\n",
        "defaultConfig": "{\"datasources\":[{\"type\":\"function\",\"name\":\"function\",\"dataKeys\":[{\"name\":\"f(x)\",\"type\":\"function\",\"label\":\"latitude\",\"color\":\"#2196f3\",\"settings\":{},\"_hash\":0.05427416942713381,\"funcBody\":\"var value = prevValue || 15.833293;\\nif (time % 5000 < 500) {\\n    value += Math.random() * 0.05 - 0.025;\\n}\\nreturn value;\"},{\"name\":\"f(x)\",\"type\":\"function\",\"label\":\"longitude\",\"color\":\"#4caf50\",\"settings\":{},\"_hash\":0.680594833308841,\"funcBody\":\"var value = prevValue || -90.454350;\\nif (time % 5000 < 500) {\\n    value += Math.random() * 0.05 - 0.025;\\n}\\nreturn value;\"}]},{\"type\":\"function\",\"name\":\"function\",\"dataKeys\":[{\"name\":\"f(x)\",\"type\":\"function\",\"label\":\"lat\",\"color\":\"#f44336\",\"settings\":{},\"_hash\":0.05012157428742059,\"funcBody\":\"var value = prevValue || 14.450463;\\nif (time % 4000 < 500) {\\n    value += Math.random() * 0.05 - 0.025;\\n}\\nreturn value;\"},{\"name\":\"f(x)\",\"type\":\"function\",\"label\":\"lng\",\"color\":\"#ffc107\",\"settings\":{},\"_hash\":0.6742359401617628,\"funcBody\":\"var value = prevValue || -84.845334;\\nif (time % 4000 < 500) {\\n    value += Math.random() * 0.05 - 0.025;\\n}\\nreturn value;\"}]},{\"type\":\"function\",\"name\":\"function\",\"dataKeys\":[{\"name\":\"f(x)\",\"type\":\"function\",\"label\":\"temperature\",\"color\":\"#607d8b\",\"settings\":{},\"_hash\":0.21553274887887564,\"funcBody\":\"var value = prevValue + Math.random() * 40 - 20;\\nif (value < -60) {\\n\\tvalue = -60;\\n} else if (value > 60) {\\n\\tvalue = 60;\\n}\\nreturn value;\"}]}],\"timewindow\":{\"realtime\":{\"timewindowMs\":60000}},\"showTitle\":true,\"backgroundColor\":\"#fff\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"padding\":\"8px\",\"settings\":{\"markersSettings\":[{\"label\":\"First point\",\"color\":\"#1e88e5\",\"latKeyName\":\"latitude\",\"lngKeyName\":\"longitude\",\"showLabel\":true,\"tooltipPattern\":\"<b>Latitude:</b> ${latitude:7}<br/><b>Longitude:</b> ${longitude:7}<br/><b>Temperature:</b> ${temperature} °C<br/><small>See advanced settings for details</small>\",\"useColorFunction\":true,\"colorFunction\":\"var temperature = data['temperature'];\\nif (typeof temperature !== undefined) {\\n    var percent = (temperature + 60)/120 * 100;\\n    return tinycolor.mix('blue', 'red', amount = percent).toHexString();\\n}\\nreturn 'blue';\"},{\"label\":\"Second point\",\"color\":\"#fdd835\",\"latKeyName\":\"lat\",\"lngKeyName\":\"lng\",\"showLabel\":true,\"tooltipPattern\":\"<b>Latitude:</b> ${lat:7}<br/><b>Longitude:</b> ${lng:7}<br/><b>Temperature:</b> ${temperature} °C<br/><small>See advanced settings for details</small>\",\"markerImageSize\":34,\"useMarkerImageFunction\":true,\"markerImages\":[\"data:image/svg+xml;base64,[encoded data, 122396 characters]\",\"data:image/svg+xml;base64,[encoded data, 106388 characters]\",\"data:image/svg+xml;base64,[encoded data, 115312 characters]\",\"data:image/svg+xml;base64,[encoded data, 122860 characters]\"],\"markerImageFunction\":\"var res = {\\n    url: images[0],\\n    size: 40\\n}\\nvar temperature = data['temperature'];\\nif (typeof temperature !== undefined) {\\n    var percent = (temperature + 60)/120;\\n    var index = Math.floor(4 * percent);\\n    res.url = images[index];\\n}\\nreturn res;\"}],\"fitMapBounds\":true},\"title\":\"OpenStreetMap\"}"
      }
    },
    {
      "alias": "route_map",
      "name": "Route Map",
      "descriptor": {
        "type": "timeseries",
        "sizeX": 8.5,
        "sizeY": 6,
        "resources": [],
        "templateHtml": "",
        "templateCss": ".error {\n    color: red;\n}\n.tb-labels {\n  color: #222;\n  font: 12px/1.5 \"Helvetica Neue\", Arial, Helvetica, sans-serif;\n  text-align: center;\n  width: 100px;\n  white-space: nowrap;\n}",
        "controllerScript": "self.onInit = function() {\n    self.ctx.map = new TbMapWidget('google-map', true, self.ctx);\n}\n\nself.onDataUpdated = function() {\n    self.ctx.map.update();\n}\n\nself.onResize = function() {\n    self.ctx.map.resize();\n}\n\nself.onDestroy = function() {\n}\n",
        "settingsSchema": "{\n  \"schema\": {\n    \"title\": \"Route Map Configuration\",\n    \"type\": \"object\",\n    \"properties\": {\n      \"gmApiKey\": {\n        \"title\": \"Google Maps API Key\",\n        \"type\": \"string\"\n      },\n      \"gmDefaultMapType\": {\n          \"title\": \"Default map type\",\n          \"type\": \"string\",\n          \"default\": \"roadmap\"\n      },\n      \"defaultZoomLevel\": {\n         \"title\": \"Default map zoom level (1 - 20)\",\n         \"type\": \"number\"\n      },\n      \"fitMapBounds\": {\n          \"title\": \"Fit map bounds to cover all routes\",\n          \"type\": \"boolean\",\n          \"default\": true\n      },\n      \"routesSettings\": {\n            \"title\": \"Routes\",\n            \"type\": \"array\",\n            \"items\": {\n              \"title\": \"Route settings\",\n              \"type\": \"object\",\n              \"properties\": {\n                  \"latKeyName\": {\n                    \"title\": \"Latitude key name\",\n                    \"type\": \"string\",\n                    \"default\": \"lat\"\n                  },\n                  \"lngKeyName\": {\n                    \"title\": \"Longitude key name\",\n                    \"type\": \"string\",\n                    \"default\": \"lng\"\n                  },\n                  \"showLabel\": {\n                    \"title\": \"Show label\",\n                    \"type\": \"boolean\",\n                    \"default\": true\n                  },                  \n                  \"label\": {\n                    \"title\": \"Label\",\n                    \"type\": \"string\"\n                  },\n                  \"tooltipPattern\": {\n                    \"title\": \"Pattern ( for ex. 'Text ${keyName} units.' or '${#<key index>} units'  )\",\n                    \"type\": \"string\",\n                    \"default\": \"<b>Latitude:</b> ${lat:7}<br/><b>Longitude:</b> ${lng:7}\"\n                  },\n                  \"color\": {\n                    \"title\": \"Color\",\n                    \"type\": \"string\"\n                  },\n                  \"useColorFunction\": {\n                    \"title\": \"Use color function\",\n                    \"type\": \"boolean\",\n                    \"default\": false\n                  },\n                  \"colorFunction\": {\n                    \"title\": \"Color function: f(data)\",\n                    \"type\": \"string\"\n                  },\n                  \"markerImage\": {\n                    \"title\": \"Custom marker image\",\n                    \"type\": \"string\"\n                  },\n                  \"markerImageSize\": {\n                     \"title\": \"Custom marker image size (px)\",\n                     \"type\": \"number\",\n                     \"default\": 34\n                  },\n                  \"useMarkerImageFunction\": {\n                    \"title\": \"Use marker image function\",\n                    \"type\": \"boolean\",\n                    \"default\": false\n                  },\n                  \"markerImageFunction\": {\n                    \"title\": \"Marker image function: f(data, images)\",\n                    \"type\": \"string\"\n                  },\n                  \"markerImages\": {\n                        \"title\": \"Marker images\",\n                        \"type\": \"array\",\n                        \"items\": {\n                          \"title\": \"Marker image\",\n                          \"type\": \"string\"\n                        }\n                  },\n                  \"strokeWeight\": {\n                    \"title\": \"Stroke weight\",\n                    \"type\": \"number\",\n                    \"default\": 2\n                  },\n                  \"strokeOpacity\": {\n                    \"title\": \"Stroke opacity\",\n                    \"type\": \"number\",\n                    \"default\": 1.0\n                  }\n              }\n            }\n      }\n    },\n    \"required\": [\n      \"gmApiKey\"\n    ]\n  },\n  \"form\": [\n    \"gmApiKey\",\n    {\n        \"key\": \"gmDefaultMapType\",\n        \"type\": \"rc-select\",\n        \"multiple\": false,\n        \"items\": [\n            {\n                \"value\": \"roadmap\",\n                \"label\": \"Roadmap\"\n            },\n            {\n                \"value\": \"satellite\",\n                \"label\": \"Satellite\"\n            },\n            {\n                \"value\": \"hybrid\",\n                \"label\": \"Hybrid\"\n            },\n            {\n                \"value\": \"terrain\",\n                \"label\": \"Terrain\"\n            }\n        ]\n    },    \n    \"defaultZoomLevel\",\n    \"fitMapBounds\",\n    {\n        \"key\": \"routesSettings\",\n        \"items\": [\n            \"routesSettings[].latKeyName\",\n            \"routesSettings[].lngKeyName\",\n            \"routesSettings[].showLabel\",\n            \"routesSettings[].label\",\n            \"routesSettings[].tooltipPattern\",\n            {\n                \"key\": \"routesSettings[].color\",\n                \"type\": \"color\"\n            },\n            \"routesSettings[].useColorFunction\",\n            {\n                \"key\": \"routesSettings[].colorFunction\",\n                \"type\": \"javascript\"\n            },\n            {\n                \"key\": \"routesSettings[].markerImage\",\n                \"type\": \"image\"\n            },\n            \"routesSettings[].markerImageSize\",\n            \"routesSettings[].useMarkerImageFunction\",\n            {\n                \"key\": \"routesSettings[].markerImageFunction\",\n                \"type\": \"javascript\"\n            },\n            {\n                \"key\": \"routesSettings[].markerImages\",\n                \"items\": [\n                    {\n                        \"key\": \"routesSettings[].markerImages[]\",\n                        \"type\": \"image\"\n                    }\n                ]\n            },\n            \"routesSettings[].strokeWeight\",\n            \"routesSettings[].strokeOpacity\"\n        ]\n    }\n  ]\n}",
        "dataKeySettingsSchema": "{}\n",
        "defaultConfig": "{\"datasources\":[{\"type\":\"function\",\"name\":\"function\",\"dataKeys\":[{\"name\":\"f(x)\",\"type\":\"function\",\"label\":\"latitude\",\"color\":\"#2196f3\",\"settings\":{},\"_hash\":0.3467277073670627,\"funcBody\":\"var lats = [37.7696499,\\n37.7699074,\\n37.7699536,\\n37.7697242,\\n37.7695189,\\n37.7696889,\\n37.7697153,\\n37.7701244,\\n37.7700604,\\n37.7705491,\\n37.7715705,\\n37.771752,\\n37.7707533,\\n37.769866];\\n\\nvar i = Math.floor((time/3 % 14000) / 1000);\\n\\nreturn lats[i];\"},{\"name\":\"f(x)\",\"type\":\"function\",\"label\":\"longitude\",\"color\":\"#4caf50\",\"settings\":{},\"_hash\":0.058309787276281666,\"funcBody\":\"var lons = [-122.4261215,\\n-122.4219157,\\n-122.4199623,\\n-122.4179074,\\n-122.4155876,\\n-122.4155521,\\n-122.4163203,\\n-122.4193876,\\n-122.4210496,\\n-122.422284,\\n-122.4232717,\\n-122.4235138,\\n-122.4247605,\\n-122.4258812];\\n\\nvar i = Math.floor((time/3 % 14000) / 1000);\\n\\nreturn lons[i];\"}],\"intervalSec\":60},{\"type\":\"function\",\"name\":\"function\",\"dataKeys\":[{\"name\":\"f(x)\",\"type\":\"function\",\"label\":\"Speed\",\"color\":\"#f44336\",\"settings\":{},\"_hash\":0.14288960550237473,\"funcBody\":\"var value = prevValue;\\nif (time % 500 < 100) {\\n    value = value + Math.random() * 40 - 20;\\n    if (value < 45) {\\n    \\tvalue = 45;\\n    } else if (value > 130) {\\n    \\tvalue = 130;\\n    }\\n}\\nreturn value;\"}]}],\"timewindow\":{\"realtime\":{\"timewindowMs\":30000}},\"showTitle\":true,\"backgroundColor\":\"#fff\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"padding\":\"8px\",\"settings\":{\"gmApiKey\":\"AIzaSyDoEx2kaGz3PxwbI9T7ccTSg5xjdw8Nw8Q\",\"fitMapBounds\":true,\"routesSettings\":[{\"latKeyName\":\"latitude\",\"lngKeyName\":\"longitude\",\"showLabel\":true,\"color\":\"#1976d2\",\"strokeWeight\":4,\"strokeOpacity\":0.65,\"label\":\"First route\",\"tooltipPattern\":\"<b>Latitude:</b> ${latitude:7}<br/><b>Longitude:</b> ${longitude:7}<br/><b>Speed:</b> ${Speed} MPH<br/><small>See advanced settings for details</small>\",\"useColorFunction\":true,\"markerImageSize\":34,\"useMarkerImageFunction\":true,\"markerImageFunction\":\"var speed = data['Speed'];\\nvar res = {\\n    url: images[0],\\n    size: 55\\n};\\nif (typeof speed !== undefined) {\\n    var percent = (speed - 45)/85;\\n    var index = Math.floor(3 * percent);\\n    res.url = images[index];\\n}\\nreturn res;\",\"markerImages\":[\"data:image/png;base64,[encoded data, 17264 characters]\",\"data:image/png;base64,[encoded data, 16628 characters]\",\"data:image/png;base64,[encoded data, 17120 characters]\"],\"colorFunction\":\"var speed = data['Speed'];\\nif (typeof speed !== undefined) {\\n    var percent = (speed - 45)/85;\\n    if (percent < 0.5) {\\n        percent *=2*100; \\n        return tinycolor.mix('green', 'yellow', amount = percent).toHexString();\\n    } else {\\n        percent = (percent - 0.5)*2*100;\\n        return tinycolor.mix('yellow', 'red', amount = percent).toHexString();\\n    }\\n}\\nreturn 'green';\"}]},\"title\":\"Route Map\",\"dropShadow\":true,\"enableFullscreen\":true,\"titleStyle\":{\"fontSize\":\"16px\",\"fontWeight\":400},\"useDashboardTimewindow\":true,\"showLegend\":false}"
      }
    },
    {
      "alias": "route_map_openstreetmap",
      "name": "Route Map - OpenStreetMap",
      "descriptor": {
        "type": "timeseries",
        "sizeX": 8.5,
        "sizeY": 6,
        "resources": [],
        "templateHtml": "",
        "templateCss": ".leaflet-zoom-box {\n\tz-index: 9;\n}\n\n.leaflet-pane         { z-index: 4; }\n\n.leaflet-tile-pane    { z-index: 2; }\n.leaflet-overlay-pane { z-index: 4; }\n.leaflet-shadow-pane  { z-index: 5; }\n.leaflet-marker-pane  { z-index: 6; }\n.leaflet-tooltip-pane   { z-index: 7; }\n.leaflet-popup-pane   { z-index: 8; }\n\n.leaflet-map-pane canvas { z-index: 1; }\n.leaflet-map-pane svg    { z-index: 2; }\n\n.leaflet-control {\n\tz-index: 9;\n}\n.leaflet-top,\n.leaflet-bottom {\n\tz-index: 11;\n}\n\n.tb-marker-label {\n    border: none;\n    background: none;\n    box-shadow: none;\n}\n\n.tb-marker-label:before {\n    border: none;\n    background: none;\n}\n",
        "controllerScript": "self.onInit = function() {\n    self.ctx.map = new TbMapWidget('openstreet-map', true, self.ctx);\n}\n\nself.onDataUpdated = function() {\n    self.ctx.map.update();\n}\n\nself.onResize = function() {\n    self.ctx.map.resize();\n}\n\nself.onDestroy = function() {\n}\n",
        "settingsSchema": "{\n  \"schema\": {\n    \"title\": \"Route Map Configuration\",\n    \"type\": \"object\",\n    \"properties\": {\n      \"defaultZoomLevel\": {\n         \"title\": \"Default map zoom level (1 - 20)\",\n         \"type\": \"number\"\n      },\n      \"fitMapBounds\": {\n          \"title\": \"Fit map bounds to cover all markers\",\n          \"type\": \"boolean\",\n          \"default\": true\n      },\n      \"routesSettings\": {\n            \"title\": \"Routes\",\n            \"type\": \"array\",\n            \"items\": {\n              \"title\": \"Route settings\",\n              \"type\": \"object\",\n              \"properties\": {\n                  \"latKeyName\": {\n                    \"title\": \"Latitude key name\",\n                    \"type\": \"string\",\n                    \"default\": \"lat\"\n                  },\n                  \"lngKeyName\": {\n                    \"title\": \"Longitude key name\",\n                    \"type\": \"string\",\n                    \"default\": \"lng\"\n                  },\n                  \"showLabel\": {\n                    \"title\": \"Show label\",\n                    \"type\": \"boolean\",\n                    \"default\": true\n                  },                  \n                  \"label\": {\n                    \"title\": \"Label\",\n                    \"type\": \"string\"\n                  },\n                  \"tooltipPattern\": {\n                    \"title\": \"Pattern ( for ex. 'Text ${keyName} units.' or '${#<key index>} units'  )\",\n                    \"type\": \"string\",\n                    \"default\": \"<b>Latitude:</b> ${lat:7}<br/><b>Longitude:</b> ${lng:7}\"\n                  },\n                  \"color\": {\n                    \"title\": \"Color\",\n                    \"type\": \"string\"\n                  },\n                  \"useColorFunction\": {\n                    \"title\": \"Use color function\",\n                    \"type\": \"boolean\",\n                    \"default\": false\n                  },\n                  \"colorFunction\": {\n                    \"title\": \"Color function: f(data)\",\n                    \"type\": \"string\"\n                  },\n                  \"markerImage\": {\n                    \"title\": \"Custom marker image\",\n                    \"type\": \"string\"\n                  },\n                  \"markerImageSize\": {\n                     \"title\": \"Custom marker image size (px)\",\n                     \"type\": \"number\",\n                     \"default\": 34\n                  },\n                  \"useMarkerImageFunction\": {\n                    \"title\": \"Use marker image function\",\n                    \"type\": \"boolean\",\n                    \"default\": false\n                  },\n                  \"markerImageFunction\": {\n                    \"title\": \"Marker image function: f(data, images)\",\n                    \"type\": \"string\"\n                  },\n                  \"markerImages\": {\n                        \"title\": \"Marker images\",\n                        \"type\": \"array\",\n                        \"items\": {\n                          \"title\": \"Marker image\",\n                          \"type\": \"string\"\n                        }\n                  },\n                  \"strokeWeight\": {\n                    \"title\": \"Stroke weight\",\n                    \"type\": \"number\",\n                    \"default\": 2\n                  },\n                  \"strokeOpacity\": {\n                    \"title\": \"Stroke opacity\",\n                    \"type\": \"number\",\n                    \"default\": 1.0\n                  }\n              }\n            }\n      }\n    },\n    \"required\": [\n    ]\n  },\n  \"form\": [\n    \"defaultZoomLevel\",\n    \"fitMapBounds\",\n    {\n        \"key\": \"routesSettings\",\n        \"items\": [\n            \"routesSettings[].latKeyName\",\n            \"routesSettings[].lngKeyName\",\n            \"routesSettings[].showLabel\",\n            \"routesSettings[].label\",\n            \"routesSettings[].tooltipPattern\",\n            {\n                \"key\": \"routesSettings[].color\",\n                \"type\": \"color\"\n            },\n            \"routesSettings[].useColorFunction\",\n            {\n                \"key\": \"routesSettings[].colorFunction\",\n                \"type\": \"javascript\"\n            },\n            {\n                \"key\": \"routesSettings[].markerImage\",\n                \"type\": \"image\"\n            },\n            \"routesSettings[].markerImageSize\",\n            \"routesSettings[].useMarkerImageFunction\",\n            {\n                \"key\": \"routesSettings[].markerImageFunction\",\n                \"type\": \"javascript\"\n            },\n            {\n                \"key\": \"routesSettings[].markerImages\",\n                \"items\": [\n                    {\n                        \"key\": \"routesSettings[].markerImages[]\",\n                        \"type\": \"image\"\n                    }\n                ]\n            },\n            \"routesSettings[].strokeWeight\",\n            \"routesSettings[].strokeOpacity\"\n        ]\n    }\n  ]\n}",
        "dataKeySettingsSchema": "{}\n",
        "defaultConfig": "{\"datasources\":[{\"type\":\"function\",\"name\":\"function\",\"dataKeys\":[{\"name\":\"f(x)\",\"type\":\"function\",\"label\":\"latitude\",\"color\":\"#2196f3\",\"settings\":{},\"_hash\":0.8950926999078694,\"funcBody\":\"var lats = [37.7696499,\\n37.7699074,\\n37.7699536,\\n37.7697242,\\n37.7695189,\\n37.7696889,\\n37.7697153,\\n37.7701244,\\n37.7700604,\\n37.7705491,\\n37.7715705,\\n37.771752,\\n37.7707533,\\n37.769866];\\n\\nvar i = Math.floor((time/3 % 14000) / 1000);\\n\\nreturn lats[i];\"},{\"name\":\"f(x)\",\"type\":\"function\",\"label\":\"longitude\",\"color\":\"#4caf50\",\"settings\":{},\"_hash\":0.2757675428823283,\"funcBody\":\"var lons = [-122.4261215,\\n-122.4219157,\\n-122.4199623,\\n-122.4179074,\\n-122.4155876,\\n-122.4155521,\\n-122.4163203,\\n-122.4193876,\\n-122.4210496,\\n-122.422284,\\n-122.4232717,\\n-122.4235138,\\n-122.4247605,\\n-122.4258812];\\n\\nvar i = Math.floor((time/3 % 14000) / 1000);\\n\\nreturn lons[i];\"}],\"intervalSec\":60},{\"type\":\"function\",\"name\":\"function\",\"dataKeys\":[{\"name\":\"f(x)\",\"type\":\"function\",\"label\":\"Speed\",\"color\":\"#f44336\",\"settings\":{},\"_hash\":0.14481354591724638,\"funcBody\":\"var value = prevValue;\\nif (time % 500 < 100) {\\n    value = value + Math.random() * 40 - 20;\\n    if (value < 45) {\\n    \\tvalue = 45;\\n    } else if (value > 130) {\\n    \\tvalue = 130;\\n    }\\n}\\nreturn value;\"}]}],\"timewindow\":{\"realtime\":{\"timewindowMs\":30000}},\"showTitle\":true,\"backgroundColor\":\"#fff\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"padding\":\"8px\",\"settings\":{\"fitMapBounds\":true,\"routesSettings\":[{\"latKeyName\":\"latitude\",\"lngKeyName\":\"longitude\",\"showLabel\":true,\"tooltipPattern\":\"<b>Latitude:</b> ${latitude:7}<br/><b>Longitude:</b> ${longitude:7}<br/><b>Speed:</b> ${Speed} MPH<br/><small>See advanced settings for details</small>\",\"strokeWeight\":4,\"label\":\"First route\",\"color\":\"#3d5afe\",\"strokeOpacity\":1,\"useColorFunction\":true,\"useMarkerImageFunction\":true,\"markerImages\":[\"data:image/png;base64,[encoded data, 17264 characters]\",\"data:image/png;base64,[encoded data, 16628 characters]\",\"data:image/png;base64,[encoded data, 17120 characters]\"],\"colorFunction\":\"var speed = data['Speed'];\\nif (typeof speed !== undefined) {\\n    var percent = (speed - 45)/85;\\n    if (percent < 0.5) {\\n        percent *=2*100; \\n        return tinycolor.mix('green', 'yellow', amount = percent).toHexString();\\n    } else {\\n        percent = (percent - 0.5)*2*100;\\n        return tinycolor.mix('yellow', 'red', amount = percent).toHexString();\\n    }\\n}\\nreturn 'green';\",\"markerImageFunction\":\"var speed = data['Speed'];\\nvar res = {\\n    url: images[0],\\n    size: 55\\n};\\nif (typeof speed !== undefined) {\\n    var percent = (speed - 45)/85;\\n    var index = Math.floor(3 * percent);\\n    res.url = images[index];\\n}\\nreturn res;\"}]},\"title\":\"Route Map - OpenStreetMap\",\"dropShadow\":true,\"enableFullscreen\":true,\"titleStyle\":{\"fontSize\":\"16px\",\"fontWeight\":400},\"useDashboardTimewindow\":true,\"showLegend\":false}"
      }
    }
  ]
}