fix: Revert an optimization that caused a problem
MODIFY
src/webgl/lineFeature.js
src/webgl/lineFeature.js
@@ -136,7 +136,6 @@ var webgl_lineFeature = function (arg) {
v = vert[1],
target_gcs = m_this.gcs(),
map_gcs = m_this.layer().map().gcs(),
- simpleInverse = transform.onlyInvertedY(target_gcs, map_gcs),
pos, posIdx3, firstpos, firstPosIdx3,
lineFunc = m_this.line(),
strokeWidthFunc = m_this.style.get('strokeWidth'), strokeWidthVal,
@@ -192,7 +191,7 @@ var webgl_lineFeature = function (arg) {
for (j = 0; j < lineItem.length; j += 1) {
pos = posFunc ? posFunc(lineItem[j], j, d, i) : lineItem[j];
position.push(pos.x);
- position.push(simpleInverse ? -pos.y : pos.y);
+ position.push(pos.y);
position.push(pos.z || 0.0);
if (!j) {
firstpos = pos;
@@ -212,9 +211,7 @@ var webgl_lineFeature = function (arg) {
}
}
- if (!simpleInverse) {
position = transform.transformCoordinates(target_gcs, map_gcs, position, 3);
- }
m_origin = new Float32Array(m_this.style.get('origin')(position));
if (m_origin[0] || m_origin[1] || m_origin[2]) {
for (i = 0; i < position.length; i += 3) {

MODIFY
src/webgl/polygonFeature.js
src/webgl/polygonFeature.js
@@ -82,7 +82,6 @@ var webgl_polygonFeature = function (arg) {
items = [],
target_gcs = m_this.gcs(),
map_gcs = m_this.layer().map().gcs(),
- simpleInverse = transform.onlyInvertedY(target_gcs, map_gcs),
numPts = 0,
geom = m_mapper.geometryData(),
color, opacity, fill, d, d3, vertices, i, j, k, n,
@@ -120,7 +119,7 @@ var webgl_polygonFeature = function (arg) {
for (i = d3 = 0; i < outer.length; i += 1, d3 += 3) {
c = posFunc ? posFunc(outer[i], i, item, itemIndex) : outer[i];
geometry[d3] = c.x;
- geometry[d3 + 1] = simpleInverse ? -c.y : c.y;
+ geometry[d3 + 1] = c.y;
// ignore the z values until we support them
geometry[d3 + 2] = 0; // c.z || 0;
}
@@ -137,7 +136,7 @@ var webgl_polygonFeature = function (arg) {
for (i = 0; i < hole.length; i += 1, d3 += 3) {
c = posFunc ? posFunc(hole[i], i, item, itemIndex) : hole[i];
geometry.vertices[d3] = c.x;
- geometry.vertices[d3 + 1] = simpleInverse ? -c.y : c.y;
+ geometry.vertices[d3 + 1] = c.y;
// ignore the z values until we support them
geometry.vertices[d3 + 2] = 0; // c.z || 0;
}
@@ -145,14 +144,12 @@ var webgl_polygonFeature = function (arg) {
}
// transform to map gcs
- if (!simpleInverse) {
geometry.vertices = transform.transformCoordinates(
target_gcs,
map_gcs,
geometry.vertices,
geometry.dimensions
);
- }
record = {
// triangulate

fix: Revert an optimization that caused a problem