AI-generated Key Takeaways
- 
          GMSProjectiondefines a mapping between Earth coordinates (CLLocationCoordinate2D) and coordinates in the map's view (CGPoint).
- 
          It provides methods to convert between Earth coordinates and point coordinates in the map's view. 
- 
          GMSProjectioncan also convert distances in meters to content size and determine if a coordinate is within the projection.
- 
          You can obtain the visible region of the map using the visibleRegionmethod.
- 
          This class should not be directly instantiated but obtained from a GMSMapViewinstance.
GMSProjection
@interface GMSProjection : NSObjectDefines a mapping between Earth coordinates CLLocationCoordinate2D and coordinates in the map’s
 view CGPoint. A projection is constant and immutable, in that the mapping it embodies never
 changes. The mapping is not necessarily linear.
Passing invalid Earth coordinates (i.e., per CLLocationCoordinate2DIsValid) to this object may
 result in undefined behavior.
This class should not be instantiated directly unless under testing conditions. Instead, obtain
 it via projection on GMSMapView.
- 
                  
                  Maps an Earth coordinate to a point coordinate in the map’s view. DeclarationSwift func point(for coordinate: CLLocationCoordinate2D) -> CGPointObjective-C - (CGPoint)pointForCoordinate:(CLLocationCoordinate2D)coordinate;
- 
                  
                  Maps a point coordinate in the map’s view to an Earth coordinate. DeclarationSwift func coordinate(for point: CGPoint) -> CLLocationCoordinate2DObjective-C - (CLLocationCoordinate2D)coordinateForPoint:(CGPoint)point;
- 
                  
                  Converts a distance in meters to content size. This is only accurate for small Earth distances, as it uses CGFloatfor screen distances.DeclarationSwift func points(forMeters meters: CLLocationDistance, at coordinate: CLLocationCoordinate2D) -> CGFloatObjective-C - (CGFloat)pointsForMeters:(CLLocationDistance)meters atCoordinate:(CLLocationCoordinate2D)coordinate;
- 
                  
                  Returns whether a given coordinate (lat/lng) is contained within the projection. DeclarationSwift func contains(_ coordinate: CLLocationCoordinate2D) -> BoolObjective-C - (BOOL)containsCoordinate:(CLLocationCoordinate2D)coordinate;
- 
                  
                  Returns the region (four location coordinates) that is visible according to the projection. If padding was set on GMSMapView, this region takes the padding into account.The visible region can be non-rectangular. The result is undefined if the projection includes points that do not map to anywhere on the map (e.g., camera sees outer space). DeclarationSwift func visibleRegion() -> GMSVisibleRegionObjective-C - (GMSVisibleRegion)visibleRegion;