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

Commit

Permalink
color speeds!
Browse files Browse the repository at this point in the history
  • Loading branch information
David Bailey committed Oct 9, 2015
1 parent e1d5d1a commit 04639fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions speeds.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<div id="map" class="map"></div>
<script type="text/javascript">
function speed2color(speed){
h = speed
return Array(255*Math.sin(h),255*Math.sin(h+120),255*Math.sin(h+240),1);
h = 2*3.14*speed/45
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);
}
var stops = {{!stops}};
var speeds = {{!speeds}};
Expand Down

0 comments on commit 04639fa

Please sign in to comment.