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';
1717const CONTROL_COLOR = '#ed271c' ;
1818const TOKEN = 'pk.eyJ1IjoibW9uZ29kYi1jb21wYXNzIiwiYSI6ImNpbWUxZjNudjAwZTZ0emtrczByanZ4MzIifQ.6Mha4zoflraopcZKOLSpYQ' ;
1919
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+
2023const minicharts_d3fns_geo = function ( ) {
2124 // --- beginning chart setup ---
2225 let width = 400 ;
@@ -280,11 +283,12 @@ const minicharts_d3fns_geo = function() {
280283 function loadMapBoxScript ( done ) {
281284 const script = document . createElement ( 'script' ) ;
282285 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 ;
284287 script . onerror = function ( ) {
285288 done ( 'Error ocurred while loading MapBox script.' ) ;
286289 } ;
287290 script . onload = function ( ) {
291+ window . mapboxgl . config . API_URL = MAPBOX_API_URL ;
288292 done ( null , window . mapboxgl ) ;
289293 } ;
290294 document . getElementsByTagName ( 'head' ) [ 0 ] . appendChild ( script ) ;
You can’t perform that action at this time.
0 commit comments