moveMarker.setMoveListener(new SmoothMoveMarker.MoveListener() {
@Override
public void move(final double distance) {
runOnUiThread(new Runnable() {
@Override
public void run() {
pointsList.add(new LatLng(moveMarker.getPosition().latitude,
moveMarker.getPosition().longitude));
aMap.addPolyline(new PolylineOptions()
.setCustomTexture(BitmapDescriptorFactory.
fromResource(R.drawable.custtexture))
.addAll(pointsList)
.useGradient(true)
.visible(true)
.width(20));
if (distance == 0) {
moveMarker.getMarker().hideInfoWindow();
mMarkerStatus = FINISH_STATUS;
mStartButton.setText("开始");
}
}
});
}
});