Thank you to anyone who has already donated - your generous donations helped make three months of treatment possible.
My brother Nate continues to fight stage IV Hodgkin's lymphoma. He's just 31, with a wife and baby girl. They have no active income (since he's been unable to return to work), no insurance, and cannot afford the treatment he needs. Nate and his family need your help. Please consider a donation, every dollar helps. Thanks.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
/**************************************************************** ************* Global Variables ************** ****************************************************************/ var polygonBoundaries = ; // Array of polygons to display on a map. var defaultPolygonOptions = strokeColor: '#999999' strokeOpacity: 1 strokeWeight: 1 fillColor: '#46461F' fillOpacity: 0.10 ; var defaultPolygonHoverOptions = strokeColor: '#2d9908' strokeOpacity: 1 strokeWeight: 1 fillColor: '#3eb216' fillOpacity: 0.60 ; /**************************************************************** ************* Polygon Storage ************** ****************************************************************/ item = ; itemtype = type; itempolygon = polygon; itemproperties = properties; return item; // Removes all the polygons that have been remembered. If a type is provided, then it attempts to remove only those instances. $eachpolygonBoundaries thispolygonsetMapnull; ; // Empty the array. polygonBoundarieslength = 0; if polygons == null return; $eachpolygons polygonBoundariespushthis; ; if inactiveElementval != null && inactiveElementval != '' defaultPolygonOptionsfillColor = inactiveElementval; if activeElementval != null && activeElementval != '' defaultPolygonHoverOptionsfillColor = activeElementval; /**************************************************************** ************* Polygon Events ************** ****************************************************************/ $eachpolygonBoundaries if type == null || thistype == type if isVisible thispolygonsetMapgoogleMap; // Display this polygon on a googlemap. else thispolygonsetMapnull; // This this polygon from a google map. ; // Set the polygon colours. setPolygonColoursinactiveElementactiveElement; resetPolygonDisplayOptions; // Toggle the layer. togglePolygonLayersgoogleMap$checkboxElementval$checkboxElementis':checked'; /**************************************************************** ************* Polygon Json Data Conversion ************** ****************************************************************/ var features = ; $eachgeoJsonfeatures var polygon = getPolygonFromFeaturethisthispropertiesScore; setListenerEventsForAPolygonpolygonthispropertiesUrlthispropertiesNamethispropertiesScore; featurespushcreatePolygontypepolygonthisproperties; ; return features; var paths = ; for var i = 0; i < geoJsonFeaturegeometrycoordinateslength; i++ var path = ; for var j = 0; j < geoJsonFeaturegeometrycoordinatesilength; j++ var point = LatLnggeoJsonFeaturegeometrycoordinatesij1geoJsonFeaturegeometrycoordinatesij0; pathpushpoint; pathspushpath; var options = $extend paths: paths defaultPolygonOptions; optionsfillColor = score > 0 ? getFillColourscore : defaultPolygonOptionsfillColor; optionsfillOpacity = score > 0 ? 0.8 : 0.1; return Polygonoptions; // Add google map events to this polygon. googlemapseventaddListenerpolygon'click' alert'Visit: ' + uri; ; googlemapseventaddListenerpolygon'mousemove' showToolTipmousePosname + ' -- Score: ' + score; thissetOptionsdefaultPolygonHoverOptions; ; var temp = $extenddefaultPolygonOptions; tempfillColor = score > 0 ? getFillColourscore : defaultPolygonOptionsfillColor; tempfillOpacity = score > 0 ? 0.8 : 0.1; googlemapseventaddListenerpolygon'mouseout' hideToolTip; thissetOptionstemp; ; // Remove all existing listeners. googlemapseventclearListenersgoogleMap'click'; googlemapseventclearListenersgoogleMap'mousemove'; googlemapseventclearListenersgoogleMap'mouseout'; $eachpolygonBoundaries setListenerEventsForAPolygonthispolygonthispropertiesUrlthispropertiesNamethispropertiesScore; thispolygonfillColor = thispropertiesScore > 0 ? getFillColourthispropertiesScore : defaultPolygonOptionsfillColor; thispolygonfillOpacity = thispropertiesScore > 0 ? 0.8 : 0.1; ; if score > 90 return '#FF0000'; // bright red if score > 80 return '#FF8400'; if score > 70 return '#FFCC00'; if score > 60 return '#FFFB00'; if score > 50 return '#8885D6'; if score > 40 return '#3C399E'; if score > 30 return '#48FF00'; if score > 20 return '#00FF88'; if score > 10 return '#0059FF'; return '#000000'; /**************************************************************** ************* Google Maps Utilities ************** ****************************************************************/ var mousePos = ; // Current mouse position. $ $documentmousemove mousePosx = epageX; mousePosy = epageY; ; ; return LatLngsouthWestLatLnglatnorthEastLatLnglng; return LatLngnorthEastLatLnglatsouthWestLatLnglng; var bounds = googleMapgetBounds; var northEast = boundsgetNorthEast; var southWest = boundsgetSouthWest; var km = northEastdistanceFromsouthWest / 1000; return Mathceilkm / 2; var container = $'#maptooltipcontainer'; var offsetX = Mathfloorcontainerwidth / 2; var offsetY = containerheight + 20; containertexttextcss'left'posx - offsetX + 'px'css'top'posy - offsetY + 'px'show; $'#maptooltipcontainer'hide; /**************************************************************** ************* Polygon Ajax ************** ****************************************************************/ if googleMap == null || dataTypeToRetrieve == null return false; // Grab the bounding box, for the current map's viewport. var bounds = googleMapgetBounds; if bounds == null return false; // Determine the bounding box and the url to hit. ne = boundsgetNorthEast; sw = boundsgetSouthWest; nw = getNorthWestnesw; se = getSouthEastnesw; // Maybe this is for school markers? if dataTypeToRetrieve == "schools" url = '/GeoSpatial/ShowSchoolsNearBy?format=json&longitude=' + googleMapgetCenterlng + '&latitude=' + googleMapgetCenterlat + '&radius=' + getMapRadiusgoogleMap else url = '/GeoSpatial/ShowLocations?format=json&upperLeftLongitude=' + nwlng + '&upperLeftLatitude=' + nwlat + '&lowerRightLongitude=' + selng + '&lowerRightLatitude=' + selat + '&locationType=' + dataTypeToRetrieve; // Now fire it off, asynchronously! var startTime = getTime; var request = $getJSONurl var result = geoJson: jsonResult type: dataTypeToRetrieve contentLength: requestgetResponseHeader"Content-Length" startTime: startTime ; callbackresult; ; return true; |