geojs 1.8.6 → 1.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/geo.js +57 -48
- package/geo.lean.js +57 -48
- package/geo.lean.min.js +3 -3
- package/geo.min.js +2 -2
- package/package.json +1 -1
- package/src/graphFeature.js +1 -1
- package/src/heatmapFeature.js +2 -1
- package/src/lineFeature.js +3 -3
- package/src/pixelmapFeature.js +1 -1
- package/src/polygonFeature.js +3 -3
- package/src/quadFeature.js +1 -1
- package/src/trackFeature.js +2 -2
- package/src/transform.js +16 -1
- package/src/util/common.js +11 -0
- package/src/vectorFeature.js +2 -1
- package/src/webgl/lineFeature.js +5 -3
- package/src/webgl/polygonFeature.js +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# GeoJS Change Log
|
|
2
2
|
|
|
3
|
+
## Version 1.8.8
|
|
4
|
+
|
|
5
|
+
### Improvements
|
|
6
|
+
|
|
7
|
+
- Reduce polygon and position function calls ([#1208](../../pull/1208))
|
|
8
|
+
|
|
9
|
+
## Version 1.8.7
|
|
10
|
+
|
|
11
|
+
### Improvements
|
|
12
|
+
|
|
13
|
+
- Add some code paths to reduce transform calls ([#1207](../../pull/1207))
|
|
14
|
+
|
|
3
15
|
## Version 1.8.6
|
|
4
16
|
|
|
5
17
|
### Improvements
|
package/geo.js
CHANGED
|
@@ -12042,9 +12042,7 @@ var graphFeature = function graphFeature(arg) {
|
|
|
12042
12042
|
|
|
12043
12043
|
}, arg.style === undefined ? {} : arg.style);
|
|
12044
12044
|
m_this.style(defaultStyle);
|
|
12045
|
-
m_this.nodes(
|
|
12046
|
-
return d;
|
|
12047
|
-
});
|
|
12045
|
+
m_this.nodes(util.identityFunction);
|
|
12048
12046
|
return m_this;
|
|
12049
12047
|
};
|
|
12050
12048
|
/**
|
|
@@ -12466,6 +12464,8 @@ var inherit = __webpack_require__(5699);
|
|
|
12466
12464
|
var feature = __webpack_require__(6837);
|
|
12467
12465
|
|
|
12468
12466
|
var transform = __webpack_require__(6853);
|
|
12467
|
+
|
|
12468
|
+
var util = __webpack_require__(4634);
|
|
12469
12469
|
/**
|
|
12470
12470
|
* Heatmap feature specification.
|
|
12471
12471
|
*
|
|
@@ -12544,10 +12544,7 @@ var heatmapFeature = function heatmapFeature(arg) {
|
|
|
12544
12544
|
m_gcsPosition,
|
|
12545
12545
|
s_init = this._init;
|
|
12546
12546
|
this.featureType = 'heatmap';
|
|
12547
|
-
|
|
12548
|
-
m_position = arg.position || function (d) {
|
|
12549
|
-
return d;
|
|
12550
|
-
};
|
|
12547
|
+
m_position = arg.position || util.identityFunction;
|
|
12551
12548
|
|
|
12552
12549
|
m_intensity = arg.intensity || function (d) {
|
|
12553
12550
|
return 1;
|
|
@@ -15668,12 +15665,8 @@ var lineFeature = function lineFeature(arg) {
|
|
|
15668
15665
|
});
|
|
15669
15666
|
/* Set the reduced lines as the data and use simple accessors. */
|
|
15670
15667
|
|
|
15671
|
-
m_this.style('position',
|
|
15672
|
-
|
|
15673
|
-
});
|
|
15674
|
-
m_this.style('line', function (d) {
|
|
15675
|
-
return d;
|
|
15676
|
-
});
|
|
15668
|
+
m_this.style('position', util.identityFunction);
|
|
15669
|
+
m_this.style('line', util.identityFunction);
|
|
15677
15670
|
m_this.data(data);
|
|
15678
15671
|
return m_this;
|
|
15679
15672
|
};
|
|
@@ -15701,9 +15694,7 @@ var lineFeature = function lineFeature(arg) {
|
|
|
15701
15694
|
// Values of 2 and above appear smoothest.
|
|
15702
15695
|
antialiasing: 2.0,
|
|
15703
15696
|
closed: false,
|
|
15704
|
-
line:
|
|
15705
|
-
return d;
|
|
15706
|
-
},
|
|
15697
|
+
line: util.identityFunction,
|
|
15707
15698
|
position: function position(d) {
|
|
15708
15699
|
return Array.isArray(d) ? {
|
|
15709
15700
|
x: d[0],
|
|
@@ -23324,9 +23315,7 @@ var pixelmapFeature = function pixelmapFeature(arg) {
|
|
|
23324
23315
|
a: 1
|
|
23325
23316
|
};
|
|
23326
23317
|
},
|
|
23327
|
-
position:
|
|
23328
|
-
return d;
|
|
23329
|
-
}
|
|
23318
|
+
position: util.identityFunction
|
|
23330
23319
|
}, arg.style === undefined ? {} : arg.style);
|
|
23331
23320
|
|
|
23332
23321
|
if (arg.position !== undefined) {
|
|
@@ -25022,12 +25011,8 @@ var polygonFeature = function polygonFeature(arg) {
|
|
|
25022
25011
|
});
|
|
25023
25012
|
/* Set the reduced polgons as the data and use simple accessors. */
|
|
25024
25013
|
|
|
25025
|
-
m_this.style('position',
|
|
25026
|
-
|
|
25027
|
-
});
|
|
25028
|
-
m_this.style('polygon', function (d) {
|
|
25029
|
-
return d;
|
|
25030
|
-
});
|
|
25014
|
+
m_this.style('position', util.identityFunction);
|
|
25015
|
+
m_this.style('polygon', util.identityFunction);
|
|
25031
25016
|
m_this.data(data);
|
|
25032
25017
|
return m_this;
|
|
25033
25018
|
};
|
|
@@ -25123,9 +25108,7 @@ var polygonFeature = function polygonFeature(arg) {
|
|
|
25123
25108
|
b: 1.0
|
|
25124
25109
|
},
|
|
25125
25110
|
strokeOpacity: 1.0,
|
|
25126
|
-
polygon:
|
|
25127
|
-
return d;
|
|
25128
|
-
},
|
|
25111
|
+
polygon: util.identityFunction,
|
|
25129
25112
|
position: function position(d) {
|
|
25130
25113
|
return Array.isArray(d) ? {
|
|
25131
25114
|
x: d[0],
|
|
@@ -26014,9 +25997,7 @@ var quadFeature = function quadFeature(arg) {
|
|
|
26014
25997
|
video: function video(d) {
|
|
26015
25998
|
return d.video;
|
|
26016
25999
|
},
|
|
26017
|
-
position:
|
|
26018
|
-
return d;
|
|
26019
|
-
}
|
|
26000
|
+
position: util.identityFunction
|
|
26020
26001
|
}, arg.style === undefined ? {} : arg.style);
|
|
26021
26002
|
|
|
26022
26003
|
if (arg.position !== undefined) {
|
|
@@ -27053,7 +27034,7 @@ module.exports = sceneObject;
|
|
|
27053
27034
|
* @constant
|
|
27054
27035
|
* @type {string}
|
|
27055
27036
|
*/
|
|
27056
|
-
module.exports = "
|
|
27037
|
+
module.exports = "eacf9ad316c55bd4e941894ac51f0071b59d67f7";
|
|
27057
27038
|
|
|
27058
27039
|
/***/ }),
|
|
27059
27040
|
|
|
@@ -32927,12 +32908,8 @@ var trackFeature = function trackFeature(arg) {
|
|
|
32927
32908
|
arg = arg || {};
|
|
32928
32909
|
s_init.call(m_this, arg);
|
|
32929
32910
|
var style = $.extend(true, {}, {
|
|
32930
|
-
track:
|
|
32931
|
-
|
|
32932
|
-
},
|
|
32933
|
-
position: function position(d) {
|
|
32934
|
-
return d;
|
|
32935
|
-
},
|
|
32911
|
+
track: util.identityFunction,
|
|
32912
|
+
position: util.identityFunction,
|
|
32936
32913
|
time: function time(d, i) {
|
|
32937
32914
|
return d.t !== undefined ? d.t : i;
|
|
32938
32915
|
}
|
|
@@ -33007,7 +32984,7 @@ var maxTransformCacheSize = 10;
|
|
|
33007
32984
|
/* A RegExp to detect if two transforms only different by the middle axis's
|
|
33008
32985
|
* direction. */
|
|
33009
32986
|
|
|
33010
|
-
var axisPattern = /^(.* |)
|
|
32987
|
+
var axisPattern = /^(.* |)\+axis=e(n|s)u(| .*)$/;
|
|
33011
32988
|
var affinePattern = /(^|\s)\+(s[1-3][1-3]|[xyz]off)=\S/;
|
|
33012
32989
|
/**
|
|
33013
32990
|
* This purpose of this class is to provide a generic interface for computing
|
|
@@ -33921,6 +33898,22 @@ transform.vincentyDistance = function (pt1, pt2, gcs, baseGcs, ellipsoid, maxIte
|
|
|
33921
33898
|
alpha2: Math.atan2(cosU1 * Math.sin(lambda), -sinU1 * cosU2 + cosU1 * sinU2 * Math.cos(lambda))
|
|
33922
33899
|
};
|
|
33923
33900
|
};
|
|
33901
|
+
/**
|
|
33902
|
+
* Return a boolean indicating if the projections only differ in their y
|
|
33903
|
+
* coordinate.
|
|
33904
|
+
*
|
|
33905
|
+
* @param {string} srcPrj The source projection.
|
|
33906
|
+
* @param {string} tgtPrj The destination projection.
|
|
33907
|
+
* @returns {boolean} truthy if only the y coordinate is different between
|
|
33908
|
+
* projections.
|
|
33909
|
+
*/
|
|
33910
|
+
|
|
33911
|
+
|
|
33912
|
+
transform.onlyInvertedY = function (srcPrj, tgtPrj) {
|
|
33913
|
+
var smatch = srcPrj.match(axisPattern),
|
|
33914
|
+
tmatch = tgtPrj.match(axisPattern);
|
|
33915
|
+
return smatch && tmatch && smatch[1] === tmatch[1] && smatch[3] === tmatch[3];
|
|
33916
|
+
};
|
|
33924
33917
|
/* Expose proj4 to make it easier to debug */
|
|
33925
33918
|
|
|
33926
33919
|
|
|
@@ -38563,6 +38556,17 @@ var util = {
|
|
|
38563
38556
|
|
|
38564
38557
|
return value !== null && value !== undefined && (type === 'object' || type === 'function');
|
|
38565
38558
|
},
|
|
38559
|
+
|
|
38560
|
+
/**
|
|
38561
|
+
* Return the first value passed to the function. Using this function for
|
|
38562
|
+
* identity calls can allow some code to bypass making such a call entirely.
|
|
38563
|
+
*
|
|
38564
|
+
* @param {*} d Any value.
|
|
38565
|
+
* @returns {*} The passed value.
|
|
38566
|
+
*/
|
|
38567
|
+
identityFunction: function identityFunction(d) {
|
|
38568
|
+
return d;
|
|
38569
|
+
},
|
|
38566
38570
|
///////////////////////////////////////////////////////////////////////////
|
|
38567
38571
|
|
|
38568
38572
|
/*
|
|
@@ -39392,6 +39396,8 @@ module.exports = {
|
|
|
39392
39396
|
var inherit = __webpack_require__(5699);
|
|
39393
39397
|
|
|
39394
39398
|
var feature = __webpack_require__(6837);
|
|
39399
|
+
|
|
39400
|
+
var util = __webpack_require__(4634);
|
|
39395
39401
|
/**
|
|
39396
39402
|
* Object specification for a graph feature.
|
|
39397
39403
|
*
|
|
@@ -39518,9 +39524,7 @@ var vectorFeature = function vectorFeature(arg) {
|
|
|
39518
39524
|
y: 0,
|
|
39519
39525
|
z: 0
|
|
39520
39526
|
},
|
|
39521
|
-
delta:
|
|
39522
|
-
return d;
|
|
39523
|
-
},
|
|
39527
|
+
delta: util.identityFunction,
|
|
39524
39528
|
scale: null // size scaling factor (null -> renderer decides)
|
|
39525
39529
|
|
|
39526
39530
|
}, arg.style === undefined ? {} : arg.style);
|
|
@@ -39552,7 +39556,7 @@ module.exports = vectorFeature;
|
|
|
39552
39556
|
* @constant
|
|
39553
39557
|
* @type {string}
|
|
39554
39558
|
*/
|
|
39555
|
-
module.exports = "1.8.
|
|
39559
|
+
module.exports = "1.8.9";
|
|
39556
39560
|
|
|
39557
39561
|
/***/ }),
|
|
39558
39562
|
|
|
@@ -40783,6 +40787,8 @@ var webgl_lineFeature = function webgl_lineFeature(arg) {
|
|
|
40783
40787
|
negStrokeOffset: 0
|
|
40784
40788
|
}],
|
|
40785
40789
|
v = vert[1],
|
|
40790
|
+
target_gcs = m_this.gcs(),
|
|
40791
|
+
map_gcs = m_this.layer().map().gcs(),
|
|
40786
40792
|
pos,
|
|
40787
40793
|
posIdx3,
|
|
40788
40794
|
firstpos,
|
|
@@ -40846,6 +40852,7 @@ var webgl_lineFeature = function webgl_lineFeature(arg) {
|
|
|
40846
40852
|
if (!onlyStyle) {
|
|
40847
40853
|
var position = [],
|
|
40848
40854
|
posFunc = m_this.position();
|
|
40855
|
+
posFunc = posFunc === util.identityFunction ? null : posFunc;
|
|
40849
40856
|
lineItemList = new Array(data.length);
|
|
40850
40857
|
closed = new Array(data.length);
|
|
40851
40858
|
|
|
@@ -40861,7 +40868,7 @@ var webgl_lineFeature = function webgl_lineFeature(arg) {
|
|
|
40861
40868
|
numSegments += lineItem.length - 1;
|
|
40862
40869
|
|
|
40863
40870
|
for (j = 0; j < lineItem.length; j += 1) {
|
|
40864
|
-
pos = posFunc(lineItem[j], j, d, i);
|
|
40871
|
+
pos = posFunc ? posFunc(lineItem[j], j, d, i) : lineItem[j];
|
|
40865
40872
|
position.push(pos.x);
|
|
40866
40873
|
position.push(pos.y);
|
|
40867
40874
|
position.push(pos.z || 0.0);
|
|
@@ -40886,7 +40893,7 @@ var webgl_lineFeature = function webgl_lineFeature(arg) {
|
|
|
40886
40893
|
}
|
|
40887
40894
|
}
|
|
40888
40895
|
|
|
40889
|
-
position = transform.transformCoordinates(
|
|
40896
|
+
position = transform.transformCoordinates(target_gcs, map_gcs, position, 3);
|
|
40890
40897
|
m_origin = new Float32Array(m_this.style.get('origin')(position));
|
|
40891
40898
|
|
|
40892
40899
|
if (m_origin[0] || m_origin[1] || m_origin[2]) {
|
|
@@ -43436,10 +43443,12 @@ var webgl_polygonFeature = function webgl_polygonFeature(arg) {
|
|
|
43436
43443
|
|
|
43437
43444
|
if (!onlyStyle) {
|
|
43438
43445
|
posFunc = m_this.style.get('position');
|
|
43446
|
+
posFunc = posFunc === util.identityFunction ? null : posFunc;
|
|
43439
43447
|
polyFunc = m_this.style.get('polygon');
|
|
43448
|
+
polyFunc = polyFunc === util.identityFunction ? null : polyFunc;
|
|
43440
43449
|
m_this.data().forEach(function (item, itemIndex) {
|
|
43441
43450
|
var polygon, outer, geometry, c;
|
|
43442
|
-
polygon = polyFunc(item, itemIndex);
|
|
43451
|
+
polygon = polyFunc ? polyFunc(item, itemIndex) : item;
|
|
43443
43452
|
|
|
43444
43453
|
if (!polygon) {
|
|
43445
43454
|
return;
|
|
@@ -43458,7 +43467,7 @@ var webgl_polygonFeature = function webgl_polygonFeature(arg) {
|
|
|
43458
43467
|
geometry = new Array(outer.length * 3);
|
|
43459
43468
|
|
|
43460
43469
|
for (i = d3 = 0; i < outer.length; i += 1, d3 += 3) {
|
|
43461
|
-
c = posFunc(outer[i], i, item, itemIndex);
|
|
43470
|
+
c = posFunc ? posFunc(outer[i], i, item, itemIndex) : outer[i];
|
|
43462
43471
|
geometry[d3] = c.x;
|
|
43463
43472
|
geometry[d3 + 1] = c.y; // ignore the z values until we support them
|
|
43464
43473
|
|
|
@@ -43482,7 +43491,7 @@ var webgl_polygonFeature = function webgl_polygonFeature(arg) {
|
|
|
43482
43491
|
geometry.holes.push(d3 / 3);
|
|
43483
43492
|
|
|
43484
43493
|
for (i = 0; i < hole.length; i += 1, d3 += 3) {
|
|
43485
|
-
c = posFunc(hole[i], i, item, itemIndex);
|
|
43494
|
+
c = posFunc ? posFunc(hole[i], i, item, itemIndex) : hole[i];
|
|
43486
43495
|
geometry.vertices[d3] = c.x;
|
|
43487
43496
|
geometry.vertices[d3 + 1] = c.y; // ignore the z values until we support them
|
|
43488
43497
|
|
package/geo.lean.js
CHANGED
|
@@ -12042,9 +12042,7 @@ var graphFeature = function graphFeature(arg) {
|
|
|
12042
12042
|
|
|
12043
12043
|
}, arg.style === undefined ? {} : arg.style);
|
|
12044
12044
|
m_this.style(defaultStyle);
|
|
12045
|
-
m_this.nodes(
|
|
12046
|
-
return d;
|
|
12047
|
-
});
|
|
12045
|
+
m_this.nodes(util.identityFunction);
|
|
12048
12046
|
return m_this;
|
|
12049
12047
|
};
|
|
12050
12048
|
/**
|
|
@@ -12466,6 +12464,8 @@ var inherit = __webpack_require__(5699);
|
|
|
12466
12464
|
var feature = __webpack_require__(6837);
|
|
12467
12465
|
|
|
12468
12466
|
var transform = __webpack_require__(6853);
|
|
12467
|
+
|
|
12468
|
+
var util = __webpack_require__(4634);
|
|
12469
12469
|
/**
|
|
12470
12470
|
* Heatmap feature specification.
|
|
12471
12471
|
*
|
|
@@ -12544,10 +12544,7 @@ var heatmapFeature = function heatmapFeature(arg) {
|
|
|
12544
12544
|
m_gcsPosition,
|
|
12545
12545
|
s_init = this._init;
|
|
12546
12546
|
this.featureType = 'heatmap';
|
|
12547
|
-
|
|
12548
|
-
m_position = arg.position || function (d) {
|
|
12549
|
-
return d;
|
|
12550
|
-
};
|
|
12547
|
+
m_position = arg.position || util.identityFunction;
|
|
12551
12548
|
|
|
12552
12549
|
m_intensity = arg.intensity || function (d) {
|
|
12553
12550
|
return 1;
|
|
@@ -15668,12 +15665,8 @@ var lineFeature = function lineFeature(arg) {
|
|
|
15668
15665
|
});
|
|
15669
15666
|
/* Set the reduced lines as the data and use simple accessors. */
|
|
15670
15667
|
|
|
15671
|
-
m_this.style('position',
|
|
15672
|
-
|
|
15673
|
-
});
|
|
15674
|
-
m_this.style('line', function (d) {
|
|
15675
|
-
return d;
|
|
15676
|
-
});
|
|
15668
|
+
m_this.style('position', util.identityFunction);
|
|
15669
|
+
m_this.style('line', util.identityFunction);
|
|
15677
15670
|
m_this.data(data);
|
|
15678
15671
|
return m_this;
|
|
15679
15672
|
};
|
|
@@ -15701,9 +15694,7 @@ var lineFeature = function lineFeature(arg) {
|
|
|
15701
15694
|
// Values of 2 and above appear smoothest.
|
|
15702
15695
|
antialiasing: 2.0,
|
|
15703
15696
|
closed: false,
|
|
15704
|
-
line:
|
|
15705
|
-
return d;
|
|
15706
|
-
},
|
|
15697
|
+
line: util.identityFunction,
|
|
15707
15698
|
position: function position(d) {
|
|
15708
15699
|
return Array.isArray(d) ? {
|
|
15709
15700
|
x: d[0],
|
|
@@ -23324,9 +23315,7 @@ var pixelmapFeature = function pixelmapFeature(arg) {
|
|
|
23324
23315
|
a: 1
|
|
23325
23316
|
};
|
|
23326
23317
|
},
|
|
23327
|
-
position:
|
|
23328
|
-
return d;
|
|
23329
|
-
}
|
|
23318
|
+
position: util.identityFunction
|
|
23330
23319
|
}, arg.style === undefined ? {} : arg.style);
|
|
23331
23320
|
|
|
23332
23321
|
if (arg.position !== undefined) {
|
|
@@ -25022,12 +25011,8 @@ var polygonFeature = function polygonFeature(arg) {
|
|
|
25022
25011
|
});
|
|
25023
25012
|
/* Set the reduced polgons as the data and use simple accessors. */
|
|
25024
25013
|
|
|
25025
|
-
m_this.style('position',
|
|
25026
|
-
|
|
25027
|
-
});
|
|
25028
|
-
m_this.style('polygon', function (d) {
|
|
25029
|
-
return d;
|
|
25030
|
-
});
|
|
25014
|
+
m_this.style('position', util.identityFunction);
|
|
25015
|
+
m_this.style('polygon', util.identityFunction);
|
|
25031
25016
|
m_this.data(data);
|
|
25032
25017
|
return m_this;
|
|
25033
25018
|
};
|
|
@@ -25123,9 +25108,7 @@ var polygonFeature = function polygonFeature(arg) {
|
|
|
25123
25108
|
b: 1.0
|
|
25124
25109
|
},
|
|
25125
25110
|
strokeOpacity: 1.0,
|
|
25126
|
-
polygon:
|
|
25127
|
-
return d;
|
|
25128
|
-
},
|
|
25111
|
+
polygon: util.identityFunction,
|
|
25129
25112
|
position: function position(d) {
|
|
25130
25113
|
return Array.isArray(d) ? {
|
|
25131
25114
|
x: d[0],
|
|
@@ -26014,9 +25997,7 @@ var quadFeature = function quadFeature(arg) {
|
|
|
26014
25997
|
video: function video(d) {
|
|
26015
25998
|
return d.video;
|
|
26016
25999
|
},
|
|
26017
|
-
position:
|
|
26018
|
-
return d;
|
|
26019
|
-
}
|
|
26000
|
+
position: util.identityFunction
|
|
26020
26001
|
}, arg.style === undefined ? {} : arg.style);
|
|
26021
26002
|
|
|
26022
26003
|
if (arg.position !== undefined) {
|
|
@@ -27053,7 +27034,7 @@ module.exports = sceneObject;
|
|
|
27053
27034
|
* @constant
|
|
27054
27035
|
* @type {string}
|
|
27055
27036
|
*/
|
|
27056
|
-
module.exports = "
|
|
27037
|
+
module.exports = "eacf9ad316c55bd4e941894ac51f0071b59d67f7";
|
|
27057
27038
|
|
|
27058
27039
|
/***/ }),
|
|
27059
27040
|
|
|
@@ -32927,12 +32908,8 @@ var trackFeature = function trackFeature(arg) {
|
|
|
32927
32908
|
arg = arg || {};
|
|
32928
32909
|
s_init.call(m_this, arg);
|
|
32929
32910
|
var style = $.extend(true, {}, {
|
|
32930
|
-
track:
|
|
32931
|
-
|
|
32932
|
-
},
|
|
32933
|
-
position: function position(d) {
|
|
32934
|
-
return d;
|
|
32935
|
-
},
|
|
32911
|
+
track: util.identityFunction,
|
|
32912
|
+
position: util.identityFunction,
|
|
32936
32913
|
time: function time(d, i) {
|
|
32937
32914
|
return d.t !== undefined ? d.t : i;
|
|
32938
32915
|
}
|
|
@@ -33007,7 +32984,7 @@ var maxTransformCacheSize = 10;
|
|
|
33007
32984
|
/* A RegExp to detect if two transforms only different by the middle axis's
|
|
33008
32985
|
* direction. */
|
|
33009
32986
|
|
|
33010
|
-
var axisPattern = /^(.* |)
|
|
32987
|
+
var axisPattern = /^(.* |)\+axis=e(n|s)u(| .*)$/;
|
|
33011
32988
|
var affinePattern = /(^|\s)\+(s[1-3][1-3]|[xyz]off)=\S/;
|
|
33012
32989
|
/**
|
|
33013
32990
|
* This purpose of this class is to provide a generic interface for computing
|
|
@@ -33921,6 +33898,22 @@ transform.vincentyDistance = function (pt1, pt2, gcs, baseGcs, ellipsoid, maxIte
|
|
|
33921
33898
|
alpha2: Math.atan2(cosU1 * Math.sin(lambda), -sinU1 * cosU2 + cosU1 * sinU2 * Math.cos(lambda))
|
|
33922
33899
|
};
|
|
33923
33900
|
};
|
|
33901
|
+
/**
|
|
33902
|
+
* Return a boolean indicating if the projections only differ in their y
|
|
33903
|
+
* coordinate.
|
|
33904
|
+
*
|
|
33905
|
+
* @param {string} srcPrj The source projection.
|
|
33906
|
+
* @param {string} tgtPrj The destination projection.
|
|
33907
|
+
* @returns {boolean} truthy if only the y coordinate is different between
|
|
33908
|
+
* projections.
|
|
33909
|
+
*/
|
|
33910
|
+
|
|
33911
|
+
|
|
33912
|
+
transform.onlyInvertedY = function (srcPrj, tgtPrj) {
|
|
33913
|
+
var smatch = srcPrj.match(axisPattern),
|
|
33914
|
+
tmatch = tgtPrj.match(axisPattern);
|
|
33915
|
+
return smatch && tmatch && smatch[1] === tmatch[1] && smatch[3] === tmatch[3];
|
|
33916
|
+
};
|
|
33924
33917
|
/* Expose proj4 to make it easier to debug */
|
|
33925
33918
|
|
|
33926
33919
|
|
|
@@ -38563,6 +38556,17 @@ var util = {
|
|
|
38563
38556
|
|
|
38564
38557
|
return value !== null && value !== undefined && (type === 'object' || type === 'function');
|
|
38565
38558
|
},
|
|
38559
|
+
|
|
38560
|
+
/**
|
|
38561
|
+
* Return the first value passed to the function. Using this function for
|
|
38562
|
+
* identity calls can allow some code to bypass making such a call entirely.
|
|
38563
|
+
*
|
|
38564
|
+
* @param {*} d Any value.
|
|
38565
|
+
* @returns {*} The passed value.
|
|
38566
|
+
*/
|
|
38567
|
+
identityFunction: function identityFunction(d) {
|
|
38568
|
+
return d;
|
|
38569
|
+
},
|
|
38566
38570
|
///////////////////////////////////////////////////////////////////////////
|
|
38567
38571
|
|
|
38568
38572
|
/*
|
|
@@ -39392,6 +39396,8 @@ module.exports = {
|
|
|
39392
39396
|
var inherit = __webpack_require__(5699);
|
|
39393
39397
|
|
|
39394
39398
|
var feature = __webpack_require__(6837);
|
|
39399
|
+
|
|
39400
|
+
var util = __webpack_require__(4634);
|
|
39395
39401
|
/**
|
|
39396
39402
|
* Object specification for a graph feature.
|
|
39397
39403
|
*
|
|
@@ -39518,9 +39524,7 @@ var vectorFeature = function vectorFeature(arg) {
|
|
|
39518
39524
|
y: 0,
|
|
39519
39525
|
z: 0
|
|
39520
39526
|
},
|
|
39521
|
-
delta:
|
|
39522
|
-
return d;
|
|
39523
|
-
},
|
|
39527
|
+
delta: util.identityFunction,
|
|
39524
39528
|
scale: null // size scaling factor (null -> renderer decides)
|
|
39525
39529
|
|
|
39526
39530
|
}, arg.style === undefined ? {} : arg.style);
|
|
@@ -39552,7 +39556,7 @@ module.exports = vectorFeature;
|
|
|
39552
39556
|
* @constant
|
|
39553
39557
|
* @type {string}
|
|
39554
39558
|
*/
|
|
39555
|
-
module.exports = "1.8.
|
|
39559
|
+
module.exports = "1.8.9";
|
|
39556
39560
|
|
|
39557
39561
|
/***/ }),
|
|
39558
39562
|
|
|
@@ -40783,6 +40787,8 @@ var webgl_lineFeature = function webgl_lineFeature(arg) {
|
|
|
40783
40787
|
negStrokeOffset: 0
|
|
40784
40788
|
}],
|
|
40785
40789
|
v = vert[1],
|
|
40790
|
+
target_gcs = m_this.gcs(),
|
|
40791
|
+
map_gcs = m_this.layer().map().gcs(),
|
|
40786
40792
|
pos,
|
|
40787
40793
|
posIdx3,
|
|
40788
40794
|
firstpos,
|
|
@@ -40846,6 +40852,7 @@ var webgl_lineFeature = function webgl_lineFeature(arg) {
|
|
|
40846
40852
|
if (!onlyStyle) {
|
|
40847
40853
|
var position = [],
|
|
40848
40854
|
posFunc = m_this.position();
|
|
40855
|
+
posFunc = posFunc === util.identityFunction ? null : posFunc;
|
|
40849
40856
|
lineItemList = new Array(data.length);
|
|
40850
40857
|
closed = new Array(data.length);
|
|
40851
40858
|
|
|
@@ -40861,7 +40868,7 @@ var webgl_lineFeature = function webgl_lineFeature(arg) {
|
|
|
40861
40868
|
numSegments += lineItem.length - 1;
|
|
40862
40869
|
|
|
40863
40870
|
for (j = 0; j < lineItem.length; j += 1) {
|
|
40864
|
-
pos = posFunc(lineItem[j], j, d, i);
|
|
40871
|
+
pos = posFunc ? posFunc(lineItem[j], j, d, i) : lineItem[j];
|
|
40865
40872
|
position.push(pos.x);
|
|
40866
40873
|
position.push(pos.y);
|
|
40867
40874
|
position.push(pos.z || 0.0);
|
|
@@ -40886,7 +40893,7 @@ var webgl_lineFeature = function webgl_lineFeature(arg) {
|
|
|
40886
40893
|
}
|
|
40887
40894
|
}
|
|
40888
40895
|
|
|
40889
|
-
position = transform.transformCoordinates(
|
|
40896
|
+
position = transform.transformCoordinates(target_gcs, map_gcs, position, 3);
|
|
40890
40897
|
m_origin = new Float32Array(m_this.style.get('origin')(position));
|
|
40891
40898
|
|
|
40892
40899
|
if (m_origin[0] || m_origin[1] || m_origin[2]) {
|
|
@@ -43436,10 +43443,12 @@ var webgl_polygonFeature = function webgl_polygonFeature(arg) {
|
|
|
43436
43443
|
|
|
43437
43444
|
if (!onlyStyle) {
|
|
43438
43445
|
posFunc = m_this.style.get('position');
|
|
43446
|
+
posFunc = posFunc === util.identityFunction ? null : posFunc;
|
|
43439
43447
|
polyFunc = m_this.style.get('polygon');
|
|
43448
|
+
polyFunc = polyFunc === util.identityFunction ? null : polyFunc;
|
|
43440
43449
|
m_this.data().forEach(function (item, itemIndex) {
|
|
43441
43450
|
var polygon, outer, geometry, c;
|
|
43442
|
-
polygon = polyFunc(item, itemIndex);
|
|
43451
|
+
polygon = polyFunc ? polyFunc(item, itemIndex) : item;
|
|
43443
43452
|
|
|
43444
43453
|
if (!polygon) {
|
|
43445
43454
|
return;
|
|
@@ -43458,7 +43467,7 @@ var webgl_polygonFeature = function webgl_polygonFeature(arg) {
|
|
|
43458
43467
|
geometry = new Array(outer.length * 3);
|
|
43459
43468
|
|
|
43460
43469
|
for (i = d3 = 0; i < outer.length; i += 1, d3 += 3) {
|
|
43461
|
-
c = posFunc(outer[i], i, item, itemIndex);
|
|
43470
|
+
c = posFunc ? posFunc(outer[i], i, item, itemIndex) : outer[i];
|
|
43462
43471
|
geometry[d3] = c.x;
|
|
43463
43472
|
geometry[d3 + 1] = c.y; // ignore the z values until we support them
|
|
43464
43473
|
|
|
@@ -43482,7 +43491,7 @@ var webgl_polygonFeature = function webgl_polygonFeature(arg) {
|
|
|
43482
43491
|
geometry.holes.push(d3 / 3);
|
|
43483
43492
|
|
|
43484
43493
|
for (i = 0; i < hole.length; i += 1, d3 += 3) {
|
|
43485
|
-
c = posFunc(hole[i], i, item, itemIndex);
|
|
43494
|
+
c = posFunc ? posFunc(hole[i], i, item, itemIndex) : hole[i];
|
|
43486
43495
|
geometry.vertices[d3] = c.x;
|
|
43487
43496
|
geometry.vertices[d3 + 1] = c.y; // ignore the z values until we support them
|
|
43488
43497
|
|