mapjs.append(" weight: 2,\n");
mapjs.append(" opacity: 0.5,\n");
/* encode first point */
mapjs.append(" points: \"");
Trkpt previous;
Trkpt current = pts[start];
format.asGPolylineCoordinate(current.getLat(), null, mapjs);
format.asGPolylineCoordinate(current.getLon(), null, mapjs);
stop = start + 100;
if (len <= stop) {
stop = len;
}
/* encode other points */
for (int i = start + 1; i < stop; i++) {
previous = current;
current = pts[i];
format.asGPolylineCoordinate(current.getLat(),
previous.getLat(), mapjs);
format.asGPolylineCoordinate(current.getLon(),
previous.getLon(), mapjs);
}
mapjs.append("\",\n");