Maps for Excel

Sideload an Excel Add-in for testing

Until the Maps for Excel add-in is published to Microsoft AppSource, you can test it in sideload mode: see Microsoft instructions below

Excel for the web is most likely the easiest option for sideloading the add-on yourself. If you are an employee of an organization, then a support specialist can easily handle preparing the shared folder for this add-in sideloading.

Some differences between Maps for Excel and Maps for Sheets:
+ local execution of the add-in code on the client side;
+ absence of restrictive quotas for different apps script resources (fetch, runtime);
+ better performance;
- lack of a free Google Maps API quota - the add-on can only work with your own Maps API keys.

Demo video

This app is powered by Google Maps and requires a Google Maps API Key  with enabled Places API, Directions API, Maps Static API, Street View Static API, Maps JavaScript API, Geocoding API for several functions. Shapes and boundaries functionality requires Bing Maps API. Isoline functionality requires Bing Maps API or Here Maps API key. The app comes with shared API keys for a limited trial period. Links to obtain your own keys are available on the add-on Settings page. Get free usage quota for Maps, Routes, and Places every month. Find Google pricing for Maps, Routes, and Places here.

Ideas for use

Click Home - Maps for Excel - Show Taskpane - Show ideas to find some ideas for use of Maps for Excel formulas.

Insert formulas

Click Formulas - Insert Function - Maps for Excel, select formula to insert into your spreadsheet, press Next to continue.

Update formulas

To update formula or refresh it after some issues

Replace formulas with values

To avoid API credits “leakage” due to periodical formulas updates by Microsoft Excel you may replace formulas with their values.

Disable/Enable formulas

To avoid API credits “leakage” or trigger of interactive functions due to periodical formulas updates by Microsoft Excel you may disable/enable formulas.

Download

Select cells to download and click the menu item under Home - Maps for Excel - Formulas - Download.

Settings

Paste it to the Bing Maps API Key field

Subscription

Check this add-in subscription status at Home - Maps for Excel - Show Taskpane below Save button.

This add-in subscription does not cover Google, Bing, Here Maps API usage fees.


Your subscriptions also available in this web application. This page does not support multiple Google accounts sign-in.

Function List

gsGetLatLng(place; [n_results])

bsGetLatLng(place; [n_results]) B

hsGetLatLng(place; [n_results]) H

gsParseLatLng(latlng)

gsGetPoint(latitude; longitude)

gsGetAddress(latitude; longitude)

gsGetPlaceID(place; [n_results])

gsGetPlaceUrl([placeId]; [address])

gsGeocode(place; [n_results]; [fields]; [language])

bsGeocode(place; [n_results]; [fields]; [language]; [entityTypes]) B

hsGeocode(place; [n_results]; [fields]; [language]) H

gsGetAddressComponents(place; [n_results]; [components]; [language]; [short_long])

bsGetAddressComponents(place; [n_results]; [components]; [language]) B

hsGetAddressComponents(place; [n_results]; [components]; [language]) H

gsReverseGeocode(lat; lng; [n_results]; [fields]; [language]; [result_type]) G

bsReverseGeocode(lat; lng; entityTypes; [n_results]; [fields]; [language]) B

hsReverseGeocode(location; level; [n_results]; [fields]; [language]) H

gsBoundaries(place; level; [components]; [language]) H

gsPlusCode(place; [fields]) G

gsFindPlaceFromText(input; inputtype; fields; locationbias; language; n_results) G

gsNearbyPlaces(location; radius; [n_results]; [fields]; [keyword]; [type]; [rankby]; [opennow]; [minprice]; [maxprice]) G

gsFindPlaces(query; [n_results]; [fields]; [type]; [location]; [radius]) G

hsFindPlaces(query; location; [radius]; [n_results]; [fields]; [language]) H

gsGetPlaceDetails(place_id; [fields]; [language]) G

gsGetPlaceDetailsJSON(place_id; [fields]; [language]) G

gsGetDistanceLatLng(lat1; lon1; lat2; lon2)

gsGetLinearDistance(waypoints; ...)

gsGetRouteDistance([mode]; [options]; [departure_time]; [arrival_time]; waypoints; ...)

gsGetRouteTime(mode; [options]; [departure_time]; [arrival_time]; waypoints; ...)

gsGetRouteCost(mode; [options]; [departure_time]; [arrival_time]; waypoints; ...)

gsGetRouteUrl(mode; [options]; [departure_time]; [arrival_time]; waypoints; ...)

gsGetRouteMap(mode; [options]; [departure_time]; [arrival_time]; waypoints; ...) G

gsGetPointsMap(waypoints; ...) G

bsDirectionsDistance(waypoints; [mode]; [distanceUnit]; [dateTime]; [timeType]; [avoid]; [optimize]; [optimizeWaypoints]; [options]) B

bsDirectionsTime(waypoints; [mode]; [distanceUnit]; [dateTime]; [timeType]; [avoid]; [optimize]; [optimizeWaypoints]; [options]) B

bsDirectionsCost(waypoints; [mode]; [distanceUnit]; [dateTime]; [timeType]; [avoid]; [optimize]; [optimizeWaypoints]; [options]) B

bsDirectionsRegionTravelSummary(waypoints; [mode]; [distanceUnit]; [dateTime]; [timeType]; [avoid]; [optimize]; [optimizeWaypoints]; [options]; [fields]) B

bsDirectionsMap(waypoints; [mode]; [distanceUnit]; [dateTime]; [timeType]; [avoid]; [optimize]; [optimizeWaypoints]; [options]; [imagerySet]) B

bsDirectionsUrl(waypoints; [mode]; [imagerySet]) B

gsGetPlacePhoto(place_id; [photo_n]; [maxwidth]; [maxheight]) G

gsGetStreetView(location; [width]; [height]; [heading]; [fov]; [pitch]; [radius]; [source]) G

gsGetIsolineMapFrom(origins; mode; type; ranges; [departure]; [options]; [show_mode]) GB/H

gsGetIsolineMapTo(destinations; mode; type; ranges; [arrival]; [options]; [show_mode]) GB/H

gsCommuteDistance(origin; destination; [mode]; [options]; [departure_time]; [arrival_time])

gsCommuteTime(origin; destination; [mode]; [options]; [departure_time]; [arrival_time])

gsCommuteCost(origin; destination; [mode]; [options]; [departure_time]; [arrival_time])

gsCommuteURL(origin; destination; [mode]; [options]; [departure_time]; [arrival_time])

gsCommuteRouteMap(origin; destination; [mode]; [options]; [departure_time]; [arrival_time]) G

generateRgbaColors(amount; [saturation]; [lightness])

hslToRgba(h; s; l)

highlightDuplicates([colIndex]; [keepFormula])

gsMultiNearbyPlaces(where, radius, fields, [n_results], [what], [type], [rankby], [opennow], [minprice], [maxprice], [language], [total_results], [geo_factor], [keepFormula]) G

gsMultiFindPlaces(what; where; [n_results]; [fields]; [type]; [location]; [radius]; [language]; [total_results]; [geo_factor]; [keepFormula]) G

gsInsertHeatmap(insert_into; latitudes; longitudes; [weights]; [maptype]; [width]; [height]; [gradient]; [radius]; [opacity]; [maxIntensity]; [dissipating]; [keepFormula]) G

gsDownload(arg; [filename]; [keepFormula])

gsDownloadPlacePhoto(place_id, [photo_n], [maxwidth], [maxheight], [filename], [keepFormula]) G

gsDownloadStreetViewImage(location, [width], [height], [heading], [fov], [pitch], [radius], [source], [filename], [keepFormula]) G

gsDownloadActiveRangeImages([filename], [keepFormula])

gsDownloadFormulaImages([rangeAddress], [filename], [keepFormula])

gsDownloadOvergridImages([keepFormula])

gsFormulasToggle([mode], [rangeAddress], [keepFormula])

gsFormulasEnable([rangeAddress], [keepFormula])

gsFormulasDisable([rangeAddress], [keepFormula])


Shapes and geo-objects:

geoPoint(points; [n_results]; [details]; [properties]) G*

geoPolygon(points; [properties]) G*

geoRectangle(points; width; height; [units]; [properties]) G*

geoCircle(points; radius; [units]; [steps]; [properties]) G*

geoShape(searchtext; [n_results],[backoff]) GB

geoLineString(points, properties) G*

geoBBox(geo) GH*

geoDraw([insert_into]; [geo]; [readOnly], [map_init], [keepFormula]) G

geoLoadJSON(url)

geoIsolineFrom(origin; mode; type; ranges; [departure]; [options]) GB/H

geoIsolineTo(destination; mode; type; ranges; [arrival]; [options]) GB/H

geoToMap(objects) G

geoMapOptions([width]; [height]; [mapType]; [language]; [zoom]; [center_lat]; [center_lng]; [style])

geoToKml(objects)

geoSetColor(geo; [color]; [strokeColor]; [strokeWeight])

geoSetMarkerIcon(geo; imageUrl)

geoDistance(object1; object2; [units])

geoGetArea(geo)

geoGetCentroid(geo)

geoGetCenter(geo)

geoGetLatLng(geo)

geoGetLatLngString(geo)

geoGetCoords(geo; [type])

geoProperties(input)

geoSetProperty(geo; key; property)

geoSetProperties(geo; properties)

geoGeometry(geo)

geoFlip(geo)

geoToTable(input; [fields])

geoLinkContained(geo)

geoLinkResolve(geo)

geoIntersect(objects)

geoUnion(geo; ...)

geoSubtract(base; shapes; ...)

geoGetChilds(geo; [type]; [items])

geoContainsPoints(obj; args; ...)

geoNearbyPlaces(location; radius; [n_results]; [fields]; [keyword]; [type]; [rankby]; [opennow]; [minprice]; [maxprice]) G

geoFindPlaces(query; [n_results]; [fields]; [type]; [location]; [radius]; [language]) G

hsFindPlaces(query; location; [radius]; [n_results]; [fields]; [language]) H

geoBoundaries(place; level; [language]) B

geoFindWithinBoundaries(where; what; [fields]; [type]; [language]; [total_results]; [geo_factor]; [grid_spacing]; [cell_results]; [platform], [keepFormula]) GB/H*

geoGetGrid(geo; radius; units; items)

geoGetGridPoints(geo; radius; units; items)

geoIsContain(geo1; geo2)

geoIsOverlap(geo1; geo2)

G Google API key required

B Bing API key required

H HERE API key required

Function Description

gsGetLatLng(place; [n_results]) 

Example

gsGetLatLng(string; number)

Description

A custom function that gets the latitude/longitude coordinates.

place

The address of a given place.

n_results

(optional) The limitation of returned results


bsGetLatLng(place; [n_results]) B

Example

bsGetLatLng(string; number)

Description

A custom function that gets the latitude/longitude coordinates.

place

