Geolocation

What is an API?

APIs, or application programming interfaces are mechanisms that allow two software components to communicate with each other using a set of definitions and protocols.

Some Types of APIs:

Public APIs: Open and available for use by any outside developer or business.
Partner APIs: Only available to specifically selected and authorized outside developers or API consumers.
Internal APIs: Or private APIs are intended only for use within an enterprise to connect systems and data within the business. An example of an internal API might connect an organization's payroll and HR systems.

APIs make it easier for developers to integrate various services and functionalities into their own applications and websites without having to recreate everything from scratch.

A Web API is an application processing interface between a web server and web browser. All web services are APIs but not all APIs are web services.

What is Geolocation?

Geolocation is an API that has the ability to track a device's whereabouts using GPS, cell phone towers, WiFi, or a combination of these. Using positioning systems, geolocation can track a devices whereabouts down to latitude and longitude coordinates. This can be used by both mobile and desktop devices.

What does it do?

The Geolocation API is a service that accepts an HTTPS request with the cell tower and WiFi access points that a mobile client can detect. It returns latitude/longitude coordinates and a radius indicating the accuracy of the result for each valid input. This API is a web-based tool that enables a webpage or web application to access the geographical location data of a user's device. This data is typically gathered through the device's GPS, Wi-Fi, or cellular network connection. The API offers a straightforward interface for developers to request the user's location and receive a response that includes latitude and longitude coordinates, along with an accuracy estimate in meters.

This API is a component of the W3C Geolocation API Specification, which establishes a standard method for web browsers to retrieve location information from a user's device. It is compatible with most contemporary web browsers, such as Chrome, Firefox, Safari, and Edge.

Why would you use it?

Geolocation serves in a multitude of contexts. The government and police use it for security purposes, such as unmanned aerial vehicles (UAVs) or ankle bracelets, which — when you think about the fact that neither type of data collection is precise — raises some unsettling implications. But, on the lighter side, some companies use it to change the way we play games by combining it with augmented reality (interacting with virtual elements based on geolocation), like Ingress and Pokémon Go. It opens up the possibility for reviving Where in the World is Carmen Sandiego, Where’s Waldo, or even The Oregon Trail.

We use geolocation to plot courses, track elevation changes, see location history, find nearby tire shops, tag images on social media, check in to places, get the local weather, etc. We also use it every day to make our lives easier, to interact with other people, to solve problems, to set goals, to track anything.

Geolocation is so much a part of our lives already, and companies are sure to keep harnessing it to improve our online experiences:

  • A delivery food chain could use it for potential expansion by seeing how many people from a city or region visit its website.
  • A hospital network could provide its closest emergency room to website visitors based on their locations.
  • A global company could redirect all country-specific website visitors to country-specific pages.
  • A city tourism organization could display location-based content depending on where website visitors are in the city.

Whatever the purpose, companies will continue to use geolocation to improve their websites or marketing. As technology improves, the visitor engagement can only increase, making each visit more meaningful and effective than the last, simply based on a little thing like location.

Where would you use it?

Using Geolocation to Play Games in the Great Outdoors

Anywhere people want to play

In 2016, many people may have never heard the term geolocation, but geolocated games burst onto the scene with the explosive popularity of Pokemon GO.

Geolocation allows people to embark upon virtual treasures hunts searching for characters that are in placed in the user's location.

Most, if not all, of these types of games rely on the use of mobile phones, and make use of geotagged locations (or features for which geographical identification metadata has been added). These geotagged locations and then placed inside a map interface with which the player interacts.

Other games that take advantage of geolocation APIs include Pikmin Bloom, Catan: World Explorers, Minecraft Earth, and Let's Hunt Monsters.

Anywhere a package needs to be delivered

It is no secret that since the start of the COVID-19 pandemic in 2020, delivery services have become an integral part of most peoples' lives.

Geolocation is leveraged heavily in the delivery of all sorts of packages. An armada of Amazon, UPS, FedEx vehicles are engaged in a race against time to deliver all sorts of goods as quickly, safely, and efficiently as possible.

Geolocation data is used to determine the most efficient routes, and enable drivers to avoid potentially dangerous traffic situations. Geolocation APIs also allow fleet services to collect a wide selection of diagnostics such as mileage, speed, and engine health, thereby limiting downtime per vehicle.

Anywhere crowds gather

Governments and organisations have long sought to develop tools that prevent and manage emergency situations.

Crowd rushes, such as the Itaewon disaster in Seoul or the Kanjuruhan Stadium disaster in Indonesia, both in 2022, are a massive concern anytime large crowds gather. Geolocation tools can help identify where crowd numbers are a concern before reaching dangerous levels.

And in those cases where emergencies are unavoidable, geolocation can be used by first responders to accurately determine the location of incidents and calculate the best routes to save time and lives.

Geolocation can also be utilised by police to identify patterns and locate hot spots of criminal activity, thereby distributing limited resources more efficiently.

Pros

Many of the pros of geolocation have been identified in the sections above. Geolocation can be used in a wide variety of contexts to deliver valuable, potentially lifesaving, information quickly and efficiently. Further benefits of geolocation include:

Ease of Implementation

Anyone can take advantage of geolocation since it only requires that the user setup an HTTP call to an API endpoint.

Affordability

Many geolocation APIs do come with a fee. However, there are also APIs that leverage open data, with OpenStreetMap, OpenWeather, and Mapbox allowing users to make a pre-determined number of free calls to the API after which charges kick in.

Flexibility

Geolocation APIs can be accessed on smartphones, PCs, a wide variety of Apple products, and IoT devices. Most modern devices that connect to the internet can take advantage of the benefits of geolocation.

Flexible Technology

Cons

As with any technology, benefits must be weighed against potential downsides. Many of geolocation's benefits can become disadvantages if the technology is used by the wrong people and proper safeguards have not been enacted. The cons of geolocation need to be carefully considered before developers implement its use. Some of the most notable concerns include:

Privacy concerns

Many smartphone users have no idea how much of their location information is available. Many less sophisticated users may be unaware that they are being tracked at all.

But location data can reveal sensitive information. Providing useful information all while staying safely within the bounds of legality can be a big challenge.

Data breaches

Closely related to privacy concerns is the threat of data breaches. With so much information being collected about so many users, any large data breach runs the risk of harming large numbers of unsuspecting uses.

Unwanted tracking

There have been instances where users' location data have been used by stalkers and other malicious actors to locate individuals who may not wish to have been found.. Users may inadvertently be sharing data that makes them less safe, not moreso.

Cost

While it may be cheap to implement a geolocation tool that calls the API a limited number of times, for applications that will be making a large number of calls, the fees can quickly add up.

Even those APIs that offer free services will start to require subscriptions once calls start to exceed its minimum threshold. If developers are creating an application that will be heavily used, this potential expense should be considered.

References