Skip to content

Commit 9afb014

Browse files
committed
grab topojson from PlotlyGeoAssets.topojson
1 parent 40c7549 commit 9afb014

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/plot_api/plot_api.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -455,10 +455,10 @@ function plotGeo(gd) {
455455

456456
var i, geoId, fullGeoData, geo;
457457

458-
// if plotlyjs-geo-assets-bundle is not included,
459-
// initialize object to keep reference to every loaded topojsons
458+
// if 'plotly-geo-assets.js' is not included,
459+
// initialize object to keep reference to every loaded topojson
460460
if(window.PlotlyGeoAssets === undefined) {
461-
window.PlotlyGeoAssets = { topojsons : {} };
461+
window.PlotlyGeoAssets = { topojson : {} };
462462
}
463463

464464
for (i = 0; i < geoIds.length; i++) {

src/plots/geo/geo.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ proto.plot = function(geoData, fullLayout) {
8181
if(_this.topojson===null || topojsonNameNew!==_this.topojsonName) {
8282
_this.topojsonName = topojsonNameNew;
8383

84-
if(PlotlyGeoAssets.topojsons[_this.topojsonName] !== undefined) {
85-
_this.topojson = PlotlyGeoAssets.topojsons[_this.topojsonName];
84+
if(PlotlyGeoAssets.topojson[_this.topojsonName] !== undefined) {
85+
_this.topojson = PlotlyGeoAssets.topojson[_this.topojsonName];
8686
_this.onceTopojsonIsLoaded(geoData, geoLayout);
8787
}
8888
else {
@@ -94,7 +94,7 @@ proto.plot = function(geoData, fullLayout) {
9494
// N.B this is async
9595
d3.json(topojsonPath, function(error, topojson) {
9696
_this.topojson = topojson;
97-
PlotlyGeoAssets.topojsons[_this.topojsonName] = topojson;
97+
PlotlyGeoAssets.topojson[_this.topojsonName] = topojson;
9898
_this.onceTopojsonIsLoaded(geoData, geoLayout);
9999
});
100100
}

0 commit comments

Comments
 (0)