The address of a given place.

n_results

(optional) The limitation of returned results.


hsGetLatLng(place; [n_results]) H

Example

hsGetLatLng(string; number)

Description

A custom function that gets the latitude/longitude coordinates.

place

The address of a given place.

n_results

(optional) The limitation of returned results.


gsParseLatLng(latlng)

Example

gsParseLatLng("38° 53′ 23″ N, 77° 00′ 32″ W")

Description

A custom function that parses the DMS and DMM latitude/longitude coordinate strings.

latlng

The string with latitude/longitude coordinates.


gsGetPoint(latitude; longitude) 

Example

gsGetPoint(51.5073509; -0.1277583)

Description

A custom function that gets a point (lat, lng).

latitude

The latitude of a given place.

longitude

The latitude of a given place.


gsGetAddress(latitude; longitude) 

Example

gsGetAddress(51.5073509; -0.1277583)

Description

A custom function that gets an address at a point with specific coordinates.
Use the gsParseLatLng function to parse the coordinate string for a point.


latitude

The latitude of a given place.

longitude

The latitude of a given place.


gsGetPlaceID(place; [n_results]) 

Example

gsGetPlaceID(string; number)

Description

A custom function that gets the Google Place ID. The place ID is a unique identifier that can be used with other Google APIs.

place

The address of a given place.

n_results

(optional) The limitation of returned results


gsGetPlaceUrl([placeId]; [address]) 

Example

gsGetPlaceUrl(string; string)

Description

A custom function that gets the URL on the place on map.

To show the URL in the cell use formula =HYPERLINK(). See https://support.google.com/docs/answer/3093313

placeId

(optional) The place ID of a given place.

address

(optional) The address of a given place.



gsGeocode(place; [n_results]; [fields]; [language]) 

Example

gsGeocode(string; number; array_of_strings; string)

Description

A custom function that converts addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates (like latitude 37.423021 and longitude -122.083739)  by using Here Maps API.

place

The address of a given place.

n_results

(optional) The limitation of returned results

fields

(optional) One or more fields, specifying the types of place data to return, separated by a comma. See https://developers.google.com/maps/documentation/geocoding/intro

Leave blank to see all available fields.

language

(optional) The language code, indicating in which language the results should be returned, if possible. Note that some fields may not be available in the requested language. See https://developers.google.com/maps/faq#languagesupport 


bsGeocode(place; [n_results]; [fields]; [language]; [entityTypes]) B

Example

hsGeocode(string; number; array_of_strings; string; string)

Description

A custom function that converts addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates (like latitude 37.423021 and longitude -122.083739) by using Bing Maps API.

place

The address of a given place.

n_results

(optional) The limitation of returned results

fields

(optional) One or more fields, specifying the types of place data to return, separated by a comma. Leave blank to see all available fields.

language

(optional) The language code, indicating in which language the results should be returned, if possible. Language code must be provided according to RFC 4647 standard. Note that the plural form of the parameter (languages) is supported as well.

entityTypes

(optional) The entity type to return: Address, AdminDivision1, AdminDivision2, CountryRegion, Neighborhood, PopulatedPlace, Postcode1.


hsGeocode(place; [n_results]; [fields]; [language]) H

Example

hsGeocode(string; number; array_of_strings; string)

Description

A custom function that converts addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates (like latitude 37.423021 and longitude -122.083739) by using Here Maps API.

place

The address of a given place.

n_results

(optional) The limitation of returned results

fields

(optional) One or more fields, specifying the types of place data to return, separated by a comma. See https://developer.here.com/documentation/geocoder/dev_guide/topics/reading-geocoding-response.html

Leave blank to see all available fields.

language

(optional) The language code, indicating in which language the results should be returned, if possible. Language code must be provided according to RFC 4647 standard. Note that the plural form of the parameter (languages) is supported as well.


gsGetAddressComponents(place; [n_results]; [components]; [language]; [short_long])

Example

gsGetAddressComponents(string; number; string; string; string)

Description

Returns address components.

place

The address or coordinates of a given place.

n_results

(optional) The limitation of returned results

components

(optional) One or more fields, specifying the types of address components to return, or numbers of the components, separated by a comma.

language

(optional) The language code, indicating in which language the results should be returned, if possible. Note that some fields may not be available in the requested language. See https://developers.google.com/maps/faq#languagesupport

short_long

(optional) 'short_name' (default) to return short names; 'long_name' to return long names.


bsGetAddressComponents([place]; [n_results]; [components]; [language])

Example

bsGetAddressComponents(string; number; string; string)

Description

Returns address components.

place

The address of a given place.

n_results

(optional) The limitation of returned results

components

(optional) One or more fields, specifying the types of address components to return, separated by a comma. Leave blank to see all available fields.

language

(optional) The language code, indicating in which language the results should be returned, if possible. Note that some fields may not be available in the requested language.


hsGetAddressComponents([place]; [n_results]; [components]; [language])

Example

hsGetAddressComponents(string; number; string; string)

Description

Returns address components.

place

The address of a given place.

n_results

(optional) The limitation of returned results

components

(optional) One or more fields, specifying the types of address components to return, separated by a comma. Leave blank to see all available fields.

language

(optional) The language code, indicating in which language the results should be returned, if possible. Note that some fields may not be available in the requested language.


gsReverseGeocode(lat; lng; [n_results]; [fields]; [language]; [result_type]) 

Example

gsReverseGeocode(number; number; number; array_of_strings; string; string)

Description

A custom function translating a location on the map into a human-readable address.

lat

The latitude of a given place.

lng

The longitude of a given place.

n_results

(optional) The limitation of returned results

fields

(optional) One or more fields, specifying the types of place data to return, separated by a comma. See https://developers.google.com/maps/documentation/geocoding/intro 

Leave blank to see all available fields.

language

(optional) The language code, indicating in which language the results should be returned, if possible. Note that some fields may not be available in the requested language. See https://developers.google.com/maps/faq#languagesupport

result_type

(optional) A filter of one or more address types, separated by a pipe (|). Valid values: street_address, route, intersection, political, country, administrative_area_level_1, administrative_area_level_2, administrative_area_level_3, administrative_area_level_4, administrative_area_level_5, administrative_area_level_6, administrative_area_level_7, colloquial_area, locality, sublocality, sublocality_level_1, sublocality_level_2, neighborhood, premise, subpremise, plus_code, postal_code, natural_feature, airport, park, point_of_interest. See https://developers.google.com/maps/documentation/geocoding/requests-reverse-geocoding#optional_parameters


bsReverseGeocode(lat; lng; entityTypes; [n_results]; [fields]; [language]) B

Example

bsReverseGeocode(latitude_or_string; longitude; string; number; array_of_strings; string)

Description

A custom function translating a location on the map into a human-readable address.

lat

(required) address/search text or latitude: [lat,lng][address].

lng

(required for latitude/longitude).

level

(optional) Target match level of the search result: one of [country, state, county, city, district, postalCode].

n_results

(optional) The limitation of returned results

fields

(optional) One or more fields, specifying the types of place data to return, separated by a comma. See https://developer.here.com/documentation/geocoder/dev_guide/topics/reading-geocoding-response.html

Leave blank to see all available fields.

language

(optional) The language code, indicating in which language the results should be returned, if possible. Note that some fields may not be available in the requested language. See https://developers.google.com/maps/faq#languagesupport


hsReverseGeocode(location; level; [n_results]; [fields]; [language])

Example

hsReverseGeocode(latlng_or_string; string; number; array_of_strings; string)

Description

A custom function translating a location on the map into a human-readable address.

location

(required) of a given place either lat/lng or address: [lat,lng][address].

level

(optional) Target match level of the search result: one of [country, state, county, city, district, postalCode].

n_results

(optional) The limitation of returned results

fields

(optional) One or more fields, specifying the types of place data to return, separated by a comma. See https://developer.here.com/documentation/geocoder/dev_guide/topics/reading-geocoding-response.html

Leave blank to see all available fields.

language

(optional) The language code, indicating in which language the results should be returned, if possible. Note that some fields may not be available in the requested language. See https://developers.google.com/maps/faq#languagesupport


gsBoundaries(place; level; [components]; [language])

Example

gsBoundaries(geojson_or_latlng_or_string; string; string; string)

Description

Returns the administrative area around a geo-point or areas inside a geo-shape. Important note: This function is very time consuming, therefore, to query a number of results, it is recommended to divide the query area into subareas, as well as use an interactive call via the Insert - Function menu. Some areas may not contain shape information.

place

(required) GeoJSON object, latlng or address string.

level

(required) Target match level of the search result: one of [Country, State, County, City, District, PostalCode].

components

(optional) One or more fields, specifying the types of address components to return, separated by a comma: [Label,Country,State,County,City,District,PostalCode].

language

(optional) The language code, indicating in which language the results should be returned, if possible. Note that some fields may not be available in the requested language. See https://developers.google.com/maps/faq#languagesupport

gsPlusCode(place; [fields])

Example

gsPlusCode(string; array_of_strings)

Description

A custom function that converts addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into plus code (like 849VCWC8+X4).

place

The address or coordinates of a given place.

fields

(optional) One or more fields, specifying the types of place data to return, separated by a comma. Leave blank to see all available fields.


gsFindPlaceFromText(input; inputtype; fields; locationbias; language; n_results) G

Example

gsFindPlaceFromText(string; string; array_of_strings; string; string; number)

Description

A Find Place request takes a text input and returns a place. The input can be any kind of Places text data, such as a name, address, or phone number. A Find Place request using non-string data such as a lat/lng coordinate or plus code generates an error.

input

(required) Text input that identifies the search target, such as a name, address, or phone number. The input must be a string. Non-string input such as a lat/lng coordinate or plus code generates an error.

inputtype

(optional) The type of input: textquery (default), phonenumber. Phone numbers must be in international format (prefixed by a plus sign ("+"), followed by the country code, then the phone number itself)

fields

(optional) Use the fields parameter to specify a comma-separated list of place data types to return. For example: fields=formatted_address,name,geometry. See https://developers.google.com/maps/documentation/places/web-service/search-find-place#fields

locationbias

(optional) Prefer results in a specified area, by specifying either a radius plus lat/lng, or two lat/lng pairs representing the points of a rectangle. See https://developers.google.com/maps/documentation/places/web-service/search-find-place#locationbias

language

(optional) The language code, indicating in which language the results should be returned, if possible. Note that some fields may not be available in the requested language. See https://developers.google.com/maps/faq#languagesupport

n_results

(optional) The limitation of returned results: 1 by default (if missing).


gsNearbyPlaces(location; radius; n_results; fields; keyword; type; rankby; opennow; minprice; maxprice) G

Example

gsNearbyPlaces(string; number; number; array_of_strings; string; string; string; string; string; string)

Description

A custom function that finds nearby places.

location

