Skip to content
This repository was archived by the owner on Dec 10, 2019. It is now read-only.

Commit 04639fa

Browse files
author
David Bailey
committed
color speeds!
1 parent e1d5d1a commit 04639fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

speeds.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<div id="map" class="map"></div>
1515
<script type="text/javascript">
1616
function speed2color(speed){
17-
h = speed
18-
return Array(255*Math.sin(h),255*Math.sin(h+120),255*Math.sin(h+240),1);
17+
h = 2*3.14*speed/45
18+
return Array(127.5+127.5*Math.sin(h),127.5+127.5*Math.sin(h+120),127.5+127.5*Math.sin(h+240),1);
1919
}
2020
var stops = {{!stops}};
2121
var speeds = {{!speeds}};

0 commit comments

Comments
 (0)