AI-generated Key Takeaways
-
This documentation details globally available constants used within the Google Maps SDK for iOS.
-
Constants are provided for various map features like zoom levels, accessibility identifiers, feature types, and camera properties.
-
Developers can utilize these constants to customize and control different aspects of the map's behavior and appearance.
-
Constants are defined for both Swift and Objective-C, ensuring compatibility across different development environments.
-
These constants provide essential values for working with map layers, markers, ground overlays, and panoramas, enabling developers to fine-tune the user experience.
Constants
The following constants are available globally.
-
The value used to clear the
followingZoomLevel,and reset the camera to adopt the default zoom behavior.Declaration
Swift
let GMSNavigationNoFollowingZoomLevel: FloatObjective-C
extern const float GMSNavigationNoFollowingZoomLevel -
Error domain for displaying the report incidents panel.
Declaration
Swift
let GMSMapViewPresentReportIncidentPanelErrorDomain: StringObjective-C
extern NSString *const _Nonnull GMSMapViewPresentReportIncidentPanelErrorDomain -
An unexpected internal error occurred while attempting to present the report incidents panel.
Declaration
Swift
static let `internal`: GMSMapViewPresentReportIncidentPanelErrorCodeObjective-C
static const GMSMapViewPresentReportIncidentPanelErrorCode GMSMapViewPresentReportIncidentPanelErrorCodeInternal = 0 -
Reporting is not available for the current context.
Before attempting to display the report incident panel, ensure navigation is active and that reporting is available using the
isIncidentReportingAvailableAPI.Declaration
Swift
static let reportingNotAvailable: GMSMapViewPresentReportIncidentPanelErrorCodeObjective-C
static const GMSMapViewPresentReportIncidentPanelErrorCode GMSMapViewPresentReportIncidentPanelErrorCodeReportingNotAvailable = 1 -
Accessibility identifier for the compass button.
@related GMSMapView
Declaration
Swift
let kGMSAccessibilityCompass: StringObjective-C
extern NSString *const kGMSAccessibilityCompass -
Accessibility identifier for the “my location” button.
@related GMSMapView
Declaration
Swift
let kGMSAccessibilityMyLocation: StringObjective-C
extern NSString *const kGMSAccessibilityMyLocation -
Accessibility identifier for the “out of quota” error label.
@related GMSMapView
Declaration
Swift
let kGMSAccessibilityOutOfQuota: StringObjective-C
extern NSString *const kGMSAccessibilityOutOfQuota -
The maximum zoom (closest to the Earth’s surface) permitted by the map camera.
Declaration
Swift
let kGMSMaxZoomLevel: FloatObjective-C
extern const float kGMSMaxZoomLevel -
The minimum zoom (farthest from the Earth’s surface) permitted by the map camera.
Declaration
Swift
let kGMSMinZoomLevel: FloatObjective-C
extern const float kGMSMinZoomLevel -
Declaration
Swift
static let administrativeAreaLevel1: FeatureTypeObjective-C
FOUNDATION_EXPORT GMSFeatureType const GMSFeatureTypeAdministrativeAreaLevel1 -
Declaration
Swift
static let administrativeAreaLevel2: FeatureTypeObjective-C
FOUNDATION_EXPORT GMSFeatureType const GMSFeatureTypeAdministrativeAreaLevel2 -
Declaration
Swift
static let country: FeatureTypeObjective-C
FOUNDATION_EXPORT GMSFeatureType const GMSFeatureTypeCountry -
Declaration
Swift
static let locality: FeatureTypeObjective-C
FOUNDATION_EXPORT GMSFeatureType const GMSFeatureTypeLocality -
Declaration
Swift
static let postalCode: FeatureTypeObjective-C
FOUNDATION_EXPORT GMSFeatureType const GMSFeatureTypePostalCode -
Declaration
Swift
static let schoolDistrict: FeatureTypeObjective-C
FOUNDATION_EXPORT GMSFeatureType const GMSFeatureTypeSchoolDistrict -
Declaration
Swift
static let dataset: FeatureTypeObjective-C
FOUNDATION_EXPORT GMSFeatureType const GMSFeatureTypeDataset -
Value to use for
strokeWidthparameter when the stroke width should be unchanged.Declaration
Swift
class let strokeWidthUnspecified: CGFloatObjective-C
extern const CGFloat GMSFeatureStyleStrokeWidthUnspecified -
Value to use for
pointRadiusparameter when the point radius should be unchanged.Declaration
Swift
class let pointRadiusUnspecified: CGFloatObjective-C
extern const CGFloat GMSFeatureStylePointRadiusUnspecified -
Average Earth radius in meters.
Declaration
Swift
let kGMSEarthRadius: CLLocationDistanceObjective-C
static const CLLocationDistance kGMSEarthRadius = 6371009.0 -
The default position of the ground anchor of a
GMSGroundOverlaythe center point of the icon.Declaration
Swift
let kGMSGroundOverlayDefaultAnchor: CGPointObjective-C
extern const CGPoint kGMSGroundOverlayDefaultAnchor -
kGMSLayerCameraLatitudeKey ranges from [-85, 85], and values outside this range will be clamped.
@related
GMSMapLayerDeclaration
Swift
let kGMSLayerCameraLatitudeKey: StringObjective-C
extern NSString *const _Nonnull kGMSLayerCameraLatitudeKey -
kGMSLayerCameraLongitudeKey ranges from [-180, 180), and values outside this range will be wrapped to within this range.
@related
GMSMapLayerDeclaration
Swift
let kGMSLayerCameraLongitudeKey: StringObjective-C
extern NSString *const _Nonnull kGMSLayerCameraLongitudeKey -
kGMSLayerCameraBearingKey ranges from [0, 360), and values are wrapped.
@related
GMSMapLayerDeclaration
Swift
let kGMSLayerCameraBearingKey: StringObjective-C
extern NSString *const _Nonnull kGMSLayerCameraBearingKey -
kGMSLayerCameraZoomLevelKey ranges from [kGMSMinZoomLevel, kGMSMaxZoomLevel], and values are clamped.
@related
GMSMapLayerDeclaration
Swift
let kGMSLayerCameraZoomLevelKey: StringObjective-C
extern NSString *const _Nonnull kGMSLayerCameraZoomLevelKey -
kGMSLayerCameraViewingAngleKey ranges from zero (i.e., facing straight down) and to between 30 and 45 degrees towards the horizon, depending on the model zoom level.
@related
GMSMapLayerDeclaration
Swift
let kGMSLayerCameraViewingAngleKey: StringObjective-C
extern NSString *const _Nonnull kGMSLayerCameraViewingAngleKey -
The default position of the ground anchor of a
GMSMarker: the center bottom point of the marker icon.Declaration
Swift
let kGMSMarkerDefaultGroundAnchor: CGPointObjective-C
extern const CGPoint kGMSMarkerDefaultGroundAnchor -
The default position of the info window anchor of a
GMSMarker: the center top point of the marker icon.Declaration
Swift
let kGMSMarkerDefaultInfoWindowAnchor: CGPointObjective-C
extern const CGPoint kGMSMarkerDefaultInfoWindowAnchor -
Declaration
Swift
let kGMSMarkerLayerLatitude: StringObjective-C
extern NSString *const kGMSMarkerLayerLatitude -
Declaration
Swift
let kGMSMarkerLayerLongitude: StringObjective-C
extern NSString *const kGMSMarkerLayerLongitude -
Declaration
Swift
let kGMSMarkerLayerRotation: StringObjective-C
extern NSString *const kGMSMarkerLayerRotation -
Declaration
Swift
let kGMSMarkerLayerOpacity: StringObjective-C
extern NSString *const kGMSMarkerLayerOpacity -
kGMSLayerPanoramaHeadingKey ranges from [0, 360).
@related
GMSPanoramaLayerDeclaration
Swift
let kGMSLayerPanoramaHeadingKey: StringObjective-C
extern NSString *const _Nonnull kGMSLayerPanoramaHeadingKey -
kGMSLayerPanoramaPitchKey ranges from [-90, 90].
@related
GMSPanoramaLayerDeclaration
Swift
let kGMSLayerPanoramaPitchKey: StringObjective-C
extern NSString *const _Nonnull kGMSLayerPanoramaPitchKey -
kGMSLayerCameraZoomLevelKey ranges from [1, 5], default 1.
@related
GMSPanoramaLayerDeclaration
Swift
let kGMSLayerPanoramaZoomKey: StringObjective-C
extern NSString *const _Nonnull kGMSLayerPanoramaZoomKey -
kGMSLayerPanoramaFOVKey ranges from 1, 160, default 90.
@related
GMSPanoramaLayerDeclaration
Swift
let kGMSLayerPanoramaFOVKey: StringObjective-C
extern NSString *const _Nonnull kGMSLayerPanoramaFOVKey -
kGMSEquatorProjectedMetermay be useful when specifying lengths for segment in “projected” units. The value ofkGMSEquatorProjectedMeter,1/(pi * EarthRadius), represents the length of one meter at the equator in projected units. For example to specify a projected length that corresponds to100kmat the equator use100000 * kGMSEquatorProjectedMeter. See[GMSPath segmentsForLength:kind:],[GMSPath lengthOfKind:]andkGMSLengthProjected.Declaration
Swift
let kGMSEquatorProjectedMeter: DoubleObjective-C
extern const double kGMSEquatorProjectedMeter -
Declaration
Swift
let kGMSPolygonLayerStrokeWidth: StringObjective-C
extern NSString *const kGMSPolygonLayerStrokeWidth -
Declaration
Swift
let kGMSPolygonLayerStrokeColor: StringObjective-C
extern NSString *const kGMSPolygonLayerStrokeColor -
Declaration
Swift
let kGMSPolygonLayerFillColor: StringObjective-C
extern NSString *const kGMSPolygonLayerFillColor -
Stub tile that is used to indicate that no tile exists for a specific tile coordinate. May be returned by
-tileForX:y:zoom:onGMSTileOverlay.Declaration
Swift
let kGMSTileLayerNoTile: UIImageObjective-C
extern UIImage *const _Nonnull kGMSTileLayerNoTile