File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/internal-packages/schema/lib/d3 Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ const UNSELECTED_COLOR = '#43B1E5';
17
17
const CONTROL_COLOR = '#ed271c' ;
18
18
const TOKEN = 'pk.eyJ1IjoibW9uZ29kYi1jb21wYXNzIiwiYSI6ImNpbWUxZjNudjAwZTZ0emtrczByanZ4MzIifQ.6Mha4zoflraopcZKOLSpYQ' ;
19
19
20
+ const MAPBOX_API_URL = 'https://compass-maps.mongodb.com/api.mapbox.com' ;
21
+ const MAPBOX_CLIENT_URL = MAPBOX_API_URL + '/mapbox-gl-js/v0.15.0/mapbox-gl.js' ;
22
+
20
23
const minicharts_d3fns_geo = function ( ) {
21
24
// --- beginning chart setup ---
22
25
let width = 400 ;
@@ -280,11 +283,12 @@ const minicharts_d3fns_geo = function() {
280
283
function loadMapBoxScript ( done ) {
281
284
const script = document . createElement ( 'script' ) ;
282
285
script . setAttribute ( 'type' , 'text/javascript' ) ;
283
- script . src = 'https://api.tiles.mapbox.com/mapbox-gl-js/v0.15.0/mapbox-gl.js' ;
286
+ script . src = MAPBOX_CLIENT_URL ;
284
287
script . onerror = function ( ) {
285
288
done ( 'Error ocurred while loading MapBox script.' ) ;
286
289
} ;
287
290
script . onload = function ( ) {
291
+ window . mapboxgl . config . API_URL = MAPBOX_API_URL ;
288
292
done ( null , window . mapboxgl ) ;
289
293
} ;
290
294
document . getElementsByTagName ( 'head' ) [ 0 ] . appendChild ( script ) ;
You can’t perform that action at this time.
0 commit comments