Third-Party APIs and Integration

Naufal
HappyFresh Fleet Tracker
3 min readNov 21, 2019
Google Maps, a geolocation API used in HappyFresh Fleet Tracker

In the HappyFresh Fleet Tracker project, one of the main component used in the front-end stack is the Google Maps API. The geolocation service provided by Google comes with its own set of edges and drawbacks compared to its competitors, and choosing the correct third-party service is an important decision to ensure that the project meets the demand of the requirement.

In this article, I’d like to talk about the decision process of the team regarding the choice of third-party APIs and how it influences the end-product.

Meeting the Requirements

When considering the service and products that will be used to develop a project, above all else, the requirement demand of the client must be ensured to be met.

One of the main feature of the HappyFresh Fleet Tracker is the estimated route display within the map, showing the most efficient path within a given time and traffic condition.

Market share between mapping APIs (http://www.datanyze.com)

Despite the price differences between each mapping and GIS (Geographic Information System) API available on the market, there’s simply no competition to the traffic coverage that Google Maps provides in Indonesia. Thus, our decision on the library used is made.

Usability over Popularity

Picking a service based on its large userbase might seem tempting; and with the availability of issue trackers such as stackoverflow, it’s almost alluring to dive straight into developing as most of the hard work is done by other users.

However, the more obscure libraries might provide a more concise and rich documentation, or better fits the needs of the current project. This is the case we faced when we first made the decision to pick Mapbox as the mapping API in our first iteration of front-end development.

Mapbox, an alternative GIS service to Google Maps

With a much more affordable package plans and a robust library featuring customizable components, Mapbox seemed like a very capable alternative to the much more popular Google Maps. Unfortunately, one of the key features that HappyFresh needs from the project is an accurate representation of the traffic in Jakarta. This leads to the switch to Google Maps, with the service provided by HappyFresh.

The Importance of Documentation

This might be a slight segway from the topic of HappyFresh Fleet Tracker; but it is an important aspect of APIs or programming nonetheless.

The very main purpose of an API is to ease the use of a service or product, providing a simple, encapsulated interface which could easily be implemented to a foreign system, however complex it might be. The issue rises when the documentation, or lack thereof, provides a poor or outdated explanation of the interface presented. This seemingly minute problem could affect the rate at which the particular API is implemented onto a different system, bottle-necking a potentially excellent interface with intricate explanation and/or lack of guidance.

An example of bad documentation, courtesy of author’s experience

It’s been truly a worthwhile experience exploring and trying out the various third-party mapping APIs available in the market. It shows the important aspects when choosing a service on a deeper level.

With a slight out-of-topic discussion here and there, it’s been fun writing this article, and I thank you for reading!

--

--