Beginning Development
Explore foundational development for the AppyMapper app by working with Ionic services that calculate distances using geographic coordinates and handle data sourcing from JSON files or Ionic Storage. Understand how to implement location-based logic and storage management to support interactive mapping features.
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.tsservice - The
src/app/services/manager.service.tsservice - The
src/app/services/places.service.tsservice - The
src/app/services/storage.service.tsservice
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 ...