(required) Prefer results in a specified area by specifying either lat/lng or address: [lat,lng][address].

radius

(required) Defines the distance (in meters) within which to return place results. The maximum allowed radius is 50 000 meters. Note that radius must not be included if rankby=distance. See https://developers.google.com/places/web-service/search 

n_results

(optional) The limitation of returned results: 20 by default (if missing or with trial Google API key).

fields

(optional) One or more fields, specifying the types of place data to return, separated by a comma. See https://developers.google.com/places/web-service/search#PlaceSearchResults 

Leave blank to see all available fields.

keyword

(optional) A term to be matched against all content that Google has indexed for this place, including but not limited to name, type, and address, as well as customer reviews and other third-party content.

type

(optional) Restricts the results to places matching the specified type. Only one type may be specified (if more than one type is provided, all types following the first entry are ignored). See https://developers.google.com/places/web-service/supported_types 

rankby

(optional) Specifies the order in which results are listed. Note that rankby must not be included if radius is specified. Possible values are: prominence (default), distance. When distance is specified, one or more of keyword, name, or type is required.

opennow

(optional) Returns only those places that are open for business at the time the query is sent.

minprice

(optional) Restricts results to only those places within the specified range. Valid values range between 0 (most affordable) to 4 (most expensive), inclusive.

maxprice

(optional) Restricts results to only those places within the specified range. Valid values range between 0 (most affordable) to 4 (most expensive), inclusive.


gsFindPlaces(query; [n_results]; [fields]; [type]; [location]; [radius]) G

Example

gsFindPlaces(string; number; array_of_strings; string; string; number)

Description

A custom function that finds places. The search response will include a list of places. In case of missing fields parameter the header row is also included.

query

(required) A Find Place request takes a text input, and returns a place. The text input can be any kind of Places data, for example, a name or address.

n_results

(optional) The limitation of returned results: 20 by default (if missing or with trial Google API key).

fields

(optional) One or more fields, specifying the types of place data to return, separated by a comma. See https://developers.google.com/places/web-service/search#PlaceSearchResults

Leave blank to see all available fields.

type

(optional) Restricts the results to places matching the specified type. Only one type may be specified (if more than one type is provided, all types following the first entry are ignored). See https://developers.google.com/places/web-service/supported_types

location

(optional) Prefer results in a specified area by specifying either lat/lng or address: [lat,lng][address]. If this parameter is not specified, the API uses IP address biasing by default.

radius

<optional> Defines the distance (in meters) within which to bias place results. The maximum allowed radius is 50 000 meters. See https://developers.google.com/places/web-service/search


hsFindPlaces(query; location; [radius]; [n_results]; [fields]; [language]) H

Example

hsFindPlaces(string; string; number; number; array_of_strings; string)

Description

A custom function that finds places.

query

(required) A Find Place request takes a text input, and returns a place. The text input can be any kind of Places data, for example, a name or address.

location

(optional) Prefer results in a specified area by specifying either lat/lng or address: [lat,lng][address]. If this parameter is not specified, the API uses IP address biasing by default.

radius

(optional) Defines the distance (in meters) within which to bias place results.

n_results

(optional) The limitation of returned results: 20 by default (if missing).

fields

(optional) One or more fields, specifying the types of place data to return, separated by a comma. Leave blank to see all available fields.

language

(optional) BCP 47 language code, indicating in which language the results should be returned. If lang is not set, or if the result item has no translation in the requested language, the default language will be used.


gsGetPlaceDetails(place_id; [fields]; [language]) G

Example

gsGetPlaceDetails(string; array_of_strings; string)

Description

A custom function that gets details about a particular establishment or point of interest.

place_id

(required) A textual identifier that uniquely identifies a place.

fields

(optional) One or more fields, specifying the types of place data to return, separated by a comma. See https://developers.google.com/places/web-service/details

Leave blank to see all available fields.

language

(optional) The language code, indicating in which language the results should be returned, if possible. Note that some fields may not be available in the requested language. See https://developers.google.com/maps/faq#languagesupport


gsGetPlaceDetailsJSON(place_id; [fields]; [language]) G

Example

gsGetPlaceDetailsJSON(string; array_of_strings; string)

Description

A custom function that gets details about a particular establishment or point of interest in JSON format.

place_id

(required) A textual identifier that uniquely identifies a place.

fields

(optional) One or more fields, specifying the types of place data to return, separated by a comma. See https://developers.google.com/places/web-service/details

Leave blank to include all available fields.

language

(optional) The language code, indicating in which language the results should be returned, if possible. Note that some fields may not be available in the requested language. See https://developers.google.com/maps/faq#languagesupport


gsGetDistanceLatLng(lat1; lon1; lat2; lon2)

Example

gsGetDistanceLatLng(51.5073509; -0.1277583; 53.4083714; -2.9915726)

Description

A custom function that gets the linear distance between 2 points.

lat1

Latitude of of the first point

lon1

Longitude of of the first point

lat2

Latitude of of the second point

lon2

Longitude of of the second point


gsGetLinearDistance(waypoints; ...) 

Example

gsGetLinearDistance("london","53.480761, -2.242631","liverpool")

Description

A custom function that gets the linear distance between multiple addresses or points.

waypoints

Ordered list of two or more map waypoints


gsGetRouteDistance([mode]; [options]; [departure_time]; [arrival_time]; waypoints; ...) 

Example

gsGetRouteDistance(string; string; date_and_time; date_and_time; array_of_strings)

Description

A custom function that gets the route distance between multiple addresses or points.

mode

(optional) specifies what mode of transport to use when calculating directions (DRIVING,BICYCLING,TRANSIT,WALKING)

options

(optional) Set "optimize:true" to optimize the provided route by rearranging the waypoints in a more efficient order. See https://developers.google.com/maps/documentation/directions/intro

departure_time

(optional) Example: 2013-07-04T17:00:00+02:00 For requests where the travel mode is transit: You can optionally specify one of departure_time or arrival_time. If neither time is specified, the departure_time defaults to now (that is, the departure time defaults to the current time).

For requests where the travel mode is driving: You can specify the departure_time to receive a route and trip duration (response field: duration_in_traffic) that take traffic conditions into account. The departure_time must be set to the current time or some time in the future. It cannot be in the past.

arrival_time

(optional) Example: 2013-07-04T17:00:00+02:00 For requests where the travel mode is transit. You can specify either departure_time or arrival_time, but not both. Traffic conditions are not taken into account with this parameter.

waypoints

Specifies an ordered list of origin and destination points and intermediate locations to include along the route as pass through or stopover locations. Waypoints alter a route by directing it through the specified location(s).


gsGetRouteTime(mode; [options]; [departure_time]; [arrival_time]; waypoints; ...)

Example

gsGetRouteTime(string; string; date_and_time; date_and_time; array_of_strings)

Description

A custom function that gets the duration in seconds on this route.

mode

specifies what mode of transport to use when calculating directions (DRIVING,BICYCLING,TRANSIT,WALKING)

options

(optional) Set "optimize:true" to optimize the provided route by rearranging the waypoints in a more efficient order. See https://developers.google.com/maps/documentation/directions/intro

departure_time

(optional) Example: 2013-07-04T17:00:00+02:00 For requests where the travel mode is transit: You can optionally specify one of departure_time or arrival_time. If neither time is specified, the departure_time defaults to now (that is, the departure time defaults to the current time).

For requests where the travel mode is driving: You can specify the departure_time to receive a route and trip duration (response field: duration_in_traffic) that take traffic conditions into account. The departure_time must be set to the current time or some time in the future. It cannot be in the past.

arrival_time

(optional) Example: 2013-07-04T17:00:00+02:00 For requests where the travel mode is transit. You can specify either departure_time or arrival_time, but not both. Traffic conditions are not taken into account with this parameter.

waypoints

Specifies an ordered list of origin and destination points and intermediate locations to include along the route as pass through or stopover locations. Waypoints alter a route by directing it through the specified location(s).


gsGetRouteCost(mode; [options]; [departure_time]; [arrival_time]; waypoints; ...) 

Example

gsGetRouteCost(string; string; date_and_time; date_and_time; array_of_strings)

Description

A custom function that gets the total fare (that is, the total ticket costs) on this route.

mode

specifies what mode of transport to use when calculating directions (DRIVING,BICYCLING,TRANSIT,WALKING)

options

(optional) Set "optimize:true" to optimize the provided route by rearranging the waypoints in a more efficient order. See https://developers.google.com/maps/documentation/directions/intro

departure_time

(optional) Example: 2013-07-04T17:00:00+02:00 For requests where the travel mode is transit: You can optionally specify one of departure_time or arrival_time. If neither time is specified, the departure_time defaults to now (that is, the departure time defaults to the current time).

For requests where the travel mode is driving: You can specify the departure_time to receive a route and trip duration (response field: duration_in_traffic) that take traffic conditions into account. The departure_time must be set to the current time or some time in the future. It cannot be in the past.

arrival_time

(optional) Example: 2013-07-04T17:00:00+02:00 For requests where the travel mode is transit. You can specify either departure_time or arrival_time, but not both. Traffic conditions are not taken into account with this parameter.

waypoints

Specifies an ordered list of origin and destination points and intermediate locations to include along the route as pass through or stopover locations. Waypoints alter a route by directing it through the specified location(s).


gsGetRouteUrl(mode; [options]; [departure_time]; [arrival_time]; waypoints; ...) 

Example

gsGetRouteUrl(string; string; date_and_time; date_and_time; array_of_strings)

Description

A custom function that gets the URL on the route on map.

To show the URL in the cell use formula =HYPERLINK(). See https://support.google.com/docs/answer/3093313

mode

specifies what mode of transport to use when calculating directions (DRIVING,BICYCLING,TRANSIT,WALKING)

options

(optional) Set "optimize:true" to optimize the provided route by rearranging the waypoints in a more efficient order. See https://developers.google.com/maps/documentation/directions/intro

departure_time

(optional) Example: 2013-07-04T17:00:00+02:00 For requests where the travel mode is transit: You can optionally specify one of departure_time or arrival_time. If neither time is specified, the departure_time defaults to now (that is, the departure time defaults to the current time).

For requests where the travel mode is driving: You can specify the departure_time to receive a route and trip duration (response field: duration_in_traffic) that take traffic conditions into account. The departure_time must be set to the current time or some time in the future. It cannot be in the past.

arrival_time

(optional) Example: 2013-07-04T17:00:00+02:00 For requests where the travel mode is transit. You can specify either departure_time or arrival_time, but not both. Traffic conditions are not taken into account with this parameter.

waypoints

Specifies an ordered list of origin and destination points and intermediate locations to include along the route as pass through or stopover locations. Waypoints alter a route by directing it through the specified location(s).


gsGetRouteMap(mode; [options]; [departure_time]; [arrival_time]; waypoints; ...) G

Example

