modifies navy example
This commit is contained in:
parent
d2e78b17a1
commit
1a13ce35ed
@ -1,3 +1,4 @@
|
||||
<meta charset = "utf-8">
|
||||
<html>
|
||||
<link rel="stylesheet" href="vendor/leaflet.css" />
|
||||
<style>
|
||||
@ -16,33 +17,27 @@
|
||||
// define the torque layer style using cartocss
|
||||
var CARTOCSS = [
|
||||
'Map {',
|
||||
'-torque-time-attribute: "date";',
|
||||
'-torque-time-attribute: "cartodb_id";',
|
||||
'-torque-aggregation-function: "count(cartodb_id)";',
|
||||
'-torque-frame-count: 760;',
|
||||
'-torque-animation-duration: 15;',
|
||||
'-torque-resolution: 2',
|
||||
'-torque-frame-count: 1;',
|
||||
'-torque-animation-duration: 1;',
|
||||
'-torque-resolution: 64;',
|
||||
'}',
|
||||
'#layer {',
|
||||
' marker-width: 3;',
|
||||
' marker-fill-opacity: 0.8;',
|
||||
' marker-fill: #FEE391; ',
|
||||
' comp-op: "lighten";',
|
||||
' [value > 2] { marker-fill: #FEC44F; }',
|
||||
' [value > 3] { marker-fill: #FE9929; }',
|
||||
' [value > 4] { marker-fill: #EC7014; }',
|
||||
' [value > 5] { marker-fill: #CC4C02; }',
|
||||
' [value > 6] { marker-fill: #993404; }',
|
||||
' [value > 7] { marker-fill: #662506; }',
|
||||
' [frame-offset = 1] { marker-width: 10; marker-fill-opacity: 0.05;}',
|
||||
' [frame-offset = 2] { marker-width: 15; marker-fill-opacity: 0.02;}',
|
||||
'-isoline-line-ramp: colorize-alpha(lightblue, orange);',
|
||||
// '-isoline-line-opacity: 1;',
|
||||
// '-isoline-line-color: white;',
|
||||
'-isoline-line-width: 2;',
|
||||
'-isoline-line-decay: true;',
|
||||
'-isoline-mode: isoband;',
|
||||
'}'
|
||||
].join('\n');
|
||||
|
||||
|
||||
var map = new L.Map('map', {
|
||||
zoomControl: true,
|
||||
center: [40, 0],
|
||||
zoom: 3
|
||||
center: [41.36031866306708, -73.388671875],
|
||||
zoom: 4
|
||||
});
|
||||
|
||||
L.tileLayer('http://{s}.api.cartocdn.com/base-dark/{z}/{x}/{y}.png', {
|
||||
@ -50,8 +45,8 @@
|
||||
}).addTo(map);
|
||||
|
||||
var torqueLayer = new L.TorqueLayer({
|
||||
user : 'viz2',
|
||||
table : 'ow',
|
||||
user : 'fdansv',
|
||||
table : 'snow',
|
||||
cartocss: CARTOCSS
|
||||
});
|
||||
torqueLayer.error(function(err){
|
||||
|
Loading…
Reference in New Issue
Block a user