Stay organized with collections
Save and categorize content based on your preferences.
Modifies the Google Maps basemap. Allows for: 1) Setting the current MapType. 2) Providing custom styles for the basemap (MapTypeStyles). 3) Setting the list of available mapTypesIds for the basemap.
If called with no parameters, resets the map type to the Google Maps default.
Returns this ui.Map.
Usage
Returns
Map.setOptions(mapTypeId, styles, types)
ui.Map
Argument
Type
Details
this: ui.map
ui.Map
The ui.Map instance.
mapTypeId
String, optional
A mapTypeId to set the basemap to. Can be one of "ROADMAP", "SATELLITE", "HYBRID", or "TERRAIN" to select one of the standard Google Maps API map types, or one of the keys specified in the opt_styles dictionary. If left as null and only 1 style is specified in opt_styles, that style will be used.
styles
Object, optional
A dictionary of custom MapTypeStyle objects keyed with a name that will appear in the map's Map Type Controls. See: https://developers.google.com/maps/documentation/javascript/reference#MapTypeStyle
types
List, optional
A list of mapTypeIds to make available. If omitted, but opt_styles is specified, appends all of the style keys to the standard Google Maps API map types.
[[["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 2023-10-06 UTC."],[[["Modifies the Google Maps basemap by setting the map type, providing custom styles, and controlling available map types."],["Accepts `mapTypeId`, `styles`, and `types` as parameters to customize the basemap's appearance and functionality."],["Resets the map to the default Google Maps style if called without any parameters."],["Allows the use of standard Google Maps API map types (\"ROADMAP\", \"SATELLITE\", \"HYBRID\", \"TERRAIN\") or custom styles defined using MapTypeStyle objects."],["Offers flexibility in controlling the visibility of map types through the `types` parameter."]]],["This tool modifies the Google Maps basemap by setting the `mapTypeId` (e.g., \"ROADMAP\", \"SATELLITE\"). It allows custom styles (`MapTypeStyles`) via a dictionary, with user-defined names. Users can control available map types using a list of `mapTypeIds`. If no parameters are specified it defaults to the original Google Maps basemap. Example usage is shown, to set different Map Types, add a style (like Inverted) or control the displayed Map Types.\n"]]