0

I am trying to plot some color code (only 3 colors by the moment) cars in my map instead the regular color code points. I am using torque cat to do it, but all the time the car is in black!, I need some help. This is my code:

/** torque_cat visualization */

Map {
  -torque-frame-count:64;
  -torque-animation-duration:1;
  -torque-time-attribute:"date";
  -torque-aggregation-function:"CDB_Math_Mode(torque_category)";
  -torque-resolution:2;
  -torque-data-aggregation:linear;
}

#untitled_table_1{
  comp-op: lighter;
  marker-fill-opacity: 0.9;
  marker-line-color: #FFF;
  marker-line-width: 0;
  marker-line-opacity: 1;
  marker-type: ellipse;
  marker-width: 6;
  marker-fill: #FF9900;
  marker-file: url(http://www.clipartbest.com/cliparts/nTX/AGX/nTXAGXyTB.svg);  
}

#untitled_table_1[value=1] {
  marker-fill: #B81609;
}
#untitled_table_1[value=2] {
 marker-fill: #012700;
}
#untitled_table_1[value=3] {
  marker-fill: #7B00B4;
}
2

torque does not support marker-file and marker-fill at the same time, in other words, you can not color a sprite using marker fill.

The workaround is to have an sprite per color.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.