Where’s my location? Understanding the Science behind Maps.

Zaid Shaikh
4 min readFeb 4, 2021

Let’s face it, whether searching for a nearby Restaurant or fixing traveling schedule to overcome traffic to your daily Workplace commute, we’ve used Google Maps(or Apple maps) or any other related Maps service. But why wouldn’t a person hesitate to use it considering all the features such as real-time location,ETA (Estimated time of Arrival), Traffic Analysis, City view it provides.

Isn’t it fascinating on how accurately Maps would predict your location, update your Travelling Route all withing a blink of an eye?

That’s exactly what we’ll be looking at today in this Story debunking all the science behind Google Maps & Apple Maps. We’ll be dividing it into 2 core aspects, the Software & the Hardware.

Hardware :-

GPS (Global Positioning System) is indeed the very 1st thing that locates the user in any part of the world, whether it be densely populated cities like Mumbai, New York, London, Shanghai or Remote places like Sahara Desert, Amazon Forest etc. It is collectively a combination of factors like Space Satellites, GPS integrated receivers in smartphones & wearables(Smart watches), cell phone towers like Base Station Trans-receivers, Mobile Switching Centres , WiFi routers etc.

When a user allows his/her Cell phone location access, the receivers are located using any 4 out of the 25+ space satellites rotating around the Earth’s surface at over 20,000 Km. 3 out of the 4 satellites locate the user co-ordinates in a 3-dimensional space by forming Circles with the user being the intersection point of all 3 circles. This concept is known as Trilateration. For better understanding, watch this.

The receivers in your cell phone are in constant communication with satellites that are bound over the Atmospheric Presence of the user’s Location. This process is done using transmission of radio waves with the satellite. These waves travel at the speed of light.

So this makes us think that the entire 2 way process happens within a fraction of a sec? Nope. This process is although fast, but it isn’t really that suitable considering not every user has an active Internet Connection 24×7.

To overcome this problem, A-GPS are used, by means of which location of the user is traced even offline without the hassle of an Internet Connection.

Img src:- spaceplace.nasa.gov

The North pole is also located using a magneto meter placed inside the Smartphone. The magneto meter directs the North pole with respect to the Earth’s Magnetic field moving towards North & South Poles.

This isn’t accurate at times either when the location is not accessible due to loss of connectivity. To overcome this problem, user’s cell phone is supposed to be tilted in a spiral manner where the gyroscope and Acclerator inside the phones come into play.

Software :-

Google, known for it’s diversity in collecting immense amount of data, uses Crowdsourcing along with Geographical data collected from National government bodies and satellite imagery to build streets, lanes, buildings, mountains, bridges and other places.

Google Maps front-end is built upon services such as

  • JavaScript (loading map elements).
  • JSON (data transfer such as location, places, timestamps).
  • Ajax (for Asynchronous processing & realtime updates without the need of refreshing the page).

Let’s take a look at different features that Google Maps uses.

  • Directions.
    We all have studied about concept of Latitudes & longitudes once back in our school. This is exactly what the Directions API in Google Maps uses to calculate the distance between Start and End points of a planned route. This latitude-longitude data is associated with place_id. Alongside lat-long co-ordinates of both the source & destination, a set of points are selected along the route/routes that are traced. Different algorithms such and Encoded polyline Algorithm, Travelling Salesman, Dijkshtra Algorithm are used for these same shortest distance problems.
  • Traffic
    If you look at the red marked areas throughout the journey in the above pic, those marks are nothing but traffic jams on those locations. Google maps uses live location of the user’s travelling in vehicles or public transportations and estimates the average speed at frequent intervals(in secs) at given set of co-ordinates on the map. But the service just isn’t relying on Real time data, but also on Crowdsourcing data and past historical data of traffic at the most common roads and highways. Data coming from government agencies and Sensors was used in the earliest versions of the map but with time, more complex & improved methods are used.
  • Street View
    Google uses Satellite images as well as a combination of Street View imagery to map 3D structures of buildings, malls, schools, roads etc. Business listing is used from Google’s business account to add all shops, business, markets, workplaces to make Google Maps a better experience over time which also helps in attracting suitable customers searching for shops, malls, hotels.

If you enjoyed reading this Story, don’t forget to leave a Clap down there. 👇

Suggestions & improvements are welcomed . Follow for more such blogs ahead.

LinkedIn :- https://www.linkedin.com/in/zaid-shaikh-10a286194

--

--

Zaid Shaikh

Converting my thoughts into Words 📖💻🖋️📝