Beginning Development

Start developing the Appy Mapper app by creating the DistancesService and ManagerService services.

Let’s make a start on the actual development!

A good place to start would be with our recently created services:

  • The src/app/services/distances.service.ts service
  • The src/app/services/manager.service.ts service
  • The src/app/services/places.service.ts service
  • The src/app/services/storage.service.ts service

These form the backbone for the logic of the appy-mapper application, so what better place to start coding than with these?

Are we there yet?

Our first service, src/app/services/distances.service.ts, handles the required logic for calculating the Apple Store nearest to a user’s location. This does assume that the user is located in one of the following countries, or very close:

  • Belgium
  • France
  • Germany
  • Netherlands
  • the United Kingdom

If the user happens to be somewhere completely different, then the logic won’t be able to find an Apple Store (or Stores) nearest to their current location due to the data set being used!

Amendments to distances.service.ts

With that said, let’s look at the logic used to calculate the nearest store(s) based on range or location (amendments highlighted):

Get hands-on with 1200+ tech skills courses.