New basemap styling is coming soon to Google Maps Platform. This update to map styling includes a new default color palette, modernized pins, and improvements to map experiences and usability. All map styles will be automatically updated in March 2025. For more information on availability and how to opt in earlier, see New map style for Google Maps Platform.
This example shows map boundaries for
GMSFeatureTypeLocality, and implements the
delegate function that styles the clicked
polygon. The result displays an info alert window with the event data.
[[["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 2025-03-07 UTC."],[[["This documentation demonstrates handling click events on map boundaries, specifically using `GMSFeatureTypeLocality` for the example."],["When a boundary is clicked, an info window appears displaying event data, such as the place IDs of the clicked features."],["It's crucial to note that map boundaries need a minimum alpha value for click events to register, ensuring they are tappable."],["Sample code snippets in Swift and Objective-C are provided for implementation guidance on setting up and responding to click events on map boundaries."]]],["The content demonstrates handling map boundary click events for the `GMSFeatureTypeLocality` feature on iOS. Key actions include setting a style for locality features (orange with 50% opacity fill, orange stroke, width of 2) and implementing a delegate function. This function triggers an alert showing the `placeID` of the features that are clicked. The code examples are shown in both Swift and Objective-C. Note that a minimal alpha value is required for the polygon features to be tappable.\n"]]