=IMAGE(gsGetRouteMap(string; string; date_and_time; date_and_time; array_of_strings))

Description

Use gsGetRouteMap to return the static map with the route calculated by using the waypoints in the order they are given.

This function to be used with formula =IMAGE(gsGetRouteMap(...))

See https://support.google.com/docs/answer/3093333

mode

specifies what mode of transport to use when calculating directions (DRIVING,BICYCLING,TRANSIT,WALKING)

options

(optional) Set "optimize:true" to optimize the provided route by rearranging the waypoints in a more efficient order. See https://developers.google.com/maps/documentation/directions/intro

departure_time

(optional) Example: 2013-07-04T17:00:00+02:00 For requests where the travel mode is transit: You can optionally specify one of departure_time or arrival_time. If neither time is specified, the departure_time defaults to now (that is, the departure time defaults to the current time).

For requests where the travel mode is driving: You can specify the departure_time to receive a route and trip duration (response field: duration_in_traffic) that take traffic conditions into account. The departure_time must be set to the current time or some time in the future. It cannot be in the past.

arrival_time

(optional) Example: 2013-07-04T17:00:00+02:00 For requests where the travel mode is transit. You can specify either departure_time or arrival_time, but not both. Traffic conditions are not taken into account with this parameter.

waypoints

Specifies an ordered list of origin and destination points and intermediate locations to include along the route as pass through or stopover locations. Waypoints alter a route by directing it through the specified location(s).


gsGetPointsMap(waypoints; ...) G

Example

=IMAGE(gsGetPointsMap(Object))

Description

Use gsGetPointsMap to return the static map with multiple points.

This function to be used with formula =IMAGE(gsGetPointsMap(...))
See https://support.google.com/docs/answer/3093333

waypoints

Specifies an ordered list of locations: addresses (limited to a maximum of 15 locations that requires geocoding) or latitude and longitude values (for example, "40.714728,-73.998672").


bsDirectionsDistance(waypoints; [mode]; [distanceUnit]; [dateTime]; [timeType]; [avoid]; [optimize]; [optimizeWaypoints]; [options]) B

Example

bsDirectionsDistance(array_of_strings; string; string; date_and_time; string; string; string; string; string)

Description

A custom function that gets the route distance between multiple addresses or points.

waypoints

(required) Specifies an ordered list of origin and destination points and intermediate locations to include along the route as pass through or stopover locations. Waypoints alter a route by directing it through the specified location(s).

mode

(optional) specifies what mode of transport to use when calculating directions. Valid values are: Driving (default), Walking, Transit, Truck

distanceUnit

(optional) The units to use for distance in the response. Valid values are: Kilometer or km (default), Mile or mi.

dateTime

Required when the travel mode is Transit. Optional for Driving. The dateTime parameter identifies the desired transit time, such as arrival time or departure time. The transit time type is specified by the timeType parameter. Example: 2013-07-04T17:00:00Z, 03/01/2011 05:42:00, 05:42:00 [assumes the current day], 03/01/2011 [assumes the current time]

timeType

Required when the travel mode is Transit Specifies how to interpret the date and transit time value that is specified by the dateTime parameter. Valid values are: Arrival, Departure, LastAvailable (The dateTime parameter contains the latest departure time available for a transit request).

avoid

(optional) Specifies the road types to minimize or avoid when a route is created for the driving travel mode. Valid values are: highways, tolls, ferry, minimizeHighways, minimizeTolls, borderCrossing.

optimize

(optional) Specifies what parameters to use to optimize the route. Valid values are: distance, time (default), timeWithTraffic, timeAvoidClosure.

optimizeWaypoints

(optional) Instructs the API to rearrange the route waypoints and reduce the route cost specified with the optimize parameter. The route first waypoint wp.0 and last waypoint wp.n order is not changed, their position is considered fixed. Valid values are: true or false.

options

(optional) Set extra parameters: "parameter1:value1&parameterN:valueN&". See https://docs.microsoft.com/en-us/bingmaps/rest-services/routes/calculate-a-truck-route


bsDirectionsTime(waypoints; [mode]; [distanceUnit]; [dateTime]; [timeType]; [avoid]; [optimize]; [optimizeWaypoints]; [options]) B

Example

bsDirectionsTime(array_of_strings; string; string; date_and_time; string; string; string; string; string)

Description

A custom function that gets the duration in seconds on this route.

waypoints

(required) Specifies an ordered list of origin and destination points and intermediate locations to include along the route as pass through or stopover locations. Waypoints alter a route by directing it through the specified location(s).

mode

(optional) specifies what mode of transport to use when calculating directions. Valid values are: Driving (default), Walking, Transit, Truck

distanceUnit

(optional) The units to use for distance in the response. Valid values are: Kilometer or km (default), Mile or mi.

dateTime

Required when the travel mode is Transit. Optional for Driving. The dateTime parameter identifies the desired transit time, such as arrival time or departure time. The transit time type is specified by the timeType parameter. Example: 2013-07-04T17:00:00Z, 03/01/2011 05:42:00, 05:42:00 [assumes the current day], 03/01/2011 [assumes the current time]

timeType

Required when the travel mode is Transit Specifies how to interpret the date and transit time value that is specified by the dateTime parameter. Valid values are: Arrival, Departure, LastAvailable (The dateTime parameter contains the latest departure time available for a transit request).

avoid

(optional) Specifies the road types to minimize or avoid when a route is created for the driving travel mode. Valid values are: highways, tolls, ferry, minimizeHighways, minimizeTolls, borderCrossing.

optimize

(optional) Specifies what parameters to use to optimize the route. Valid values are: distance, time (default), timeWithTraffic, timeAvoidClosure.

optimizeWaypoints

(optional) Instructs the API to rearrange the route waypoints and reduce the route cost specified with the optimize parameter. The route first waypoint wp.0 and last waypoint wp.n order is not changed, their position is considered fixed. Valid values are: true or false.

options

(optional) Set extra parameters: "parameter1:value1&parameterN:valueN&". See https://docs.microsoft.com/en-us/bingmaps/rest-services/routes/calculate-a-truck-route


bsDirectionsCost(waypoints; [mode]; [distanceUnit]; [dateTime]; [timeType]; [avoid]; [optimize]; [optimizeWaypoints]; [options]) B

Example

bsDirectionsCost(array_of_strings; string; string; date_and_time; string; string; string; string; string)

Description

A custom function that gets the total fare (that is, the total ticket costs) on this route.

waypoints

(required) Specifies an ordered list of origin and destination points and intermediate locations to include along the route as pass through or stopover locations. Waypoints alter a route by directing it through the specified location(s).

mode

(optional) specifies what mode of transport to use when calculating directions. Valid values are: Driving (default), Walking, Transit, Truck

distanceUnit

(optional) The units to use for distance in the response. Valid values are: Kilometer or km (default), Mile or mi.

dateTime

Required when the travel mode is Transit. Optional for Driving. The dateTime parameter identifies the desired transit time, such as arrival time or departure time. The transit time type is specified by the timeType parameter. Example: 2013-07-04T17:00:00Z, 03/01/2011 05:42:00, 05:42:00 [assumes the current day], 03/01/2011 [assumes the current time]

timeType

Required when the travel mode is Transit Specifies how to interpret the date and transit time value that is specified by the dateTime parameter. Valid values are: Arrival, Departure, LastAvailable (The dateTime parameter contains the latest departure time available for a transit request).

avoid

(optional) Specifies the road types to minimize or avoid when a route is created for the driving travel mode. Valid values are: highways, tolls, ferry, minimizeHighways, minimizeTolls, borderCrossing.

optimize

(optional) Specifies what parameters to use to optimize the route. Valid values are: distance, time (default), timeWithTraffic, timeAvoidClosure.

optimizeWaypoints

(optional) Instructs the API to rearrange the route waypoints and reduce the route cost specified with the optimize parameter. The route first waypoint wp.0 and last waypoint wp.n order is not changed, their position is considered fixed. Valid values are: true or false.

options

(optional) Set extra parameters: "parameter1:value1&parameterN:valueN&". See https://docs.microsoft.com/en-us/bingmaps/rest-services/routes/calculate-a-truck-route


bsDirectionsRegionTravelSummary(waypoints; [mode]; [distanceUnit]; [dateTime]; [timeType]; [avoid]; [optimize]; [optimizeWaypoints]; [options]; [fields]) B

Example

bsDirectionsRegionTravelSummary(array_of_strings; string; string; date_and_time; string; string; string; string; string; string)

Description

A custom function that gets the travel summary of distance, time, and toll road distance by two entity types: country (e.g. US, Canada) and administrative division or subregion (e.g. “state” in US and “province” in Canada).

waypoints

(required) Specifies an ordered list of origin and destination points and intermediate locations to include along the route as pass through or stopover locations. Waypoints alter a route by directing it through the specified location(s).

mode

(optional) specifies what mode of transport to use when calculating directions. Valid values are: Driving (default), Walking, Transit, Truck

distanceUnit

(optional) The units to use for distance in the response. Valid values are: Kilometer or km (default), Mile or mi.

dateTime

Required when the travel mode is Transit. Optional for Driving. The dateTime parameter identifies the desired transit time, such as arrival time or departure time. The transit time type is specified by the timeType parameter. Example: 2013-07-04T17:00:00Z, 03/01/2011 05:42:00, 05:42:00 [assumes the current day], 03/01/2011 [assumes the current time]

timeType

Required when the travel mode is Transit Specifies how to interpret the date and transit time value that is specified by the dateTime parameter. Valid values are: Arrival, Departure, LastAvailable (The dateTime parameter contains the latest departure time available for a transit request).

avoid

(optional) Specifies the road types to minimize or avoid when a route is created for the driving travel mode. Valid values are: highways, tolls, ferry, minimizeHighways, minimizeTolls, borderCrossing.

optimize

(optional) Specifies what parameters to use to optimize the route. Valid values are: distance, time (default), timeWithTraffic, timeAvoidClosure.

optimizeWaypoints

(optional) Instructs the API to rearrange the route waypoints and reduce the route cost specified with the optimize parameter. The route first waypoint wp.0 and last waypoint wp.n order is not changed, their position is considered fixed. Valid values are: true or false.

options

(optional) Set extra parameters: "parameter1:value1&parameterN:valueN&". See https://docs.microsoft.com/en-us/bingmaps/rest-services/routes/calculate-a-truck-route

fields

(optional) One or more fields, specifying the types of place data to return, separated by a comma. See https://developers.google.com/places/web-service/details 


bsDirectionsMap(waypoints; [mode]; [distanceUnit]; [dateTime]; [timeType]; [avoid]; [optimize]; [optimizeWaypoints]; [options]; [imagerySet]) B

Example

bsDirectionsMap(array_of_strings; string; string; date_and_time; string; string; string; string; string; string)

Description

