Skip to content

Commit

Permalink
Merge pull request #37 from DavidLevinsky/master
Browse files Browse the repository at this point in the history
Fixed geodata
  • Loading branch information
davidmtech authored May 2, 2017
2 parents d4ab924 + 8be6921 commit 6065032
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vts-browser-js",
"version": "2.1.5",
"version": "2.1.6",
"description": "JavaScript WebGL 3D maps rendering engine",
"main": "src/browser/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/core/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ string getCoreVersion()
*/

function getCoreVersion(full) {
return (full ? 'Core: ' : '') + '2.1.5';
return (full ? 'Core: ' : '') + '2.1.6';
}


Expand Down
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 6065032

Please sign in to comment.