Interactive interface for browsing global, full-resolution satellite imagery
added rgbaToHex utility function
Benjaminfcd26e0bd385
diff --git a/web/js/util/wv.util.js b/web/js/util/wv.util.jsindex 67241b062..7afea9530 100644--- a/web/js/util/wv.util.js+++ b/web/js/util/wv.util.js@@ -497,6 +497,13 @@ wv.util = (function(self) {parseInt(str.substring(4, 6), 16) + "," +parseInt(str.substring(6, 8), 16) + ")";};+ self.rgbaToHex = function(r, g, b) {+ function hex(c) {+ var hex = c.toString(16);+ return hex.length == 1 ? "0" + hex : hex;+ }+ return hex(r) + hex(g) + hex(b) + 'ff';+ }/*** Submits an AJAX request or retreives the result from the cache.