A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/apps-script/reference/maps/maps below:

Class Maps | Apps Script

Class Maps

Stay organized with collections Save and categorize content based on your preferences.

Maps

Allows for direction finding, geocoding, elevation sampling and the creation of static map images.

Detailed documentation decodePolyline(polyline)

Decodes an encoded polyline string back into an array of points.

// Decodes a string representation of the latitudes and longitudes of
// Minneapolis and Milwaukee respectively.
const polyline = 'qvkpG`qhxPbgyI_zq_@';
const points = Maps.decodePolyline(polyline);
for (let i = 0; i < points.length; i += 2) {
  Logger.log('%s, %s', points[i], points[i + 1]);
}
Parameters Name Type Description polyline String An encoded polyline to decode. Return

Number[] — An array of latitude longitude pairs (lat0, long0, lat1, long1, ...).

See also encodePolyline(points)

Encodes an array of points into a string.

// The latitudes and longitudes of New York and Boston respectively.
const points = [40.77, -73.97, 42.34, -71.04];
const polyline = Maps.encodePolyline(points);
Parameters Name Type Description points Number[] An array of latitude/longitude pairs to encode. Return

String — An encoded string representing those points.

See also newDirectionFinder()

Creates a new DirectionFinder object.

Return

DirectionFinder — A new direction finder object.

newElevationSampler()

Creates an ElevationSampler object.

Return

ElevationSampler — A new elevation sampler object.

newGeocoder()

Creates a new Geocoder object.

Return

Geocoder — A new geocoder object.

newStaticMap()

Creates a new StaticMap object.

Return

StaticMap — A new static map object.

setAuthentication(clientId, signingKey)

Enables the use of an externally established Google Maps APIs Premium Plan account, to leverage additional quota allowances. Your client ID and signing key can be obtained from the Google Enterprise Support Portal. Set these values to null to go back to using the default quota allowances.

Note: This method doesn't work with API keys. Additionally, please note that Premium Plan is no longer available for new customers. If you don't already have a Premium Plan license, please don't call setAuthentication(clientId, signingKey). You are able to use the Maps methods with the default quota allowances.
Maps.setAuthentication('gme-123456789', 'VhSEZvOXVSdnlxTnpJcUE');
Parameters Name Type Description clientId String A client identifier. signingKey String A private signing key.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-12-03 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-03 UTC."],[[["The Maps service facilitates tasks such as finding directions, geocoding addresses, sampling elevation data, and generating static map images."],["It provides functionalities for encoding and decoding polylines, representing geographical coordinates."],["You can create dedicated objects for direction finding, elevation sampling, geocoding, and static map creation."],["For users with a Google Maps APIs Premium Plan, authentication can be set to utilize enhanced quota allowances."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4