Use bsDirectionsMap to return the static map with the route calculated by using the waypoints in the order they are given.

This function to be used with formula =IMAGE(bsDirectionsMap(...)). See https://docs.microsoft.com/en-us/bingmaps/rest-services/imagery/get-a-static-map

waypoints

(required) Specifies an ordered list of origin and destination points and intermediate locations to include along the route as pass through or stopover locations. Waypoints alter a route by directing it through the specified location(s).

mode

(optional) specifies what mode of transport to use when calculating directions. Valid values are: Driving (default), Walking, Transit, Truck

distanceUnit

(optional) The units to use for distance in the response. Valid values are: Kilometer or km (default), Mile or mi.

dateTime

Required when the travel mode is Transit. Optional for Driving. The dateTime parameter identifies the desired transit time, such as arrival time or departure time. The transit time type is specified by the timeType parameter. Example: 2013-07-04T17:00:00Z, 03/01/2011 05:42:00, 05:42:00 [assumes the current day], 03/01/2011 [assumes the current time]

timeType

Required when the travel mode is Transit Specifies how to interpret the date and transit time value that is specified by the dateTime parameter. Valid values are: Arrival, Departure, LastAvailable (The dateTime parameter contains the latest departure time available for a transit request).

avoid

(optional) Specifies the road types to minimize or avoid when a route is created for the driving travel mode. Valid values are: highways, tolls, ferry, minimizeHighways, minimizeTolls, borderCrossing.

optimize

(optional) Specifies what parameters to use to optimize the route. Valid values are: distance, time (default), timeWithTraffic, timeAvoidClosure.

optimizeWaypoints

(optional) Instructs the API to rearrange the route waypoints and reduce the route cost specified with the optimize parameter. The route first waypoint wp.0 and last waypoint wp.n order is not changed, their position is considered fixed. Valid values are: true or false.

options

(optional) Set extra parameters: "parameter1:value1&parameterN:valueN&". See https://docs.microsoft.com/en-us/bingmaps/rest-services/routes/calculate-a-truck-route

imagerySet

(optional) The type of imagery. Valid values are: Aerial, AerialWithLabels, AerialWithLabelsOnDemand, Streetside, BirdsEye, BirdsEyeWithLabels, Road (default), CanvasDark, CanvasLight, CanvasGray.


bsDirectionsUrl(waypoints; [mode]; [imagerySet]) B

Example

bsDirectionsUrl(array_of_strings; string; string)

Description

A custom function that gets the URL on the route on map.

waypoints

(required) Specifies an ordered list of origin and destination points and intermediate locations to include along the route as pass through or stopover locations. Waypoints alter a route by directing it through the specified location(s).

mode

(optional) specifies what mode of transport to use when calculating directions. Valid values are: Driving (default), Walking, Transit, Truck

imagerySet

(optional) The type of imagery. Valid values are: Aerial, AerialWithLabels, AerialWithLabelsOnDemand, Streetside, BirdsEye, BirdsEyeWithLabels, Road (default), CanvasDark, CanvasLight, CanvasGray.


gsGetPlacePhoto(place_id; [photo_n]; [maxwidth]; [maxheight]) G

Example

=IMAGE(gsGetPlacePhoto(string; number; number; number))

Description

Use gsGetPlacePhoto to return the place photo. This function to be used with formula =IMAGE(gsGetPlacePhoto(...)). See https://support.google.com/docs/answer/3093333

This function to be used with formula =IMAGE(gsGetPointsMap(...))
See https://support.google.com/docs/answer/3093333

place_id

(required) A textual identifier that uniquely identifies a place.

photo_n

(optional) (default is 1) indicates the number of image of the place. Accepted values are from 1 to 10.

maxwidth

(optional) (default is 500) specifies the maximum desired width, in pixels, of the image returned. Accept an integer between 1 and 1600.

maxheight

(optional) (default is 500) specifies the maximum desired height, in pixels, of the image returned. Accept an integer between 1 and 1600.


gsGetStreetView(location; [width]; [height]; [heading]; [fov]; [pitch]; [radius]; [source]) G

Example

gsGetStreetView(string; number; number; number; number; number; number; string)

Description

Use gsGetStreetView to return the static street view. 

This function to be used with formula =IMAGE(gsGetPointsMap(...))
See https://support.google.com/docs/answer/3093333

location

(optional) can be either a text string (such as Chagrin Falls, OH) or a lat/lng value (40.457375,-80.009353).

width

(optional) specifies the output width of the image in pixels.

height

(required) specifies the output height of the image in pixels.

heading

(optional) indicates the compass heading of the camera. Accepted values are from 0 to 360. If no heading is specified, a value will be calculated that directs the camera towards the specified location.

fov

(optional) (default is 90) determines the horizontal field of view of the image. The field of view is expressed in degrees, with a maximum allowed value of 120.

pitch

(optional) (default is 0) specifies the up or down angle of the camera relative to the Street View vehicle. This is often, but not always, flat horizontal.

radius

(optional) (default is 50) sets a radius, specified in meters, in which to search for a panorama, centered on the given latitude and longitude.

source

(optional) limits Street View searches to selected sources. Valid values are: (default, outdoor). See https://developers.google.com/maps/documentation/streetview/intro


gsGetIsolineMapFrom(origins; mode; type; ranges; [departure]; [options]; [show_mode]) GH

Example

=IMAGE(gsGetIsolineMapFrom(value_or_array; string; string; value_or_array; date_and_time; string; number))

Description

Use gsGetIsolineMapFrom to calculate the area that can be reached for a given time or distance from single or multiple origins.

This function to be used with formula =IMAGE(gsGetIsolineMapFrom(...))
See https://support.google.com/docs/answer/3093333

origins

The starting positions.

mode

The mode, which describes the type of route calculation and whether to optimize the routing for traffic conditions or not: [fastest,shortest,balanced];[car(default),carHOV,pedestrian,truck];[traffic:(disabled,enabled)]

type

of range (distance, time)

ranges

of route (distance in meters, time in seconds)

departure

(optional) time. Example: 2013-07-04T17:00:00+02:00

options

(optional) See https://developer.here.com/documentation/routing/topics/resource-calculate-isoline.html#resource-calculate-isoline

show_mode

(optional) Isoline area fill mode:

-1 - no polygons, no intersection, 

0 - all polygons, no intersection, 

1 - no polygons, intersection of N polygons, 

2 - no contours and polygons, fill intersection only, 

3 - add intersection markers, 

4 - hide polygons markers


gsGetIsolineMapTo(destinations; mode; type; ranges; [arrival]; [options]; [show_mode]) GH

Example

=IMAGE(gsGetIsolineMapTo(value_or_array; string; string; value_or_array; date_and_time; string; number))

Description

Use gsGetIsolineMapTo to calculate the area that can be reached for a given time or distance to single or multiple destinations.

This function to be used with formula  =IMAGE(gsGetIsolineMapTo(...))
See https://support.google.com/docs/answer/3093333

destinations

The ending positions.

mode

The mode, which describes the type of route calculation and whether to optimize the routing for traffic conditions or not: [fastest,shortest,balanced];[car,carHOV,pedestrian,truck];[traffic:(disabled,enabled)]

type

of range (distance, time)

ranges

of route (distance in meters, time in seconds)

arrival

(optional) time. Example: 2013-07-04T17:00:00+02:00

options

(optional) See https://developer.here.com/documentation/routing/topics/resource-calculate-isoline.html#resource-calculate-isoline

show_mode

(optional) Isoline area fill mode:

-1 - no polygons, no intersection, 

0 - all polygons, no intersection, 

1 - no polygons, intersection of N polygons, 

2 - no contours and polygons, fill intersection only, 

3 - add intersection markers, 

4 - hide polygons markers


gsCommuteDistance(origin; destination; [mode]; [options]; [departure_time]; [arrival_time]) 

Example

gsCommuteDistance(String; String; string; string; date_and_time; date_and_time)

Description

A custom function that gets the total distance of the route.

origin

(required) The starting address.

destination

(required) The ending address.

mode

(optional) specifies what mode of transport to use when calculating directions (DRIVING,BICYCLING,TRANSIT,WALKING)

options

(optional) Set "optimize:true" to optimize the provided route by rearranging the waypoints in a more efficient order. See https://developers.google.com/maps/documentation/directions/intro

departure_time

(optional) Example: 2013-07-04T17:00:00+02:00 For requests where the travel mode is transit: You can optionally specify one of departure_time or arrival_time. If neither time is specified, the departure_time defaults to now (that is, the departure time defaults to the current time).

For requests where the travel mode is driving: You can specify the departure_time to receive a route and trip duration (response field: duration_in_traffic) that take traffic conditions into account. The departure_time must be set to the current time or some time in the future. It cannot be in the past.

arrival_time

(optional) Example: 2013-07-04T17:00:00+02:00 For requests where the travel mode is transit. You can specify either departure_time or arrival_time, but not both. Traffic conditions are not taken into account with this parameter.

gsCommuteTime(origin; destination; [mode]; [options]; [departure_time]; [arrival_time]) 

Example

gsCommuteTime(String; String; string; string; date_and_time; date_and_time)

Description

A custom function that gets the total duration of the route.

origin

(required) The starting address.

destination

(required) The ending address.

mode

(optional) specifies what mode of transport to use when calculating directions (DRIVING,BICYCLING,TRANSIT,WALKING)

options

(optional) Set "optimize:true" to optimize the provided route by rearranging the waypoints in a more efficient order. See https://developers.google.com/maps/documentation/directions/intro

departure_time

(optional) Example: 2013-07-04T17:00:00+02:00 For requests where the travel mode is transit: You can optionally specify one of departure_time or arrival_time. If neither time is specified, the departure_time defaults to now (that is, the departure time defaults to the current time).

For requests where the travel mode is driving: You can specify the departure_time to receive a route and trip duration (response field: duration_in_traffic) that take traffic conditions into account. The departure_time must be set to the current time or some time in the future. It cannot be in the past.

arrival_time

(optional) Example: 2013-07-04T17:00:00+02:00 For requests where the travel mode is transit. You can specify either departure_time or arrival_time, but not both. Traffic conditions are not taken into account with this parameter.


gsCommuteCost(origin; destination; [mode]; [options]; [departure_time]; [arrival_time]) 

Example

gsCommuteCost(String; String; string; string; date_and_time; date_and_time)

Description

A custom function that gets the total fare (that is, the total ticket costs) on this route.

origin

(required) The starting address.

destination

(required) The ending address.

mode

(optional) specifies what mode of transport to use when calculating directions (DRIVING,BICYCLING,TRANSIT,WALKING)

options

(optional) Set "optimize:true" to optimize the provided route by rearranging the waypoints in a more efficient order. See https://developers.google.com/maps/documentation/directions/intro

departure_time

