<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.6.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreLocation",
  "identifier" : "/documentation/CoreLocation/CLLocation/init(latitude:longitude:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core Location"
    ],
    "preciseIdentifier" : "c:objc(cs)CLLocation(im)initWithLatitude:longitude:"
  },
  "title" : "init(latitude:longitude:)"
}
-->

# init(latitude:longitude:)

Creates a location object with the specified latitude and longitude.

```
init(latitude: CLLocationDegrees, longitude: CLLocationDegrees)
```

## Parameters

`latitude`

The latitude of the geographical coordinate.

`longitude`

The longitude of the geographical coordinate.

## Return Value

A location object initialized with the specified geographical coordinate.

## Discussion

Use this method to create location objects that are not necessarily based on the user’s current location. Typically, you acquire location objects from your [`CLLocationManager`](/documentation/CoreLocation/CLLocationManager) object, which returns the user’s actual location. However, you might use this method when you want to represent any location on a map. For example, you might create an object to represent the user’s intended destination.

This method records the latitude and longitude values you provide, and it initializes other properties to appropriate default values. Specifically, this method sets the [`altitude`](/documentation/CoreLocation/CLLocation/altitude) and [`horizontalAccuracy`](/documentation/CoreLocation/CLLocation/horizontalAccuracy) properties to 0, sets the [`verticalAccuracy`](/documentation/CoreLocation/CLLocation/verticalAccuracy) property to `-1` to indicate that the altitude is invalid, sets the [`speed`](/documentation/CoreLocation/CLLocation/speed) and [`course`](/documentation/CoreLocation/CLLocation/course) values to `-1`, and sets the [`timestamp`](/documentation/CoreLocation/CLLocation/timestamp) property to the time at which the returned object was created.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)