Open GoogleCodeExporter opened 9 years ago
Sorry there is a mistake in the code snipped:
in the last else it should be "return (Integer)ev.evaluate((float)(speed -
trackPathDescriptor.getNormalSpeed()) / (float)speed, normalColor2,
fastColor);" instead of "return (Integer)ev.evaluate((float)(speed -
trackPathDescriptor.getSlowSpeed()) / (float)speed, normalColor2, fastColor);"
Original comment by radian.p...@gmail.com
on 30 Oct 2013 at 12:27
Hi,
I developed the initial implementation of the colored tracks and later wished
too to implement a grandient option (as a replacement or as an alternative view
for colored tracks). (Unluckily didnt had the time later).
I just saw your suggestion (thanks for the grandient logic ^^) and would like
to give you two tips:
1-If you want the mytracks team to include your code suggestions you have to
follow the development guide:
https://code.google.com/p/mytracks/wiki/DevelopmentProcess (Altought it says
deprecated, its the one i followed to submit code suggestions)
2- Could you try a new build with the following optimizations over your code
and report back if it loads faster?
protected int getColor(int speed) {
int slowsSpeed = trackPathDescriptor.getSlowSpeed();
if (speed <= slowsSpeed) {
ArgbEvaluator ev = new ArgbEvaluator();
return (Integer)ev.evaluate((float)speed/(float)slowsSpeed, slowColor, normalColor);
//return slowColor;
}
int normalSpeed = trackPathDescriptor.getNormalSpeed()
if (speed <= normalSpeed) {
ArgbEvaluator ev = new ArgbEvaluator();
return (Integer)ev.evaluate((float)(speed - (float)slowsSpeed) / (float)normalSpeed, normalColor, normalColor2);
//return normalColor;
} else {
ArgbEvaluator ev = new ArgbEvaluator();
return (Integer)ev.evaluate((float)(speed - normalSpeed) / (float)speed, normalColor2, fastColor);
//return fastColor;
}
}
Original comment by ase...@gmail.com
on 28 Jun 2014 at 4:26
Thanks for the code. We will give it a try. If it is too slow, we will wait
till the map view api provides ability to do this.
Original comment by jshih@google.com
on 14 Oct 2014 at 8:19
any progress on this?
Original comment by radian.p...@gmail.com
on 23 Dec 2014 at 3:57
Original issue reported on code.google.com by
radian.p...@gmail.com
on 30 Oct 2013 at 12:25