CoreSession
The root object of every Wemap SDK session — create one before anything else.
A CoreSession loads a map's data and holds the shared state and services that all Wemap SDKs build on: routing, points of interest, and positioning. Every higher-level component — WemapMapView, GeoARView, and the positioning location sources — is created from a session and reads its state through it. A session is therefore required to use any Wemap SDK.
Create a single session and pass it to each component you use. Sharing one session is what keeps navigation, points-of-interest selection, and the user's location consistent across every view and SDK — creating separate sessions would give each its own isolated state.
The session is created asynchronously because it fetches the map's data up front — use the suspending create factory. Its services are then built lazily on first use — typically when the first view attaches — so a session created only to inspect a map (for example to read mapCenter or isVpsEnabled) stays lightweight and allocates nothing further.
A session owns its shared services for its whole lifetime, so it can be reused across successive screens and shared by simultaneously-live components (for example a WemapMapView and a GeoARView together): the services survive when one view's cohort is torn down and are handed to the next. Call deinit when the session is no longer needed — typically from the lifecycle owner that holds it (e.g. ViewModel.onCleared) — to release those services (cancel coroutines, unregister sensors, clear cached data). All access is expected to happen on the main thread.
Properties
The configuration the session was created with, fixed for its lifetime.
true when the map supports VPS-based indoor positioning.
Computes and caches itineraries (routes) across this session's map.
Produces live navigation information — distance, duration, remaining steps — while navigating.
Fetches the points of interest defined for this session's map.