Skip to main content
Version: 1.x (beta)

PositioningSDK Getting Started

The positioning SDK provides location sources that report the user's coordinates and attitude. A source can drive Wemap MapSDK, Wemap GeoARSDK, or a third-party map or AR system.

Location Sources​

A location source is a system used to track the user's position. Wemap provides two:

  • VPS ARKit uses the camera to provide accurate indoor positioning.
  • GPS uses Core Location and is best suited to outdoor positioning.

Both sources use the session created for the screen. Create the session once, construct the source with it, then assign that source to the map or AR view:

let session = try await MapSession(mapID: 19158, token: "YOUR_TOKEN")
let source = try VPSARKitLocationSource(session: session)

mapView.userLocationManager.locationSource = source
// or
arView.locationManager.locationSource = source

When using a source with a third-party renderer, start it directly and consume its coordinates, attitudes, and errors streams. See Getting started for installation and session setup.

Detailed guides​

Choose the guide for the positioning technology your app uses:

For complete types and members, see the VPS API reference and GPS API reference.

Examples​

For sample implementations, see the official sample-apps repository.