How Do Maps and Your Location Show Up? GPS, Geocoding, and Map APIs
Open a map app and your location shows up as a blue dot; search an address and a pin drops at that spot. A delivery app shows you shops “near me” without any extra input. It all looks seamless, but behind it are several stages that figure out your location and link addresses to maps.
In this post, I’ll unpack, without any code, how your location is determined, how addresses and maps connect, and how a service puts a map on the screen.
Your location is found by combining several signals #
The most familiar way to find location is GPS. It receives signals from several satellites in the sky and computes roughly where on Earth you are. It narrows down the location by matching distances to multiple satellites.
But GPS alone often isn’t enough, because satellite signals weaken indoors or underground. So the device also draws on nearby Wi-Fi and cell-tower information. It combines several clues to estimate the most plausible location. That’s why a rough location still locks in even indoors.
Addresses and coordinates translate into each other #
The location a map handles is really a pair of numbers: latitude and longitude. People express a location as an address — somewhere in Gangnam, Seoul — but a map handles location as numeric coordinates. So a conversion between the two is needed.
Turning an address into coordinates is called geocoding. The reason a pin drops exactly on the spot when you search an address is that the address was translated into coordinates. There’s also the reverse translation, from coordinates back to an address. The address that pops up when you press and hold anywhere on a map is an example of that.
Maps are borrowed from someone else’s work #
A service almost never draws a map itself. Mapping every road and building across the world and keeping it current is far too much for one company to take on. So most borrow an already well-built map, like Google Maps or a regional provider’s map.
The channel used for this is a map API. As covered earlier, an API is an agreement by which services exchange functionality in a standardized way. A map API is the same: requests like “show a map centered on these coordinates” or “drop a pin here” are sent to the map company, and the result is laid onto the screen. Thanks to this, even a small service can put up a world map with ease.
Location is sensitive personal data #
Location is more than mere coordinates; it’s sensitive information that reveals where a person was and when. As location records accumulate, they build a picture of home and work, frequently visited places, and even daily routines. That’s why an app asks the user for permission before using location, and uses it only while permission stands.
The builders of a service must be especially careful handling location data too. As with the data and metrics covered earlier, the principle of collecting only what is truly needed and using it only for its stated purpose matters even more for location, because damage done by a leak is hard to undo.
So, when you use location features #
When building or planning a feature that uses location, there are a few things to weigh together. First, it’s good to clearly explain why the user should grant permission. Also, location data always carries some error — indoors or in dense urban areas it can be off by tens of meters.
Cost can’t be left out either. Map APIs often charge once you exceed a certain usage. Every map load can count toward your bill, so it’s worth keeping usage in mind from the start.
Why this makes work easier for non-developers #
- You explain permission requests. You can clearly tell users why the app asks for location permission, and which features are limited if they decline.
- You know the accuracy limits. Knowing that location carries error, you can calmly answer a query like “why is my location slightly off?”
- You see the cost early. Knowing that map APIs come with charges, you can gauge cost too when planning a feature that uses maps heavily.
Wrapping up #
Today we looked at how your location is found through several signals like GPS and Wi-Fi, how addresses and coordinates translate into each other via geocoding, and how a service borrows someone else’s map through a map API. That location is sensitive personal data is also a part not to forget.
If you’re curious about the API that serves as the channel for borrowing maps, read What Is an API; if you’re curious how data like location is gathered and handled, read How Do You Analyze Product Data and Logs.