(optional) Example: 2013-07-04T17:00:00+02:00 For requests where the travel mode is transit: You can optionally specify one of departure_time or arrival_time. If neither time is specified, the departure_time defaults to now (that is, the departure time defaults to the current time).

For requests where the travel mode is driving: You can specify the departure_time to receive a route and trip duration (response field: duration_in_traffic) that take traffic conditions into account. The departure_time must be set to the current time or some time in the future. It cannot be in the past.

arrival_time

(optional) Example: 2013-07-04T17:00:00+02:00 For requests where the travel mode is transit. You can specify either departure_time or arrival_time, but not both. Traffic conditions are not taken into account with this parameter.


gsCommuteURL(origin; destination; [mode]; [options]; [departure_time]; [arrival_time]) 

Example

gsCommuteURL(String; String; string; string; date_and_time; date_and_time)

Description

A custom function that gets the URL on the route on map.

To show the URL in the cell use formula =HYPERLINK(). See https://support.google.com/docs/answer/3093313

origin

(required) The starting address.

destination

(required) The ending address.

mode

(optional) specifies what mode of transport to use when calculating directions (DRIVING,BICYCLING,TRANSIT,WALKING)

options

(optional) Set "optimize:true" to optimize the provided route by rearranging the waypoints in a more efficient order. See https://developers.google.com/maps/documentation/directions/intro

departure_time

(optional) Example: 2013-07-04T17:00:00+02:00 For requests where the travel mode is transit: You can optionally specify one of departure_time or arrival_time. If neither time is specified, the departure_time defaults to now (that is, the departure time defaults to the current time).

For requests where the travel mode is driving: You can specify the departure_time to receive a route and trip duration (response field: duration_in_traffic) that take traffic conditions into account. The departure_time must be set to the current time or some time in the future. It cannot be in the past.

arrival_time

(optional) Example: 2013-07-04T17:00:00+02:00 For requests where the travel mode is transit. You can specify either departure_time or arrival_time, but not both. Traffic conditions are not taken into account with this parameter.


gsCommuteRouteMap(origin; destination; [mode]; [options]; [departure_time]; [arrival_time]) G

Example

=IMAGE(gsCommuteRouteMap(String; String; string; string; date_and_time; date_and_time))

Description

Use gsCommuteRouteMapto to return the static map with the route from origin to destination.

This function to be used with formula =IMAGE(gsCommuteRouteMap(...))
See https://support.google.com/docs/answer/3093333

origin

(required) The starting address.

destination

(required) The ending address.

mode

(optional) specifies what mode of transport to use when calculating directions (DRIVING,BICYCLING,TRANSIT,WALKING)

options

(optional) Set "optimize:true" to optimize the provided route by rearranging the waypoints in a more efficient order. See https://developers.google.com/maps/documentation/directions/intro

departure_time

(optional) Example: 2013-07-04T17:00:00+02:00 For requests where the travel mode is transit: You can optionally specify one of departure_time or arrival_time. If neither time is specified, the departure_time defaults to now (that is, the departure time defaults to the current time).

For requests where the travel mode is driving: You can specify the departure_time to receive a route and trip duration (response field: duration_in_traffic) that take traffic conditions into account. The departure_time must be set to the current time or some time in the future. It cannot be in the past.

arrival_time

(optional) Example: 2013-07-04T17:00:00+02:00 For requests where the travel mode is transit. You can specify either departure_time or arrival_time, but not both. Traffic conditions are not taken into account with this parameter.


generateRgbaColors(amount; [saturation]; [lightness]) 

Example

generateRgbaColors(number; number; number)

Description

Generates an array of RGB colors. Assumes s and l are contained in the set [0, 1] and returns r, g, and b in the set [0, 255].

amount

(required) The number of colors to generate. Limited by 360.

saturation

(optional) The saturation

lightness

(optional) The lightness


hslToRgba(h; s; l) 

Example

hslToRgba(number; number; number)

Description

Converts an HSL color value to RGB. Conversion formula adapted from http://en.wikipedia.org/wiki/HSL_color_space. Assumes h, s, and l are contained in the set [0, 1] and returns r, g, and b in the set [0, 255].

h

The hue

s

The saturation

l

The lightness


highlightDuplicates([colIndex]; [keepFormula])

Example

highlightDuplicates(character or number; sheet)

Description

Highlight rows with duplicates.

colIndex

(optional) column name or zero-based index to lookup duplicates 

keepFormula

(optional) Keep formula after inserting result. Values: false [default] - comment formula, true - keep formula, -1 - remove formula.


gsMultiNearbyPlaces(where; radius; [fields]; [n_results]; [what]; [type]; [rankby]; [opennow]; [minprice]; [maxprice]; [language]; [total_results]; [geo_factor]; [keepFormula]) IG

Example

gsMultiNearbyPlaces(string; number; array_of_strings; number; string; string; string; string; string; string; string; number; array_of_numbers)

Description

A custom function that finds nearby places.

where

(required) The 'where' input can be a set of addresses of Places.

radius

(required) Defines the distance (in meters) within which to bias place results. The maximum allowed radius is 50 000 meters. See https://developers.google.com/places/web-service/search

fields

(optional) One or more fields, specifying the types of place data to return, separated by a comma. See https://developers.google.com/places/web-service/search#PlaceSearchResults

Leave blank to include all available fields.

n_results

(optional) The limitation of returned results: 20 by default (if missing).

what

(optional) The 'what' input can be a set of types or names of Places. For types see https://developers.google.com/places/web-service/supported_types

type

(optional) Restricts the results to places matching the specified type. Only one type may be specified (if more than one type is provided, all types following the first entry are ignored). See https://developers.google.com/places/web-service/supported_types

rankby

(optional) Specifies the order in which results are listed. Note that rankby must not be included if radius is specified. Possible values are: prominence (default), distance. When distance is specified, one or more of keyword, name, or type is required.

opennow

(optional) Returns only those places that are open for business at the time the query is sent.

minprice

(optional) Restricts results to only those places within the specified range. Valid values range between 0 (most affordable) to 4 (most expensive), inclusive.

maxprice

(optional) Restricts results to only those places within the specified range. Valid values range between 0 (most affordable) to 4 (most expensive), inclusive.

language

(optional) The language code, indicating in which language the results should be returned, if possible. Note that some fields may not be available in the requested language. See https://developers.google.com/maps/faq#languagesupport

total_results

(optional) Total limitation of returned results for multiple conditions.

geo_factor

<optional> For geoJSON object only. Values: 0 - get only places inside geoJSON; <10 - the coefficient to be applied to the search radius (circumcircle); other - the search radius (circumcircle) is increased by the value.

keepFormula

(optional) Keep formula after inserting result. Values: false [default] - comment formula, true - keep formula, -1 - remove formula.


gsMultiFindPlaces(what; where; [n_results]; [fields]; [type]; [location]; [radius]; [language]; [total_results]; [geo_factor]; [keepFormula]) IG

Example

gsMultiFindPlaces(string; string; number; array_of_strings; string; string; number; string; number; array_of_numbers)

Description

A custom function that finds places. The search response will include a list of places. In case of missing fields parameter the header row is also included. Call this interactive function via UI menu 

Extensions - Maps for Sheets - Insert - Places - Batch text search


what

(required/optional) The 'what' input can be a set of types or names of Places. For types see https://developers.google.com/places/web-service/supported_types

where

(optional/required) The 'where' input can be a set of addresses of Places.

n_results

(optional) The limitation of returned results: 20 by default (if missing).

fields

(required) One or more fields, specifying the types of place data to return, separated by a comma. See https://developers.google.com/places/web-service/search#PlaceSearchResults

Leave blank to see all available fields.

type

(optional) Restricts the results to places matching the specified type. Only one type may be specified (if more than one type is provided, all types following the first entry are ignored). See https://developers.google.com/places/web-service/supported_types

location

(optional) Prefer results in a specified area by specifying either lat/lng or address: [lat,lng][address]. If this parameter is not specified, the API uses IP address biasing by default.

radius

<optional> Defines the distance (in meters) within which to bias place results. The maximum allowed radius is 50 000 meters. See https://developers.google.com/places/web-service/search

language

(optional) The language code, indicating in which language the results should be returned, if possible. Note that some fields may not be available in the requested language. See https://developers.google.com/maps/faq#languagesupport

total_results

(optional) Total limitation of returned results for multiple conditions.

geo_factor

<optional> For geoJSON object only. Values: 0 - get only places inside geoJSON; <10 - the coefficient to be applied to the search radius (circumcircle); other - the search radius (circumcircle) is increased by the value.

keepFormula

(optional) Keep formula after inserting result. Values: false [default] - comment formula, true - keep formula, -1 - remove formula.


gsInsertHeatmap(insert_into; latitudes; longitudes; [weights]; [maptype]; [width]; [height]; [gradient]; [radius]; [opacity]; [maxIntensity]; [dissipating]; [keepFormula]) IG

Example

gsInsertHeatmap(string; array_of_numbers; array_of_numbers; array_of_numbers; string; number; number; array_of_colors; number; number; number; boolean)

Description

A custom function that returns the heatmap image. Call this interactive function via UI menu 

Extensions - Maps for Sheets - Insert - Heatmap - Heat map

insert_into

(required) The target cell where the heatmap will be inserted.

latitudes

(required) Latitudes of the points for the heatmap.

longitudes

(required) Longitudes of the points for the heatmap.

weights

(optional) Weights of the points for the heatmap.

maptype

(optional) Type of the map for building the heatmap. The following map types are available in the Maps JavaScript API: roadmap, satellite (default), hybrid, terrain. See https://developers.google.com/maps/documentation/javascript/maptypes

width

(optional) defines the width dimension of the map image.

height

(optional) defines the height dimension of the map image.

gradient

(optional) The color gradient of the heatmap, specified as an array of CSS color strings. All CSS3 colors — including RGBA — are supported except for extended named colors and HSL(A) values.

radius

(optional) The radius of influence for each data point, in pixels.

opacity

(optional) The opacity of the heatmap, expressed as a number between 0 and 1.

maxIntensity

(optional) The maximum intensity of the heatmap. By default, heatmap colors are dynamically scaled according to the greatest concentration of points at any particular pixel on the map. This property allows you to specify a fixed maximum. Setting the maximum intensity can be helpful when your dataset contains a few outliers with an unusually high intensity.

dissipating

(optional) Specifies whether heatmaps dissipate on zoom. When dissipating is false the radius of influence increases with zoom level to ensure that the color intensity is preserved at any given geographic location. Defaults to true.

keepFormula

(optional) Keep formula after inserting result. Values: false [default] - comment formula, true - keep formula, -1 - remove formula.


geoPoint(points; [n_results]; [details]; [properties])

Example

geoPoint(array_of_points; number; value; Object)

Description

Creates Point GeoJSON object from point with coordinates or address.

points

(required) Latitude/longitude pair or address of the points.

n_results

