Functionality to add points to trail from popup button click.