From 413b71554031c2cdfb61f2aec104bc1220d25ffd Mon Sep 17 00:00:00 2001 From: David Levinsky Date: Tue, 2 May 2017 14:43:42 +0200 Subject: [PATCH] fixed geodata --- src/core/inspector/input.js | 3 ++- src/core/map/draw-tiles.js | 4 ++++ .../map/geodata-processor/worker-linestring.js | 14 ++++++++------ .../map/geodata-processor/worker-pointarray.js | 12 +++++++----- src/core/renderer/draw.js | 4 ++-- 5 files changed, 23 insertions(+), 14 deletions(-) diff --git a/src/core/inspector/input.js b/src/core/inspector/input.js index 5c42ce55..dc2d6b1f 100755 --- a/src/core/inspector/input.js +++ b/src/core/inspector/input.js @@ -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; diff --git a/src/core/map/draw-tiles.js b/src/core/map/draw-tiles.js index 7d85b527..5f9d3cca 100755 --- a/src/core/map/draw-tiles.js +++ b/src/core/map/draw-tiles.js @@ -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) { diff --git a/src/core/map/geodata-processor/worker-linestring.js b/src/core/map/geodata-processor/worker-linestring.js index 62cc2490..72674c34 100755 --- a/src/core/map/geodata-processor/worker-linestring.js +++ b/src/core/map/geodata-processor/worker-linestring.js @@ -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); @@ -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]; + } } } diff --git a/src/core/map/geodata-processor/worker-pointarray.js b/src/core/map/geodata-processor/worker-pointarray.js index 944a1b9c..eed70406 100755 --- a/src/core/map/geodata-processor/worker-pointarray.js +++ b/src/core/map/geodata-processor/worker-pointarray.js @@ -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]; + } } } } diff --git a/src/core/renderer/draw.js b/src/core/renderer/draw.js index efa9f71a..6222c18b 100755 --- a/src/core/renderer/draw.js +++ b/src/core/renderer/draw.js @@ -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; } }