File tree 4 files changed +21
-9
lines changed 4 files changed +21
-9
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,15 @@ topojsonUtils.getTopojsonName = function(geoLayout) {
13
13
} ;
14
14
15
15
topojsonUtils . getTopojsonPath = function ( topojsonURL , topojsonName ) {
16
- return topojsonURL + topojsonName + '.json' ;
16
+ var path = topojsonURL ;
17
+
18
+ if ( topojsonName . startsWith ( 'un_' ) ) {
19
+ path += 'un' ;
20
+ } else {
21
+ path += topojsonName ;
22
+ }
23
+
24
+ return path + '.json' ;
17
25
} ;
18
26
19
27
topojsonUtils . getTopojsonFeatures = function ( trace , topojson ) {
Original file line number Diff line number Diff line change @@ -141,14 +141,17 @@ exports.lataxisSpan = {
141
141
'*' : 180
142
142
} ;
143
143
144
+ var world = {
145
+ lonaxisRange : [ - 180 , 180 ] ,
146
+ lataxisRange : [ - 90 , 90 ] ,
147
+ projType : 'equirectangular' ,
148
+ projRotate : [ 0 , 0 , 0 ]
149
+ } ;
150
+
144
151
// defaults for each scope
145
152
exports . scopeDefaults = {
146
- world : {
147
- lonaxisRange : [ - 180 , 180 ] ,
148
- lataxisRange : [ - 90 , 90 ] ,
149
- projType : 'equirectangular' ,
150
- projRotate : [ 0 , 0 , 0 ]
151
- } ,
153
+ un : world ,
154
+ world : world ,
152
155
usa : {
153
156
lonaxisRange : [ - 180 , - 50 ] ,
154
157
lataxisRange : [ 15 , 80 ] ,
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ var attrs = module.exports = overrideAll({
104
104
scope : {
105
105
valType : 'enumerated' ,
106
106
values : sortObjectKeys ( constants . scopeDefaults ) ,
107
- dflt : 'world ' ,
107
+ dflt : 'un ' ,
108
108
description : 'Set the scope of the map.'
109
109
} ,
110
110
projection : {
Original file line number Diff line number Diff line change 2540
2540
"role": "object",
2541
2541
"scope": {
2542
2542
"description": "Set the scope of the map.",
2543
- "dflt": "world ",
2543
+ "dflt": "un ",
2544
2544
"editType": "plot",
2545
2545
"valType": "enumerated",
2546
2546
"values": [
2549
2549
"europe",
2550
2550
"north america",
2551
2551
"south america",
2552
+ "un",
2552
2553
"usa",
2553
2554
"world"
2554
2555
]
You can’t perform that action at this time.
0 commit comments