Skip to content

Commit

Permalink
fixed geodata
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmtech committed May 2, 2017
1 parent 9c6ac20 commit 413b715
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 14 deletions.
3 changes: 2 additions & 1 deletion src/core/inspector/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,14 @@ InspectorInput.prototype.onKeyUp = function(event, press) {
}

var map = this.core.getMap();
var debug = map.draw.debug;
var inspector = this.inspector;

if (map == null) {
return;
}

var debug = map.draw.debug;

this.altDown = event.altKey;
this.ctrlDown = event.ctrlKey;
this.shiftDown = event.shiftKey;
Expand Down
4 changes: 4 additions & 0 deletions src/core/map/draw-tiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,10 @@ MapDrawTiles.prototype.getTileTextureTransform = function(sourceTile, targetTile
MapDrawTiles.prototype.updateTileSurfaceBounds = function(tile, submesh, surface, bound, fullUpdate) {
var path, extraBound, layer, texture;

if (tile.id[0] == 18 && tile.id[1] == 70930 && tile.id[2] == 44286) {
tile = tile;
}

//search map view
if (surface.boundLayerSequence.length > 0) {
if (fullUpdate) {
Expand Down
14 changes: 8 additions & 6 deletions src/core/map/geodata-processor/worker-linestring.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var processLineStringPass = function(lineString, lod, style, zIndex, eventInfo)
return;
}

var dlines = (lineString['lines']) ? true : false;
var dlines = (lineString['d-lines']) ? true : false;
var line = getLayerPropertyValue(style, 'line', lineString, lod);
var lineLabel = getLayerPropertyValue(style, 'line-label', lineString, lod);

Expand Down Expand Up @@ -503,11 +503,13 @@ var processLineStringPass = function(lineString, lod, style, zIndex, eventInfo)
lineLabelPoints2[li - i - 1] = p;
}

if (dlines) {
p2 = points[i+1];
p1 = [p1[0] + p2[0], p1[1] + p2[1], p1[2] + p2[2]];
} else {
p1 = points[i+1];
if ((i + 1) < li) {
if (dlines) {
p2 = points[i+1];
p1 = [p1[0] + p2[0], p1[1] + p2[1], p1[2] + p2[2]];
} else {
p1 = points[i+1];
}
}
}

Expand Down
12 changes: 7 additions & 5 deletions src/core/map/geodata-processor/worker-pointarray.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,13 @@ var processPointArrayPass = function(pointArray, lod, style, zIndex, eventInfo)
}
}

if (dpoints) {
var p2 = points[i+1];
p1 = [p1[0] + p2[0], p1[1] + p2[1], p1[2] + p2[2]];
} else {
p1 = points[i+1];
if ((i + 1) < li) {
if (dpoints) {
var p2 = points[i+1];
p1 = [p1[0] + p2[0], p1[1] + p2[1], p1[2] + p2[2]];
} else {
p1 = points[i+1];
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/renderer/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -661,12 +661,12 @@ RendererDraw.prototype.drawGpuJobs = function() {
if (onlyHitLayers) {
for (j = 0; j < lj; j++) {
if (buffer[j].hitable) {
this.drawGpuJob(gpu, gl, this, buffer[j], screenPixelSize);
this.drawGpuJob(gpu, gl, renderer, buffer[j], screenPixelSize);
}
}
} else {
for (j = 0; j < lj; j++) {
this.drawGpuJob(gpu, gl, this, buffer[j], screenPixelSize);
this.drawGpuJob(gpu, gl, renderer, buffer[j], screenPixelSize);
//buffer[j] = null;
}
}
Expand Down

0 comments on commit 413b715

Please sign in to comment.