(optional) The limitation of returned results.

details

(optional) One or more properties returned by geocode separated by a comma to assign to the object properties (non-zero values only). See https://developers.google.com/maps/documentation/geocoding/intro

properties

(optional) optional properties in JSON format: {“property1”: “value1”, “property2”: “value2” }


geoPolygon(points; [properties])

Example

geoPolygon(array_of_points; JSON_string)

Description

Takes GeoPoints, coordinates or addresses and creates Polygon GeoJSON object.

points

(required) geo-object, latitudes/longitudes or addresses of the polygon vertices.

properties

(optional) optional properties in JSON format: {“property1”: “value1”, “property2”: “value2” }


geoRectangle(points; width; height; [units]; [properties])

Example

geoRectangle(Object; number; number; string; JSON_string)

Description

Takes Point, coordinates or address and calculates the rectangle given size in meters (default), degrees, radians, miles, or kilometers.

points

(required) geo-object, latitudes/longitudes or address of the center point.

width

(required) width of the rectangle.

height

(required) height of the rectangle.

units

(optional) meters (default), miles, kilometers, degrees, or radians.

properties

(optional) optional properties in JSON format: {“property1”: “value1”, “property2”: “value2” }


geoCircle(points; radius; [units]; [steps]; [properties])

Example

geoCircle(Object; number; string; number; JSON_string)

Description

Takes Point, coordinates or address and calculates the circle polygon given a radius in meters (default), degrees, radians, miles, or kilometers; and steps for precision.

points

(required) geo-object, latitudes/longitudes or address of the center point.

radius

(required) Radius of the circle.

units

(optional) Meters (default), miles, kilometers, degrees, or radians.

steps

(optional) Number of steps. Default is 64.

properties

(optional) optional properties in JSON format: {“property1”: “value1”, “property2”: “value2”}


geoShape(searchtext; [n_results],[backoff])

Example

geoShape(string; number; number)

Description

Creates GeoJSON object from an address or search text. The returned data depends on the parameter 'backoff'.

searchtext

(required) address or search text.

n_results

(optional) The limitation of returned results.

backoff

(optional) If no shape data in the response then returns: -1 - nothing, 0 (default) - geoPoint, 1 - bounding box.


geoLineString(points, properties)

Example

geoLineString(array_of_points, string)

Description

Takes GeoPoints, coordinates or addresses and creates LineString Feature GeoJSON object.

points

(required) geo-object, latitudes/longitudes or addresses of the lineString points.

properties

(optional) optional properties in JSON format: {“property1”: “value1”, “property2”: “value2”}


geoBBox(geo)

Example

geoBBox(array_of_points)

Description

Takes GeoJSON objects, address or coordinates of points and calculates the bounding box of all input features, and returns an equivalent polygon.

geo

(required) geo-object, latitudes/longitudes or address of the points.


geoDraw([insert_into]; [geo]; [readOnly], [map_init], [keepFormula])

Example

geoDraw(string; geojson)

Description

Draw the shape interactively. Call this interactive function via UI menu.

insert_into

(optional) The target cell where the drawn shape will be inserted.

geo

(optional) GeoJSON shape to edit

readOnly

(optional) GeoJSON shape to display only

map_init

(optional) GeoJSON map options

keepFormula

(optional) Keep formula after inserting result. Values: false [default] - comment formula, true - keep formula, -1 - remove formula.


geoLoadJSON(url)

Example

geoLoadJSON(string)

Description

Loads GeoJSON object from the URL. Holes in polygons are not supported.

url

The URL of the GeoJSON object.


geoIsolineFrom(origin; mode; type; ranges; [departure]; [options])

Example

geoIsolineFrom(string; string; string; value_or_array; date_and_time; string)

Description

Calculates the region that can be reached for a given time or distance from given origin

origin

The starting position as geojson point or address/coordinates string.

mode

The mode, which describes the type of route calculation and whether to optimize the routing for traffic conditions or not: [fastest,shortest,balanced];[car(default),carHOV,pedestrian,truck];[traffic:(disabled,enabled)]

type

of range (distance, time)

ranges

of route (distance in meters, time in seconds)

departure

time. Example: 2013-07-04T17:00:00+02:00

options

See https://developer.here.com/documentation/routing/topics/resource-calculate-isoline.html#resource-calculate-isoline


geoIsolineTo(destination; mode; type; ranges; [arrival]; [options])

Example

geoIsolineTo(string; string; string; value_or_array; date_and_time; string)

Description

Calculates the region that can be reached from for a given time or distance to given destinations

destination

The ending position as geojson point or address/coordinates string.

mode

The mode, which describes the type of route calculation and whether to optimize the routing for traffic conditions or not: [fastest,shortest,balanced];[car,carHOV,pedestrian,truck];[traffic:(disabled,enabled)]

type

of range (distance, time)

ranges

of route (distance in meters, time in seconds)

arrival

time. Example: 2013-07-04T17:00:00+02:00

options

See https://developer.here.com/documentation/routing/topics/resource-calculate-isoline.html#resource-calculate-isoline


geoToMap(objects)

Example

geoToMap(geojson)

Description

Plots GeoGSON objects and returns the map image. This function to be used with formula =IMAGE(geoToMap(...)). See https://support.google.com/docs/answer/3093333

objects

input GeoJSON object or geoMapOptions object


geoMapOptions([width]; [height]; [mapType]; [language]; [zoom]; [center_lat]; [center_lng]; [style]; [tilt])

Example

geoMapOptions(number, number, string, string, number, string, string, array_of_strings, number)

Description

Creates options for GeoJSON objects plotting by geoToMap() function.

width

(optional) The width of the image in pixels.

height

(optional) The height of the image in pixels.

mapType

(optional) A constant value: ROADMAP(default), SATELLITE, TERRAIN, HYBRID.

language

(optional) A BCP-47 language identifier.

zoom

(optional) A value from zero to 21, inclusive.

center_lat

(optional) The address of the center or the latitude of the center.

center_lng

(optional) The longitude of the center.

style

(optional) One or more map style parameters. See https://developers.google.com/maps/documentation/maps-static/styling

tilt

(optional) Controls the automatic switching behavior for the angle of incidence of the map. The only allowed values are 0 and 45.


geoToKml(objects)

Example

geoToKml(geojson)

Description

Converts GeoGSON objects to KML.

objects

(required) input GeoJSON object(s) for conversion


gsDownload(arg; [filename]; [keepFormula])

Example

gsDownload(range; string)

Description

Data download from the cell(s).

arg

(required) cell(s) for downloading data from

filename

(optional)

keepFormula

(optional) Keep formula after inserting result. Values: false [default] - comment formula, true - keep formula, -1 - remove formula.


gsDownloadPlacePhoto(place_id, [photo_n], [maxwidth], [maxheight], [filename], [keepFormula])

Example

gsDownloadPlacePhoto(string)

Description

Download place image(s).

place_id

(required) A textual identifier that uniquely identifies a place.

photo_n

(optional) (default is 1) indicates the number of image of the place. Accepted values are from 1 to 10.

maxwidth

(optional) (default is 500) specifies the maximum desired width, in pixels, of the image returned. Accept an integer between 1 and 1600.

maxheight

(optional) (default is 500) specifies the maximum desired height, in pixels, of the image returned. Accept an integer between 1 and 1600.

filename

(optional)

keepFormula

(optional) Keep formula after inserting result. Values: false [default] - comment formula, true - keep formula, -1 - remove formula.


gsDownloadStreetViewImage(location, [width], [height], [heading], [fov], [pitch], [radius], [source], [filename], [keepFormula])

Example

gsDownloadStreetViewImage(string)

Description

Download street view image(s).

location

(required) can be either a text string (such as Chagrin Falls, OH) or a lat/lng value (40.457375,-80.009353).

width

(optional) specifies the output width of the image in pixels.

height

(optional) specifies the output height of the image in pixels.

heading

(optional) indicates the compass heading of the camera. Accepted values are from 0 to 360. If no heading is specified, a value will be calculated that directs the camera towards the specified location.

fov

(optional) (default is 90) determines the horizontal field of view of the image. The field of view is expressed in degrees, with a maximum allowed value of 120.

pitch

(optional) (default is 0) specifies the up or down angle of the camera relative to the Street View vehicle. This is often, but not always, flat horizontal.

radius

(optional) (default is 50) sets a radius, specified in meters, in which to search for a panorama, centered on the given latitude and longitude.

source

(optional) limits Street View searches to selected sources. Valid values are: (default, outdoor). See https://developers.google.com/maps/documentation/streetview/intro

filename

(optional)

keepFormula

(optional) Keep formula after inserting result. Values: false [default] - comment formula, true - keep formula, -1 - remove formula.


gsDownloadActiveRangeImages([filename], [keepFormula])

Example

gsDownloadActiveRangeImages(string)

Description

Download =IMAGE(...) image(s) from selected range.

filename

(optional)

keepFormula

(optional) Keep formula after inserting result. Values: false [default] - comment formula, true - keep formula, -1 - remove formula.


gsDownloadFormulaImages([rangeAddress], [filename], [keepFormula])

Example

gsDownloadFormulaImages("A1:B2","My Object Views")

Description

Download =IMAGE(...) image(s) from active sheet.

rangeAddress

(optional)

filename

(optional)

keepFormula

(optional) Keep formula after inserting result. Values: false [default] - comment formula, true - keep formula, -1 - remove formula.


gsDownloadOvergridImages([keepFormula])

Example

gsDownloadOvergridImages()

Description

Download overgrid image(s) from active sheet.

keepFormula

(optional) Keep formula after inserting result. Values: false [default] - comment formula, true - keep formula, -1 - remove formula.


gsFormulasToggle([mode], [rangeAddress], [keepFormula])

Example

gsFormulasToggle(,"A1:B2")

Description

Toggle formulas.

mode

(optional) Toggle formulas. Values: none - toggle, true - enable, false - disable

rangeAddress

(optional) Range scope. Values: none (default) - current selection, "string" - range address (example: "A1:B2"), 2 - range areas, -1 - used data range

keepFormula

(optional) Keep formula after inserting result. Values: false [default] - comment formula, true - keep formula, -1 - remove formula.


gsFormulasEnable([rangeAddress], [keepFormula])

Example

gsFormulasEnable("A1:B2")

Description

Enable formulas.

rangeAddress

(optional) Range scope. Values: none (default) - current selection, "string" - range address (example: "A1:B2"), 2 - range areas, -1 - used data range

keepFormula

(optional) Keep formula after inserting result. Values: false [default] - comment formula, true - keep formula, -1 - remove formula.


gsFormulasDisable([rangeAddress], [keepFormula])

Example

gsFormulasDisable("A1:B2")

Description

Disable formulas.

rangeAddress

(optional) Range scope. Values: none (default) - current selection, "string" - range address (example: "A1:B2"), 2 - range areas, -1 - used data range

