Table of Contents

Off-site use of AR Session

This article explains how to use AR Session when not on-site.

Before you begin

Enabling simulator mode

Using Simulator mode avoids the need for developers to remain on-site for extended periods during AR application development.

In this mode, the session either uses no GNSS data or employs simulated GNSS input.

Warning

Enabling Simulator mode will display specific watermarks on the screen.

AR Session must not use Simulator mode when the mini-program is officially released. Be sure to remove related configurations before launch.

Without GNSS data

Use the EasyARSession's setGeoLocationInput(inputMode, geoLocation) method to pass only the "Simulator" string. Thereafter, the session won't perform any location-related operations involving longitude and latitude.

session.setGeoLocationInput("Simulator");

Using simulated GNSS data

To simulate a user at a specific location, use the EasyARSession's setGeoLocationInput(inputMode, geoLocation) method to pass the "Simulator" string along with specified longitude and latitude. Thereafter, the session uses simulated longitude and latitude data for positioning.

const targetLongitude = 123.45; // longitude
const targetLatitude = 32.1; // latitude
session.setGeoLocationInput("Simulator", { longitude: targetLongitude, latitude: targetLatitude });
Warning

Simulated input must use longitude and latitude data in the WGS-84 coordinate system.

Using incorrect longitude and latitude data may cause positioning failures or errors.