Mobile Development 15 min read

ARKit LBS AR Application for Meituan Dining Experience

Meituan’s dining AR app uses ARKit’s orientation‑tracking configuration and gravity‑and‑heading world alignment to place virtual restaurant cards in the camera view, rendering them with SceneKit billboards, handling overlap via tap‑to‑disperse and K‑Means clustering, and eliminating flicker by disabling depth buffering.

Meituan Technology Team
Meituan Technology Team
Meituan Technology Team
ARKit LBS AR Application for Meituan Dining Experience

This article describes how Meituan’s dining service uses ARKit and location‑based services (LBS) to overlay virtual cards representing nearby restaurants onto the camera view, giving users an immersive AR experience.

ARKit provides the ARSession for motion tracking and a rendering engine (Metal, SpriteKit, or SceneKit). Tracking can be done with ARWorldTrackingConfiguration (6DoF) or AROrientationTrackingConfiguration (3DoF). Because the user‑restaurant distance is often hundreds of metres, high‑precision 6DoF tracking is unnecessary and sensitive to lighting and rapid motion, the team chose AROrientationTrackingConfiguration, which only tracks device attitude and works reliably even in low light or when the camera is covered.

To map real‑world coordinates into ARKit’s coordinate system, the article explains the three worldAlignment options. ARWorldAlignmentGravityAndHeading fixes the axes to true north, up, and east, allowing latitude/longitude positions to be correctly projected into the AR scene.

Restaurant cards are rendered with SceneKit. An SCNPlane sized to the card’s image becomes the geometry of an SCNNode. The node’s position is calculated from the user’s location using distanceFromLocation: to obtain east‑west (x) and north‑south (z) offsets, while the vertical (y) coordinate is derived from the restaurant’s floor height. SCNBillboardConstraint keeps the card facing the camera, and a simple linear mapping prevents near cards from overwhelming the view.

Overlap of many cards is handled in two ways. First, a tap‑to‑disperse interaction uses hitTest:options: to find overlapping cards and projectPoint:/unprojectPoint: to push them outward. Second, the backend clusters nearby restaurants with K‑Means so that a single card can represent several venues.

Because cards are thin billboards, depth buffering causes Z‑fighting and flicker when the camera angle changes slightly. The solution disables depth writes and reads on the card’s material:

plane.firstMaterial.writesToDepthBuffer = NO;
plane.firstMaterial.readsFromDepthBuffer = NO;

With depth buffering turned off, the flicker disappears without a noticeable impact on frame rate.

In summary, combining ARKit’s attitude tracking, SceneKit rendering, and thoughtful interaction design yields a stable, scalable AR LBS experience for Meituan’s dining users.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

iOSclusteringARARKitLBSSceneKit
Meituan Technology Team
Written by

Meituan Technology Team

Over 10,000 engineers powering China’s leading lifestyle services e‑commerce platform. Supporting hundreds of millions of consumers, millions of merchants across 2,000+ industries. This is the public channel for the tech teams behind Meituan, Dianping, Meituan Waimai, Meituan Select, and related services.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.