This commit is contained in:
Stuart Lynn 2015-09-09 09:58:08 -04:00
parent b9bcb1b33f
commit e9bde54840
4 changed files with 24 additions and 66 deletions

12
dist/torque.full.js vendored

File diff suppressed because one or more lines are too long

View File

@ -2807,7 +2807,6 @@ L.TorqueLayer = L.CanvasLayer.extend({
var bb = thisValue.bbox;
var xy = this._map.latLngToContainerPoint([bb[1].lat, bb[1].lon]);
if(xy.x < xf && xy.y < yf){
console.log("just before sum value ", this.Value.value)
sum += thisValue.value;
}
}
@ -3435,7 +3434,6 @@ var Profiler = require('../profiler');
if(this.options.is_time) {
column_conv = format("date_part('epoch', {column})", this.options);
}
console.log("columns are ", this.options.countby)
var sql = "" +
"WITH " +
@ -3481,7 +3479,6 @@ var Profiler = require('../profiler');
_sql: this.getSQL()
});
console.log("sql is ", query)
var self = this;
this.sql(query, function (data) {
@ -4257,12 +4254,10 @@ var Profiler = require('../profiler');
.replace('{s}', subdomains[index])
var extra = this._extraParams();
torque.net.get( url + (extra ? "?" + extra: ''), function (data) {
prof_fetch_time.end();
if (data && data.responseText) {
var rows = JSON.parse(data.responseText);
console.log("tile data ", rows)
callback(self.proccessTile(rows, coord, zoom));
} else {
Profiler.metric('torque.provider.windshaft.tile.error').inc();
@ -4527,21 +4522,6 @@ var Profiler = require('../profiler');
}
}
function renderVector(ctx,img,st){
var markerWidth = st['maker-width']
var direction = st['vector-direction']
var mag = st['vector-mag']
var lineWidth = st['marker-line-width']
var strokeStyle = st['marker-line-color']
ctx.lineWidth = lineWidth
ctx.strokeStyle = strokeStyle
ctx.beginPath();
ctx.moveTo(0,0);
ctx.lineTo(300,150);
ctx.stroke();
}
function renderSprite(ctx, img, st) {
if(img.complete){
@ -4897,7 +4877,6 @@ var Filters = require('./torque_filters');
// return the value for x, y (tile coordinates)
// null for no value
getValueFor: function(tile, step, px, py) {
// console.log('getting value for tile ', tile, step, px, py)
var mercator = new torque.Mercator();
var res = this.options.resolution;
var res2 = res >> 1;
@ -4908,15 +4887,15 @@ var Filters = require('./torque_filters');
var pixelIndex = tile.timeIndex[step];
for(var p = 0; p < activePixels; ++p) {
var posIdx = tile.renderDataPos[pixelIndex + p];
var c = [tile.renderData[0][pixelIndex + p], tile.renderData[1][pixelIndex + p]]
// console.log("tile.renderData ", tile.renderData[pixelIndex + p] )
var c =tile.renderData.map(function(r){ return r[pixelIndex + p]})
if (c) {
var x = tile.x[posIdx];
var y = tileMax - tile.y[posIdx];
var dx = px + res2 - x;
var dy = py + res2 - y;
if (dx >= 0 && dx < res && dy >= 0 && dy < res) {
// console.log('returning value ', c, " from ", tile.renderData[pixelIndex + p])
return {
value: c,
bbox: mercator.tilePixelBBox(

4
dist/torque.js vendored

File diff suppressed because one or more lines are too long

View File

@ -2814,7 +2814,6 @@ L.TorqueLayer = L.CanvasLayer.extend({
var bb = thisValue.bbox;
var xy = this._map.latLngToContainerPoint([bb[1].lat, bb[1].lon]);
if(xy.x < xf && xy.y < yf){
console.log("just before sum value ", this.Value.value)
sum += thisValue.value;
}
}
@ -3442,7 +3441,6 @@ var Profiler = require('../profiler');
if(this.options.is_time) {
column_conv = format("date_part('epoch', {column})", this.options);
}
console.log("columns are ", this.options.countby)
var sql = "" +
"WITH " +
@ -3488,7 +3486,6 @@ var Profiler = require('../profiler');
_sql: this.getSQL()
});
console.log("sql is ", query)
var self = this;
this.sql(query, function (data) {
@ -4264,12 +4261,10 @@ var Profiler = require('../profiler');
.replace('{s}', subdomains[index])
var extra = this._extraParams();
torque.net.get( url + (extra ? "?" + extra: ''), function (data) {
prof_fetch_time.end();
if (data && data.responseText) {
var rows = JSON.parse(data.responseText);
console.log("tile data ", rows)
callback(self.proccessTile(rows, coord, zoom));
} else {
Profiler.metric('torque.provider.windshaft.tile.error').inc();
@ -4534,21 +4529,6 @@ var Profiler = require('../profiler');
}
}
function renderVector(ctx,img,st){
var markerWidth = st['maker-width']
var direction = st['vector-direction']
var mag = st['vector-mag']
var lineWidth = st['marker-line-width']
var strokeStyle = st['marker-line-color']
ctx.lineWidth = lineWidth
ctx.strokeStyle = strokeStyle
ctx.beginPath();
ctx.moveTo(0,0);
ctx.lineTo(300,150);
ctx.stroke();
}
function renderSprite(ctx, img, st) {
if(img.complete){
@ -4904,7 +4884,6 @@ var Filters = require('./torque_filters');
// return the value for x, y (tile coordinates)
// null for no value
getValueFor: function(tile, step, px, py) {
// console.log('getting value for tile ', tile, step, px, py)
var mercator = new torque.Mercator();
var res = this.options.resolution;
var res2 = res >> 1;
@ -4915,15 +4894,15 @@ var Filters = require('./torque_filters');
var pixelIndex = tile.timeIndex[step];
for(var p = 0; p < activePixels; ++p) {
var posIdx = tile.renderDataPos[pixelIndex + p];
var c = [tile.renderData[0][pixelIndex + p], tile.renderData[1][pixelIndex + p]]
// console.log("tile.renderData ", tile.renderData[pixelIndex + p] )
var c =tile.renderData.map(function(r){ return r[pixelIndex + p]})
if (c) {
var x = tile.x[posIdx];
var y = tileMax - tile.y[posIdx];
var dx = px + res2 - x;
var dy = py + res2 - y;
if (dx >= 0 && dx < res && dy >= 0 && dy < res) {
// console.log('returning value ', c, " from ", tile.renderData[pixelIndex + p])
return {
value: c,
bbox: mercator.tilePixelBBox(