Select platform: [Android](https://developers.google.com/maps/documentation/maps-3d/android-sdk/add-polygons.md.txt "View this page for the Android platform docs.") [iOS](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/add-polygons.md.txt "View this page for the iOS platform docs.")

<br />

You can add a polygon to a 3D map.

![A map view showing a polygon](https://developers.google.com/static/maps/documentation/maps-3d/ios-sdk/images/polygon.png)

The following code sample demonstrates how to use the
[`Polygon`](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Polygon.md.txt)
struct to add a 3D polygon and position it on the map.

```swift
  Map(mode: .hybrid) {
    Polygon(
      path: [
        .init(latitude: 37.7749, longitude: -122.4194, altitude: 0),
        .init(latitude: 37.7740, longitude: -122.4184, altitude: 0),
        .init(latitude: 37.7750, longitude: -122.4174, altitude: 0),
      ]
    )
  }
```