Home/Help/Google Sheets
Google Sheets Add-on

Sheets Documentation

Complete reference for all MapGO custom functions available in Google Sheets. Enrich your spreadsheets with geospatial data using simple formulas.

Getting Started

1

Install the add-on

Search for "MapGO" in the Google Workspace Marketplace or install it from our website.

2

Connect your API key

Open the sidebar via Extensions → MapGO → Open MapGO, then paste your API key. Get your key from your dashboard.

3

Use formulas

Type any =MAPGO_ formula in a cell. All functions take latitude and longitude as inputs. Put your coordinates in separate columns (e.g., A for lat, B for lng).

Requirements

  • Paid plan: Spreadsheet add-ons require a Starter, Professional, or Business plan.
  • Coordinates: Latitude (-90 to 90) and longitude (-180 to 180) in decimal format.
  • Permissions: The add-on requires access to your spreadsheet and external network to call the MapGO API.

🌍Location Hierarchy

7 functions

MAPGO_HIERARCHY

Returns the full location hierarchy for coordinates. Includes all available levels: Continent, Country, Region, Subregion, District, Municipality.

Syntax
=MAPGO_HIERARCHY(lat, lng)
Example
=MAPGO_HIERARCHY(48.3, 5.03) → "Europe, France, Grand Est, Haute-Marne, Saint-Dizier, Doulevant-le-Chateau"
Returns:Text (comma-separated hierarchy)
MAPGO_CONTINENT

Returns the continent name for the given coordinates.

Syntax
=MAPGO_CONTINENT(lat, lng)
Example
=MAPGO_CONTINENT(48.3, 5.03) → "Europe"
Returns:Text
MAPGO_COUNTRY

Returns the country name for the given coordinates.

Syntax
=MAPGO_COUNTRY(lat, lng)
Example
=MAPGO_COUNTRY(48.3, 5.03) → "France"
Returns:Text
MAPGO_REGION

Returns the region or state name for the given coordinates.

Syntax
=MAPGO_REGION(lat, lng)
Example
=MAPGO_REGION(48.3, 5.03) → "Grand Est"
Returns:Text
MAPGO_SUBREGION

Returns the subregion (department, province, etc.) for the given coordinates.

Syntax
=MAPGO_SUBREGION(lat, lng)
Example
=MAPGO_SUBREGION(48.3, 5.03) → "Haute-Marne"
Returns:Text
MAPGO_DISTRICT

Returns the district name for the given coordinates. Not all countries have districts.

Syntax
=MAPGO_DISTRICT(lat, lng)
Example
=MAPGO_DISTRICT(48.3, 5.03) → "Saint-Dizier"
Returns:Text
MAPGO_MUNICIPALITY

Returns the municipality name for the given coordinates. Not all countries have municipalities.

Syntax
=MAPGO_MUNICIPALITY(lat, lng)
Example
=MAPGO_MUNICIPALITY(48.3, 5.03) → "Doulevant-le-Chateau"
Returns:Text

🌊Coastline Distance

3 functions

MAPGO_COASTLINE

Returns the distance to the nearest coastline as a formatted string.

Syntax
=MAPGO_COASTLINE(lat, lng)
Example
=MAPGO_COASTLINE(48.8566, 2.3522) → "340.2 km"
Returns:Text
MAPGO_COASTLINE_KM

Returns the distance to the nearest coastline in kilometers as a number.

Syntax
=MAPGO_COASTLINE_KM(lat, lng)
Example
=MAPGO_COASTLINE_KM(48.8566, 2.3522) → 340.2
Returns:Number
MAPGO_COASTLINE_MI

Returns the distance to the nearest coastline in miles as a number.

Syntax
=MAPGO_COASTLINE_MI(lat, lng)
Example
=MAPGO_COASTLINE_MI(48.8566, 2.3522) → 211.4
Returns:Number

🗺️Border Distance

3 functions

MAPGO_BORDER

Returns the distance to the nearest country border as a formatted string.

Syntax
=MAPGO_BORDER(lat, lng)
Example
=MAPGO_BORDER(48.8566, 2.3522) → "258.3 km"
Returns:Text
MAPGO_BORDER_KM

Returns the distance to the nearest country border in kilometers as a number.

Syntax
=MAPGO_BORDER_KM(lat, lng)
Example
=MAPGO_BORDER_KM(48.8566, 2.3522) → 258.3
Returns:Number
MAPGO_BORDER_MI

Returns the distance to the nearest country border in miles as a number.

Syntax
=MAPGO_BORDER_MI(lat, lng)
Example
=MAPGO_BORDER_MI(48.8566, 2.3522) → 160.5
Returns:Number

📏Point-to-Point Distance

4 functions

MAPGO_DISTANCE

Returns the distance between two coordinate points as a formatted string.

Syntax
=MAPGO_DISTANCE(lat1, lng1, lat2, lng2)
Example
=MAPGO_DISTANCE(48.85, 2.35, 41.89, 12.49) → "1,105.3 km"
Returns:Text
MAPGO_DISTANCE_KM

Returns the distance between two points in kilometers as a number.

Syntax
=MAPGO_DISTANCE_KM(lat1, lng1, lat2, lng2)
Example
=MAPGO_DISTANCE_KM(48.85, 2.35, 41.89, 12.49) → 1105.3
Returns:Number
MAPGO_DISTANCE_MI

Returns the distance between two points in miles as a number.

Syntax
=MAPGO_DISTANCE_MI(lat1, lng1, lat2, lng2)
Example
=MAPGO_DISTANCE_MI(48.85, 2.35, 41.89, 12.49) → 686.8
Returns:Number
MAPGO_BEARING

Returns the bearing (compass direction) from the first point to the second in degrees.

Syntax
=MAPGO_BEARING(lat1, lng1, lat2, lng2)
Example
=MAPGO_BEARING(48.85, 2.35, 41.89, 12.49) → 145.7
Returns:Number (0-360)

🔄Coordinate Conversion

2 functions

MAPGO_TO_DMS

Converts decimal coordinates to DMS (Degrees, Minutes, Seconds) format.

Syntax
=MAPGO_TO_DMS(lat, lng)
Example
=MAPGO_TO_DMS(41.8902, 12.4922) → "41°53'24.7"N 12°29'31.9"E"
Returns:Text
MAPGO_TO_UTM

Converts decimal coordinates to UTM (Universal Transverse Mercator) format.

Syntax
=MAPGO_TO_UTM(lat, lng)
Example
=MAPGO_TO_UTM(41.8902, 12.4922) → "33T 291888 4640642"
Returns:Text

Tips & Notes

  • Results are cached for 6 hours to minimize API usage. The same coordinates will return instantly after the first call.
  • Each formula call counts as one row toward your monthly usage limit.
  • Numeric functions (_KM, _MI) return numbers you can use in calculations. Text functions return formatted strings.
  • Location hierarchy depth varies by country. Some countries have only Country and Region, while others include Subregion, District, and Municipality.
  • Distance calculations use the Haversine formula and are approximate great-circle distances.
  • All geographic calculations are based on polygon shapefiles and should be considered approximations.

Need help?

If you have questions or run into issues, we're here to help.

Contact Us