@@ -3,20 +3,20 @@ var _ = require('lodash');
33// var shared = require('./shared');
44var debug = require ( 'debug' ) ( 'scout:minicharts:geo' ) ;
55var mapStyle = require ( './mapstyle' ) ;
6- var async = require ( 'async' ) ;
7- var xor = require ( 'xor-it' ) ;
6+ // var async = require('async');
7+ // var xor = require('xor-it');
88var app = require ( 'ampersand-app' ) ;
99var format = require ( 'util' ) . format ;
1010
1111
1212var SHIFTKEY = 16 ;
13- var APIKEY = '\u0004;\b\u000e!Cd5\u0007*V\u001d\u0007C\u0003/9HW\u001c>_\u0010\u0017)*\u0017B.7D/!*3\u000f\bX\u0010 ' ;
13+ var APIKEY = 'AIzaSyDrhE1qbcnNIh4sK3t7GEcbLRdCNKWjlt0 ' ;
1414
15- function produceKey ( text ) {
16- var key = 'Error: Google map could not be loaded, disabling feature' ;
17- var res = xor ( key , text ) ;
18- return res ;
19- }
15+ // function produceKey(text) {
16+ // var key = 'Error: Google map could not be loaded, disabling feature';
17+ // var res = xor(key, text);
18+ // return res;
19+ // }
2020
2121// From: http://davidbcalhoun.com/2014/async.parallel-with-a-simple-timeout-node-js/
2222// async.parallel with optional timeout (options.timeoutMS)
@@ -60,7 +60,9 @@ var minicharts_d3fns_geo = function() {
6060 // var margin = shared.margin;
6161
6262 function disableMapsFeature ( ) {
63+ // disable both in feature flag (for this run) and localStorage
6364 app . setFeature ( 'Google Map Minicharts' , false ) ;
65+ localStorage . disableGoogleMaps = true ;
6466 delete window . google ;
6567 debug ( 'parent render' , options . view . parent . render ( ) ) ;
6668 options . view . parent . render ( ) ;
@@ -83,7 +85,7 @@ var minicharts_d3fns_geo = function() {
8385 var script = document . createElement ( 'script' ) ;
8486 script . setAttribute ( 'type' , 'text/javascript' ) ;
8587 script . src = format ( 'https://maps.googleapis.com/maps/api/js?key=%s&libraries=geometry' ,
86- produceKey ( APIKEY ) ) ;
88+ APIKEY ) ;
8789 script . onerror = function ( ) {
8890 done ( 'Error ocurred while loading Google Maps.' ) ;
8991 } ;
0 commit comments