开发 Location SDK for iOS Guides Geofencing Location Availability Check

Location Availability Check 最后更新时间: 2026年07月02日

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.

返回顶部 示例中心 常见问题 智能客服 公众号
二维码