Skip to content

Displaying distances and distance calculations #22

@markahon

Description

@markahon

Do these, if user location is set:

Calculations

  1. calculate direct (i.e. approximate) distance using Google Maps Geometry library -> computeDistanceBetween() DONE
  2. For highest ranked (i.e. cheapest / nearest) n stations, get more accurate driving distance using Google Maps Directions API

Storing results

  1. Store type of distance data (i.e. direct "as crow flies" or driving distance), use 1 decimal (=100m) accuracy DONE
  2. Store to user data at what location distances where last calculated. Since we follow user location changes --> re-calculate distances if user location has changed from that e.g. by 50 meters (to avoid unnecessary calculations)

Displaying distances

  1. Display distance in list view and in station details views DONE
  2. Display appropriate indicator for distance type (e.g. car-icon for driving distance, aeroplane/bird-icon? for direct distance) DONE

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions