Document Location SDK for iOS Guides Geofencing Location Availability Check

Location Availability Check

Determines whether a given set of coordinates falls within mainland China or outside of it.

Check Region

Use the AMapLocationDataAvailableForCoordinate function to check if a target coordinate is located in mainland China.

// Set a target coordinate
CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake(39.948691, 116.492479);
// Returns YES if the coordinate is in mainland China, NO otherwise.
BOOL flag = AMapLocationDataAvailableForCoordinate(coordinate);

Return Value

Value

Description

YES / true

The coordinate is located in mainland China.

NO / false

The coordinate is located outside of mainland China.