keepFormula

(optional) Keep formula after inserting result. Values: false [default] - comment formula, true - keep formula, -1 - remove formula.


geoSetColor(geo; [color]; [strokeColor]; [strokeWeight])

Example

geoSetColor(Object; string; string; number)

Description

Sets the geo-object style.

geo

(required) geo-objects.

color

(optional) The fill color, a string in the format "0xrrggbb" or a constant value from https://developers.google.com/apps-script/reference/maps/color

strokeColor

(optional) The line color, a string in the format "0xrrggbb" or a constant value from https://developers.google.com/apps-script/reference/maps/color

strokeWeight

(optional) The width of lines in pixels.


geoSetMarkerIcon(geo; imageUrl)

Example

geoSetMarkerIcon(array_of_geo; string)

Description

Set the marker icon.

geo

(required) geo-points.

imageUrl

(required) Specifies a URL to use as the marker's custom icon. Images may be in PNG, JPEG or GIF formats, though PNG is recommended.


geoDistance(object1; object2; [units])

Example

geoDistance(Object; Object; string)

Description

Calculates minimal distance between two objects. Negative value means position inside the object.

object1

GeoJSON object

object2

GeoJSON object

units

(optional) can be meters (default), degrees, radians, miles, or kilometers


geoGetArea(geo)

Example

geoGetArea(Object)

Description

Takes one or more objects and returns their area in square meters.

geo

input GeoJSON object(s)


geoGetCentroid(geo)

Example

geoGetCentroid(Object)

Description

Takes GeoGSON object and returns the centroid using the mean of all vertices. This lessens the effect of small islands and artifacts when calculating the centroid of a set of polygons.

geo

input GeoJSON object


geoGetCenter(geo)

Example

geoGetCenter(Object)

Description

Takes GeoGSON object and returns the absolute center point of all features.

geo

input GeoJSON object


geoGetLatLng(geo)

Example

geoGetLatLng(Object)

Description

Takes GeoGSON object and unwrap the center coordinates.

geo

input GeoJSON object


geoGetLatLngString(geo)

Example

geoGetLatLng(Object)

Description

Takes GeoGSON object and returns the center coordinates as a string.

geo

input GeoJSON object


geoGetCoords(geo; [type])

Example

geoGetCoords(geojson; array_of_strings)

Description

Unwrap coordinates from a GeoJSON objects or an Array

geo

GeoJSON object to unwrap coordinates

type

(optional) One or more fields, specifying the types of geoJSON objects to return coordinates


geoProperties(input)

Example

geoProperties(Object)

Description

Return GeoGSON object properties.

input

GeoJSON objects to extract properties


geoSetProperty(geo; key; property)

Example

geoSetProperty(array_of_geo; string; string)

Description

Sets the geo-object property.

geo

(required) geo-objects.

key

(optional) Key for geo-object property.

property

(optional) Value for geo-object property. Use empty string to cleanup property.


geoSetProperties(geo; properties)

Example

geoSetProperties(array_of_geo; json_string)

Description

Sets the geo-object properties.

geo

(required) geo-objects.

properties

(optional) Add JSON object to geo-object properties: {“property1”: “value1”, “property2”: “value2” }. Use an empty object {} to cleanup properties.


geoGeometry(geo)

Example

geoGeometry(Object)

Description

Return GeoGSON object geometry.

geo

GeoJSON object to extract geometry


geoFlip(geo)

Example

geoFlip(geojson)

Description

Takes input GeoJSON objects and flips all of their coordinates from [x, y] to [y, x].

geo

GeoJSON object to flips coordinates


geoToTable(input; [fields])

Example

geoToTable(Object; Object)

Description

Output GeoGSON objects and returns the table with defined fields.

input

GeoJSON objects to output data

fields

(optional) One or more fields, specifying the types of place data to return, separated by a comma.


geoLinkContained(geo)

Example

geoLinkContained(Object)

Description

Checks if a geolink is contained in a GeoJSON object.

geo

GeoJSON object for check.


geoLinkResolve(geo)

Example

geoLinkResolve(Object)

Description

Resolves geolink contained in a GeoJSON object. Objects longer than the maximum allowed string length in the cell will cause an error.

geo

GeoJSON object to resolve link


geoIntersect(objects; ...)

Example

geoIntersect(geojson)

Description

Takes GeoGSON objects and finds their intersection.

objects

input GeoJSON object


geoUnion(geo; ...)

Example

geoUnion(geojson)

Description

Takes two or more GeoGSON polygons and returns a combined polygon.

geo

input GeoJSON object


geoSubtract(base; shapes; ...)

Description

geoSubtract(geojson; geojson)

Description

Takes two or more GeoGSON polygons and removes the area of a shape or set of shapes from a base shape. Holes in polygons are not supported by geoToMap.

base

GeoJSON object

shapes

GeoJSON objects for subtracting


geoGetChilds(geo; [type]; [items])

Example

geoGetChilds(Object; array_of_strings; number)

Description

Takes GeoGSON objects and returns child objects.

geo

input GeoJSON object

items

1-based indices of child objects to return

type

object to return like 'Point', 'Polygon'


geoContainsPoints(obj; args; ...)

Example

geoContainsPoints(Object; geojson)

Description

Finds and returns Points that fall within the GeoJSON object.

obj

Points must be within these GeoJSON object

args

Points as input search


geoNearbyPlaces(location; radius; [n_results]; [fields]; [keyword]; [type]; [rankby]; [opennow]; [minprice]; [maxprice])

Example

geoNearbyPlaces(string_or_geopoint; number; number; array_of_strings; string; string; string; string; string; string)

Description

Finds nearby places and returns GeoGSON points.

location

(required) Prefer results in a specified area by specifying either geopoint or lat/lng or address: [geojson][lat,lng][address].

radius

(required) Defines the distance (in meters) within which to return place results. The maximum allowed radius is 50 000 meters. Note that radius must not be included if rankby=distance. See https://developers.google.com/places/web-service/search

n_results

(optional) The limitation of returned results: 20 by default (if missing or with trial Google API key).

fields

(optional) One or more fields, specifying the types of place data to return, separated by a comma. See https://developers.google.com/places/web-service/search#PlaceSearchResults

Leave blank to include all available fields.

keyword

(optional) A term to be matched against all content that Google has indexed for this place, including but not limited to name, type, and address, as well as customer reviews and other third-party content.

type

(optional) Restricts the results to places matching the specified type. Only one type may be specified (if more than one type is provided, all types following the first entry are ignored). See https://developers.google.com/places/web-service/supported_types

rankby

(optional) Specifies the order in which results are listed. Note that rankby must not be included if radius is specified. Possible values are: prominence (default), distance. When distance is specified, one or more of keyword, name, or type is required.

opennow

(optional) Returns only those places that are open for business at the time the query is sent.

minprice

(optional) Restricts results to only those places within the specified range. Valid values range between 0 (most affordable) to 4 (most expensive), inclusive.

maxprice

(optional) Restricts results to only those places within the specified range. Valid values range between 0 (most affordable) to 4 (most expensive), inclusive.


geoFindPlaces(query; [n_results]; [fields]; [type]; [location]; [radius]; [language])

Example

geoFindPlaces(string; number; array_of_strings; string; string; number; string)

Description

Finds places and returns GeoGSON points.

query

(required) A Find Place request takes a text input, and returns a place. The text input can be any kind of Places data, for example, a name or address.

n_results

(optional) The limitation of returned results: 20 by default (if missing or with trial Google API key).

fields

(optional) One or more fields, specifying the types of place data to return, separated by a comma. See https://developers.google.com/places/web-service/search#PlaceSearchResults

Leave blank to include all available fields.

type

(optional) Restricts the results to places matching the specified type. Only one type may be specified (if more than one type is provided, all types following the first entry are ignored). See https://developers.google.com/places/web-service/supported_types

location

(optional) Prefer results in a specified area by specifying either lat/lng or address: [lat,lng][address]. If this parameter is not specified, the API uses IP address biasing by default.

radius

(optional) Defines the distance (in meters) within which to bias place results. The maximum allowed radius is 50 000 meters. See https://developers.google.com/places/web-service/search

language

(optional) The language code, indicating in which language the results should be returned, if possible. Note that some fields may not be available in the requested language. See https://developers.google.com/maps/faq#languagesupport


geoBoundaries(place; level; [language])

Example

geoBoundaries(geojson_or_latlng_or_string; string; string)

Description

Returns GeoJSON objects for administrative area around a geo-point or areas inside a geo-shape. Important note: This function is very time consuming, therefore, to query a number of results, it is recommended to divide the query area into subareas, as well as use an interactive call via the Insert - Function menu. Some areas may not contain shape information.

place

(required) GeoJSON object, latlng or address string.

level

(required) Target match level of the search result: one of [Country, State, County, City, District, PostalCode].

language

(optional) The language code, indicating in which language the results should be returned, if possible. Note that some fields may not be available in the requested language. See https://developers.google.com/maps/faq#languagesupport

geoFindWithinBoundaries(where; what; [fields]; [type]; [language]; [total_results]; [geo_factor]; [grid_spacing]; [cell_results]; [platform], [keepFormula]) IGH*

Example

geoFindWithinBoundaries(geojson_or_latlng_or_string; array_of_strings; array_of_strings; array_of_strings; number; string; string; string; string; number; number; number; string)

Description

A custom function that finds nearby places.

where

(required) The 'where' input can be a set of addresses of Places.

what

(required) The 'what' input can be a set of types or names of Places. For types see https://developers.google.com/places/web-service/supported_types

fields

(optional) One or more fields, specifying the types of place data to return, separated by a comma. See https://developers.google.com/places/web-service/search#PlaceSearchResults

Leave blank to include all available fields.

type

(optional) For Google Maps only. Restricts the results to places matching the specified type. Only one type may be specified (if more than one type is provided, all types following the first entry are ignored). See https://developers.google.com/places/web-service/supported_types

language

(optional) The language code, indicating in which language the results should be returned, if possible. Note that some fields may not be available in the requested language. See https://developers.google.com/maps/faq#languagesupport

total_results

(optional) Total limitation of returned results for multiple conditions.

geo_factor

(optional) For geoJSON objects only. Values: 0 - get only places inside geoJSON; <10 - the coefficient to be applied to the search radius (circumcircle); other - the search radius (circumcircle) is increased by the value.

grid_spacing

(optional) Defines the grid spacing (in meters) to split the search area.

cell_results

(optional) Limiting returned results per cell: maximum value 60 (due to Google Maps API search limits)

platform

(optional) Maps API platform: 'google'(default) or 'here'.

keepFormula

(optional) Keep formula after inserting result. Values: false [default] - comment formula, true - keep formula, -1 - remove formula.


geoGetGrid(geo; radius; units; items)

Example

geoGetGrid(geojson; number; string; array)