Created
January 27, 2014 21:35
-
-
Save markmarkoh/8657832 to your computer and use it in GitHub Desktop.
Specifying arcs with different colors in Datamaps.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var paths = [ | |
{ | |
"origin":{"latitude":42.350939,"longitude":-71.05229}, | |
"destination":{"latitude":35.466872,"longitude":139.622747}, | |
"options": {"strokeWidth": 2, "strokeColor": "rgba(0,0,255,0.33)"} | |
}, | |
{ | |
"origin":{"latitude":42.350939,"longitude":-71.05229}, | |
"destination":{"latitude":39.908617,"longitude":19.581969}, | |
"options": {"strokeWidth": 1, "strokeColor": "rgba(0,0,255,0.33)"} | |
} | |
... | |
]; | |
// http://datamaps.github.io |
Hm, that's a fair point.
As for using the fillKey, ah, I hadn't thought to define the arc widths that way! I think that would be really spiffy!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The only problem with that suggestion is that
Isn't that much of an improvement from the already possible:
Thought I think there is room for something like:
Realistically, you are only going to have a few strokeWidths, zero to four or so before the map starts looking bad.