minor edits to provider
This commit is contained in:
parent
4854bfd9e0
commit
0ac6c7890d
12
dist/torque.full.js
vendored
12
dist/torque.full.js
vendored
File diff suppressed because one or more lines are too long
6
dist/torque.full.uncompressed.js
vendored
6
dist/torque.full.uncompressed.js
vendored
@ -4254,7 +4254,7 @@ var Profiler = require('../profiler');
|
||||
+ tileBounds.minLng.toFixed(3)
|
||||
+ " latitude > " + tileBounds.minLat.toFixed(3)
|
||||
+ " longitude < " + tileBounds.maxLng.toFixed(3)
|
||||
+ " latitude < " + tileBounds.maxLat.toFixed(3) + "| bucket _time span=" + self.span + " | eval lat = floor(('latitude' + 90.000000) / " + self.latspan + " ) | eval lon = floor(('longitude' + 180.000000) / " + self.lonspan + ") | eval latlon = lat.\"-\".lon | chart count by latlon,_time limit=256"
|
||||
+ " latitude < " + tileBounds.maxLat.toFixed(3) + "| bucket _time span=" + self.span + " | eval lat = floor(('latitude' + 90.000000) / " + self.latspan + " ) | eval lon = floor(('longitude' + 180.000000) / " + self.lonspan + ") | eval latlon = lat.\"-\".lon | chart count by latlon,_time limit=128"
|
||||
});
|
||||
|
||||
self.managers[coord.zoom + "_" + coord.x + "_" + coord.y].data("results", {count: 0, output_mode: 'json_rows'}).on("data", function (results) {
|
||||
@ -4262,9 +4262,11 @@ var Profiler = require('../profiler');
|
||||
|
||||
callback(results.data());
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
console.log('Starting Search for ' + coord.zoom + "_" + coord.x + "_" + coord.y);
|
||||
self.managers[coord.zoom + "_" + coord.x + "_" + coord.y].startSearch();
|
||||
|
||||
|
||||
|
4
dist/torque.js
vendored
4
dist/torque.js
vendored
File diff suppressed because one or more lines are too long
6
dist/torque.uncompressed.js
vendored
6
dist/torque.uncompressed.js
vendored
@ -4254,7 +4254,7 @@ var Profiler = require('../profiler');
|
||||
+ tileBounds.minLng.toFixed(3)
|
||||
+ " latitude > " + tileBounds.minLat.toFixed(3)
|
||||
+ " longitude < " + tileBounds.maxLng.toFixed(3)
|
||||
+ " latitude < " + tileBounds.maxLat.toFixed(3) + "| bucket _time span=" + self.span + " | eval lat = floor(('latitude' + 90.000000) / " + self.latspan + " ) | eval lon = floor(('longitude' + 180.000000) / " + self.lonspan + ") | eval latlon = lat.\"-\".lon | chart count by latlon,_time limit=256"
|
||||
+ " latitude < " + tileBounds.maxLat.toFixed(3) + "| bucket _time span=" + self.span + " | eval lat = floor(('latitude' + 90.000000) / " + self.latspan + " ) | eval lon = floor(('longitude' + 180.000000) / " + self.lonspan + ") | eval latlon = lat.\"-\".lon | chart count by latlon,_time limit=128"
|
||||
});
|
||||
|
||||
self.managers[coord.zoom + "_" + coord.x + "_" + coord.y].data("results", {count: 0, output_mode: 'json_rows'}).on("data", function (results) {
|
||||
@ -4262,9 +4262,11 @@ var Profiler = require('../profiler');
|
||||
|
||||
callback(results.data());
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
console.log('Starting Search for ' + coord.zoom + "_" + coord.x + "_" + coord.y);
|
||||
self.managers[coord.zoom + "_" + coord.x + "_" + coord.y].startSearch();
|
||||
|
||||
|
||||
|
@ -364,7 +364,7 @@
|
||||
+ tileBounds.minLng.toFixed(3)
|
||||
+ " latitude > " + tileBounds.minLat.toFixed(3)
|
||||
+ " longitude < " + tileBounds.maxLng.toFixed(3)
|
||||
+ " latitude < " + tileBounds.maxLat.toFixed(3) + "| bucket _time span=" + self.span + " | eval lat = floor(('latitude' + 90.000000) / " + self.latspan + " ) | eval lon = floor(('longitude' + 180.000000) / " + self.lonspan + ") | eval latlon = lat.\"-\".lon | chart count by latlon,_time limit=256"
|
||||
+ " latitude < " + tileBounds.maxLat.toFixed(3) + "| bucket _time span=" + self.span + " | eval lat = floor(('latitude' + 90.000000) / " + self.latspan + " ) | eval lon = floor(('longitude' + 180.000000) / " + self.lonspan + ") | eval latlon = lat.\"-\".lon | chart count by latlon,_time limit=128"
|
||||
});
|
||||
|
||||
self.managers[coord.zoom + "_" + coord.x + "_" + coord.y].data("results", {count: 0, output_mode: 'json_rows'}).on("data", function (results) {
|
||||
@ -372,9 +372,11 @@
|
||||
|
||||
callback(results.data());
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
console.log('Starting Search for ' + coord.zoom + "_" + coord.x + "_" + coord.y);
|
||||
self.managers[coord.zoom + "_" + coord.x + "_" + coord.y].startSearch();
|
||||
|
||||
|
||||
|
@ -1,25 +0,0 @@
|
||||
// Pseudocode for Splunk/Torque
|
||||
// Torque.js calls getTileData() for each visible tile on the screen
|
||||
// getTileData will build and execute an API call,
|
||||
// transform the results into a valid torque tile
|
||||
|
||||
function getTileData() {
|
||||
//3 things we need to build a splunk query for a given tile:
|
||||
bounds = boundsFromTile();
|
||||
|
||||
binspan = (bounds.maxLon-bounds.minLon)/numberOfGeobins;
|
||||
|
||||
timespan = totalTimeRange/numberOfTimebins;
|
||||
|
||||
query = assembleQuery();
|
||||
//search source="earthquake2.csv" lat>-85.05112877980659 lat<85.0511287798066 lon>-180 lon<180| bucket _time span=1010384s | geostats count by _time maxzoomlevel=0 globallimit=128 binspanlat=1.40625 binspanlong=2.8125
|
||||
|
||||
ajaxPOST(query, function(geobins){ //gets raw data from splunk
|
||||
|
||||
torqueTile = parseData(geobins); //iterates over each geobin, converts lat/lon centroid to Tile XY, converts UNIX timestamp into step number, outputs a valid torque tile as would be returned by cartoDB
|
||||
|
||||
processTile(torqueTile); //processTile animates the tile data with torque & canvas
|
||||
|
||||
});
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user