Stay organized with collections
Save and categorize content based on your preferences.
GMSMapStyle
@interfaceGMSMapStyle:NSObject
GMSMapStyle holds details about a style which can be applied to a map.
With style options you can customize the presentation of the standard Google map styles, changing
the visual display of features like roads, parks, and other points of interest. As well as
changing the style of these features, you can also hide features entirely. This means that you
can emphasize particular components of the map or make the map complement the content of your
app.
[[["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-11-15 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMSMapStyle\u003c/code\u003e allows customization of the visual display of Google Maps features like roads, parks, and points of interest.\u003c/p\u003e\n"],["\u003cp\u003eYou can change the style of map features or hide them completely to highlight specific elements or complement your app's content.\u003c/p\u003e\n"],["\u003cp\u003eStyles can be created using a JSON string with \u003ccode\u003estyleWithJSONString:error:\u003c/code\u003e or from a JSON file with \u003ccode\u003estyleWithContentsOfFileURL:error:\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eInvalid JSON, unreadable files, or incorrect URLs will result in a nil return value and populate an error object if provided.\u003c/p\u003e\n"]]],["`GMSMapStyle` allows customization of Google map styles, including visual changes and feature hiding. Styles are created via JSON strings or files. `styleWithJSONString:error:` generates a style from a JSON string, while `styleWithContentsOfFileURL:error:` creates a style from a JSON file. Both methods return nil and provide an error if the style is invalid, the file is unreadable, or the URL is not a file URL.\n"],null,["GMSMapStyle \n\n @interface GMSMapStyle : NSObject\n\n`GMSMapStyle` holds details about a style which can be applied to a map.\n\nWith style options you can customize the presentation of the standard Google map styles, changing\nthe visual display of features like roads, parks, and other points of interest. As well as\nchanging the style of these features, you can also hide features entirely. This means that you\ncan emphasize particular components of the map or make the map complement the content of your\napp.\n\nFor more information see: \u003chttps://developers.google.com/maps/documentation/ios-sdk/styling\u003e\n- `\n ``\n ``\n `\n\n [+styleWithJSONString:error:](#/c:objc(cs)GMSMapStyle(cm)styleWithJSONString:error:)`\n ` \n Creates a style using a string containing JSON.\n\n Returns nil and populates `error` (if provided) if `style` is invalid. \n\n Declaration \n Swift \n\n convenience init(jsonString style: String) throws\n\n Objective-C \n\n + (nullable instancetype)styleWithJSONString:(nonnull NSString *)style\n error:\n (NSError *_Nullable *_Nullable)error;\n\n- `\n ``\n ``\n `\n\n [+styleWithContentsOfFileURL:error:](#/c:objc(cs)GMSMapStyle(cm)styleWithContentsOfFileURL:error:)`\n ` \n Creates a style using a file containing JSON.\n\n Returns nil and populates `error` (if provided) if `style` is invalid, the file cannot be read,\n or the URL is not a file URL. \n\n Declaration \n Swift \n\n convenience init(contentsOfFileURL fileURL: URL) throws\n\n Objective-C \n\n + (nullable instancetype)\n styleWithContentsOfFileURL:(nonnull NSURL *)fileURL\n error:(NSError *_Nullable *_Nullable)error;"]]