Outage Heatmap Example

This is a sample outage map. To get a real one, you must first get an affiliateKey from zcorum. Then create an html page with the following lines in the head of the html (using the affiliateKey you received from zcorum):
<link rel="stylesheet" href="https://truproxy.truvizion.net/resources/affiliateOutage.css"/> <script src="https://truproxy.truvizion.net/resources/affiliateOutage.js"></script> <script src="https://truproxy.truvizion.net/{affiliateKey}/affiliateOutageData"></script>
By default, this will show docsis outage data. If you would like to see DSL outage data, you would change the last line to instead be:
<script src="https://truproxy.truvizion.net/{affiliateKey}/affiliateOutageData?accessType=DSL"></script>
Then, in the body of the html you need to place a div tag with the id "outageMap".
<div id="outageMap"></div>
By default, this div will expand to fill 100% of the available area. Thus if you want the map the fill the entire page, simply put the div in the body by it's self.
... <body> <div id="outageMap"></div> </body> ...
If, however, you would like to limit the map to a certain size, you can do so by placing the outage map div inside another div with the desired size.
<div style="width:800px;height:500px"> <div id="outageMap"></div> </div>
Optionally, there are a few javascript functions that you can call to tweak the display of the outage map. You can call these from a script tag in the head of the html under the script tags described above. setDefaultBounds allows you to define the bounds of the map (latitude and longitude) in the event there there are no outages to report (it defaults to showing a map of the entire globe). When there is an outage, these values are ignored. Latitude is represented as a floating point number from -90 to 90. Longitude is represented as a floating point number from -180 to 180.
<script> setDefaultBounds({minLatitude}, {minLongitude}, {maxLatitude}, {maxLongitude}); </script>
restrictBounds allows you to define the extream bounds of the map (latitude and longitude) when there are outages to report. If the actual outage data is concentrated in a smaller area than the restricted bounds, then the map may 'zoom in' to that area, but it will not 'zoom out' of the restricted area. The map will zoom so that it can display all of the bounds, thus if you are very restrictive in one dimension, say latitude, but not very restrictive in the other (longitude), it will zoom to the least restrictive dimension (longitude) and may therefore show data from outside the most restrictive dimension (latitude). Also, note that this function only controls the initial view of the map. Once displayed, the user can manually zoom or move beyond these bounds. Latitude is represented as a floating point number from -90 to 90. Longitude is represented as a floating point number from -180 to 180.
<script> restrictBounds({minLatitude}, {minLongitude}, {maxLatitude}, {maxLongitude}); </script>
configHeatMap allows you to tweak the look of heatmap. There are four values you can adjust:
<script> configHeatMap({maxValue}, {radius}, {maxOpacity}, {blur}); </script>
Note that the colors correspond to the following percentages of the maxValue:
100% = red
85% = yellow
55% = green
25% = blue