Skip to main content
Version: 1.x

Migrating to v1

Step numbering matches the iOS guide, so a team migrating both platforms can read them side by side. Three headings differ because the platform mechanism differs — noted where they do.


Overview​

v1 replaces four things across every module:

  • Static singletons → per-instance sessions. WemapCoreSDK.instance and WemapMapSDK.instance are gone; a CoreSession or MapSession loads the map data and is shared by the views and location sources of one screen.
  • Global mutable constants → immutable configs. CoreConstants, MapConstants, ARConstants, VPSControllerConstants and StateManagerConstants are replaced by data class configs, fixed at creation time.
  • Listeners → Flow. Every *Listener / *Observer interface on a manager or a location source is removed in favour of a read-only Flow property.
  • Kotlin idiom throughout. Acronyms are no longer all-caps in symbol names, every public Float scalar is a Double, time-valued members are kotlin.time.Duration, and errors are sealed class hierarchies.

Work through the steps in order. Each step leaves the project compiling, so you can stop and test between them. Steps 1–7 apply to every consumer; 8–12 only if you use that feature.

  • Effort: a few hours for a map-only app; closer to a day for an app with VPS positioning or a custom location source.
  • Toolchain: 1.0 requires Kotlin 2.2, Android Gradle plugin 9.1, minSdk 24, JVM target 11 and compileSdk 37; the current minimums are in Getting started § Requirements.

If you are migrating an iOS app in parallel, the iOS guide uses the same step numbering.

Coming from 1.0.0-beta.2? Only these changed since, and each one stops your project compiling until you apply it:

  • Step 1 — Turf, GeoJSON and kotlin-math no longer reach your compile classpath through core: declare the ones your app uses. An app on map still compiles against GeoJSON, which MapLibre exposes.
  • Step 3 — recalculation and projection onto the itinerary are options of each navigation: pass NavigationOptions to startNavigation, with recalculation (a RecalculationOptions, RecalculationOptions.Disabled to turn it off) and projection (a ProjectionOptions). The two SessionConfig flags are gone, userPositionThreshold and navigationRecalculationTimeInterval are RecalculationOptions.indoorOffRouteDistance and minimumInterval, and isUserLocationProjectionOnGraphEnabled is SessionConfig.graphProjection.
  • Step 4 — CoreSession.mapCenter is a Coordinate, and Coordinate.point, the Coordinate(point, …) constructor and the helpers on MapLibre's geojson and Location types are no longer public: use Coordinate's own latitude, longitude, distanceTo, destination and bearingTo.
  • Step 6 — the public enums are value classes with PascalCase constants (ScanStatus.STARTED is ScanStatus.Started) and no entries, valueOf or name; a when over one needs an else branch. SelectionMode is PointOfInterestSelectionMode, WemapMapView.locationManager is userLocationManager, UserLocationViewStateStyle.bearingColor is headingColor, and Step.getNavigationInstructions takes the locale, before includeStreetNames. PointOfInterestType.value is rawValue, and NavigationError.Unknown is gone. MapPointOfInterestManager.defaultZoom is gone: pass a zoom to selectPoi or centerToPoi.
  • Step 7 — MapViewConfig is no longer public, and WemapMapView.configure and WemapMap take no config: set switchesLevelsAutomatically and staleStateTimeout on mapView.userLocationManager. The Compose MapCameraPositionState holds a MapCameraPosition, what the camera should do, instead of the live camera: WemapMap's initialCamera and cameraUpdateFrequency are initialCameraPosition and cameraChangeFrequency.
  • Step 8 — VpsARCoreLocationSourceError.TiltTooHigh is gone from errors: observe scanIssue / scanIssues for ScanIssue.DevicePointedTooLow, and TrackingState.isTracking is no longer public.
  • Step 9 — MapSession.createPackdataService takes a context first.
  • Step 10 — GeoARViewConfig is no longer public, and GeoARView.configure and WemapGeoAR take no config: set an ARNavigationStyle on arView.navigationManager.style. navigationVisibilityDistance is visibilityDistance, and the arrow's xPercentageOfView / yPercentageOfView are horizontalPosition / verticalPosition. setScaleDistanceRatioForFixedSize is removed.
  • Step 11 — a custom LocationSource implements onStart(listener), onStop() and onRelease(), reports to the LocationSourceListener it is given, and names its coreSession; start(), stop(), deinit(), coordinates, attitudes and errors are extensions imported from com.getwemap.sdk.core.location. Implementing one of the SDK's manager, provider or service interfaces needs @OptIn(InternalWemapApi::class).
  • Step 12 — the models are created only by the SDK, Segment can no longer be subclassed, and the models are no longer @Serializable; Itinerary and NavigationInfo are no longer data classes, so they cannot be destructured; PointOfInterest.externalData is a JSON String?; PointSpan, NavigationInstructionsHandler, the free functions over Quaternion and Double3, Incline.localizableId and toStepDirection(), Step.Direction.horizontalDirectionLocalizableId and turnSharpnessLocalizableId, Step.Kind.localizableKey, Itinerary.legsSegments, PointOfInterestSelectionMode.next(), ARPointOfInterestManager.looksAtCamera, BoundingBox.toLatLngBounds() and Heading.fromDeviceAttitude (use Attitude.toHeading()) are no longer public; and no module publishes the version_name string resource, which WemapSDKs.version replaces.

Some behaviour changed since 1.0.0-beta.2 too, with nothing for the compiler to catch: a backend's failed HTTP status throws WemapError.RequestFailed instead of Retrofit's HttpException, Coordinate's equals is exact, and UserLocationManager.locationStates and VpsARCoreLocationSource.cameraTrackingStates are StateFlows that start with the current state. Check the rows of Changes that compile but behave differently below.

Coming from 1.0.0-beta.1? First apply the breaking changes of 1.0.0-beta.2, then the list above.

1 · Update the dependency​

Rule: move to the latest 1.x release and raise your toolchain floor.

Take the version itself — and the transitive dependency versions that come with it — from the SDK change log. This guide deliberately does not repeat them, so that it stays correct as 1.x moves on.

Five floors changed in v1, and they block the build before anything else does. As of 1.0:

v0.xv1.0
Kotlin1.9 — no pin, so whatever the 2.0.20 compiler emitted2.2 — one below the Kotlin 2.3 the SDK's classes are compiled for
Android Gradle plugin8.x9.1 — set by the AndroidX and Compose releases the SDK depends on
minSdk23 — 24 for geo-ar24 for every module
JVM target1.811 — 17 for geo-ar and geo-ar-compose
compileSdk3637

minSdk and the JVM target hold for the whole 1.x line. A 1.x minor release may raise the Kotlin and Android Gradle plugin minimums, never a patch release; the compileSdk minimum rises when a dependency requires it. The CHANGELOG announces each, and Getting started § Requirements has the current minimums. What else 1.x keeps, and what it may add, is in What v1 covers.

No module publishes the version_name string resource any more: read the SDK's version from WemapSDKs.version.

Two artifacts are new in v1 and are opt-in — nothing else changes if you do not take them:

implementation("com.getwemap.sdk:map-compose:<version>") // Jetpack Compose for the Map SDK
implementation("com.getwemap.sdk:geo-ar-compose:<version>") // Jetpack Compose for the GeoAR SDK

Watch out: eight dependencies the SDK used to expose transitively are now implementation — Retrofit, Retrofit's SerializationConverter, Coroutines Android, OkHttp's LoggingInterceptor, MapLibre's Turf and GeoJSON, kotlin-math and (from android-fused-adaptive) PlayServices Base. If your app compiled against any of them through the SDK, declare it yourself. An app on map still compiles against GeoJSON, which MapLibre exposes; 1.0.0-beta.2 still exposed Turf, GeoJSON and kotlin-math.

Watch out: if you use a MapLibre plugin such as android-plugin-annotation-v9, exclude the org.maplibre.gl:android-sdk it brings in, or the build fails on duplicate classes: v0.x shipped MapLibre's android-sdk, and the map now ships its two-engine android-sdk-vulkan-opengl (MapLibre plugins).

2 · Create a session​

Rule: wherever you reached a singleton or passed a MapData, create one session per screen and pass it in.

// before
val mapData = WemapMapSDK.instance.mapData(id = 19158, token = "TOKEN")
mapView.mapData = mapData
mapView.onCreate(savedInstanceState)
mapView.getMapViewAsync { view, map, style, data -> /* … */ }

// after
val session = MapSession.create(context, mapId = 19158, token = "TOKEN", config = SessionConfig())
mapView.configure(session)
lifecycleScope.launch {
runCatching { mapView.awaitLoaded() }
.onSuccess { /* managers are usable */ }
.onFailure { error -> println("Failed to load mapView with error - $error") }
}

Share the same session across a screen's WemapMapView, GeoARView and location sources — that is what keeps navigation, POI selection and user location consistent. A second map needs its own session. Call session.deinit() when the screen is done.

CoreSession.create and MapSession.create are suspend; offline maps use MapSession.create(context, offlineZip, config) (see step 9).

Removed: WemapCoreSDK.instance, WemapCoreSDK.setEnvironment, WemapCoreSDK.setItinerariesEnvironment, WemapMapSDK.instance, WemapMapSDK.mapData(id, token), ServiceFactory, DependencyManager.

Constructor mapping:

v0.xv1.0
WemapMapView.mapData = …mapView.configure(session, config)
GeoARView.mapData = …geoARView.configure(session, config)
WemapVPSARCoreLocationSource(context, mapData) / (context, token)VpsARCoreLocationSource(context, session, vpsConfig)
GPSLocationSource(context, mapData)GpsLocationSource(context, session)
GmsFusedLocationSource(context) / (context, mapData)GmsFusedLocationSource(context, session)
AndroidFusedAdaptiveLocationSource(context, mapData)AndroidFusedAdaptiveLocationSource(context, session)
SimulatorLocationSource(mapData, options)SimulatorLocationSource(session, options)

Watch out: MapData is no longer for public use. Read map metadata from the session instead: CoreSession exposes exactly mapId, mapCenter (a Coordinate, where MapData.center was a GeoJSON Point), isVpsEnabled, config, itineraryProvider, pointOfInterestService, navigationInfoHandler and deinit(); MapSession adds the offline factories. There is no public graph id — the graph is resolved by the session and reached through session.itineraryProvider.

Watch out: creating a session is a suspending network call, so it can no longer happen inline in onViewCreated. Hoist it into a ViewModel so a configuration change does not re-fetch the map — that is what the sample apps do, and it is also what WemapMap (Compose) expects, since it rebuilds the view when session changes.

3 · Pass configs instead of setting globals​

Rule: every value you used to assign to a *Constants static is now a val property of a config, built in one constructor call and passed at creation time — except the user-location values and the AR navigation look, which are properties of the UserLocationManager and ARNavigationManager that apply them. There is no global mutable configuration left.

// before
CoreConstants.ITINERARY_RECALCULATION_ENABLED = false
CoreConstants.ENVIRONMENT = Environment.Dev()
MapConstants.STALE_TIMEOUT_MILLISECONDS = 10_000

// after
val session = MapSession.create(
context, mapId = 19158, token = "TOKEN",
config = SessionConfig(environment = Environment.Dev)
)
mapView.configure(session)
// once the map has loaded
mapView.userLocationManager.staleStateTimeout = 10.seconds
// recalculation is an option of each navigation, not of the session
mapView.navigationManager.startNavigation(
destination = destination,
options = NavigationOptions(recalculation = RecalculationOptions.Disabled)
)
v0.xv1.0Passed to
CoreConstants staticsSessionConfig (com.getwemap.sdk.core.configs)CoreSession.create / MapSession.create
CoreConstants recalculation and itinerary-projection staticsNavigationOptionseach startNavigation call
WemapCoreSDK.setEnvironment(…) / CoreConstants.ENVIRONMENTSessionConfig.environmentCoreSession.create / MapSession.create
WemapCoreSDK.setItinerariesEnvironment(…)SessionConfig.directionsEnvironmentCoreSession.create / MapSession.create
MapConstants staticsUserLocationManager propertiesmapView.userLocationManager, once the map has loaded
ARConstants + ARConstants.DirectionalArrowARNavigationStyle + ARNavigationStyle.DirectionalArrow (com.getwemap.sdk.geoar.managers)geoARView.navigationManager.style, once the AR view has loaded
VPSControllerConstants, StateManagerConstantsVpsConfig — see step 8VpsARCoreLocationSource(…)

Property-by-property:

v0.xv1.0
CoreConstants.ITINERARY_RECALCULATION_ENABLEDNavigationOptions.recalculation — RecalculationOptions.Disabled turns it off
CoreConstants.USER_LOCATION_PROJECTION_ON_ITINERARY_ENABLEDNavigationOptions.projection — ProjectionOptions.Disabled turns it off
CoreConstants.USER_LOCATION_PROJECTION_ON_GRAPH_ENABLEDSessionConfig.graphProjection — ProjectionOptions() turns it on
MapConstants.SWITCH_LEVELS_AUTOMATICALLY_ON_USER_MOVEMENTSUserLocationManager.switchesLevelsAutomatically
MapConstants.STALE_TIMEOUT_MILLISECONDS (Long, ms)UserLocationManager.staleStateTimeout (Duration)
ARConstants.NAVIGATION_VISIBILITY_DISTANCEARNavigationStyle.visibilityDistance — now nullable
ARConstants.STEP_INSTRUCTION_ALTITUDEARNavigationStyle.stepInstructionAltitude
ARConstants.DirectionalArrow.TARGET_DISTANCE (and siblings)ARNavigationStyle.DirectionalArrow.targetDistance (and siblings)
ARConstants.DirectionalArrow.X_PERCENTAGE_OF_VIEW / Y_PERCENTAGE_OF_VIEWARNavigationStyle.DirectionalArrow.horizontalPosition / verticalPosition

Three knobs that were public vars are no longer public API: CoreConstants.INCLUDE_PROJECTION_DISTANCE_INTO_ACCURACY, MapConstants.VISUAL_DEBUGGER_CONFIG and ARConstants.VISUAL_DEBUGGER_ENABLED. They have no replacement in the public surface.

Other shape changes on the same lines:

  • MapConstants moved from map.helpers to map.configs and keeps only WEMAP_BLUE. ARConstants is internal.
  • The Environment sealed class and IEnvironment were replaced by the com.getwemap.sdk.core.configs.Environment enum — Environment.Dev / Environment.Prod. Environment.Prod() no longer compiles.
  • CoreConstants.ITINERARIES_HOST / ITINERARIES_BASE_URL were stored and settable; SessionConfig.directionsBaseUrl is computed from directionsEnvironment, so the two can no longer disagree.
  • Every Boolean reads as a statement about what owns it — is…, or a verb such as uses… — including the ones 1.0.0-beta.1 shipped under their 0.x names. Your settings keep their meaning; only the names change:
0.x and 1.0.0-beta.1v1.0
itineraryRecalculationEnabledNavigationOptions.recalculation.isEnabled — moved, see below
userLocationProjectionOnItineraryEnabledNavigationOptions.projection — moved, see below
userLocationProjectionOnGraphEnabledSessionConfig.graphProjection — see below
switchLevelsAutomaticallyOnUserMovementsUserLocationManager.switchesLevelsAutomatically — moved, see below
UserLocationViewStyles.pulseEnabledisPulseEnabled
useGrayscaleImageForVps, useJpgImageForVpsVpsControllerConfig.usesGrayscaleImageForVps, usesJpgImageForVps
NavigationOptions.stopWhenArrivedAtDestinationstopsWhenArrivedAtDestination
SimulationOptions.inLoop, restartDelay, simulateAttituderepeats, repeatDelay, simulatesAttitude
UseTags.active, clickableisActive, isClickable
UserLocalizationUpdate.backgroundScanisFromBackgroundScan

Watch out: every config property is a val. Build the config you want in one constructor call — there is nothing to assign to afterwards, by design. copy() works for deriving a variant.

Recalculation and projection onto the itinerary are options of each navigation, not of the session, so one session can run a navigation that keeps a hand-built itinerary next to one that reroutes. 1.0.0-beta.2's SessionConfig.isItineraryRecalculationEnabled and isUserLocationProjectionOnItineraryEnabled are gone; pass NavigationOptions to each startNavigation instead. The three recalculation values are grouped:

1.0.0-beta.2v1.0
SessionConfig.isItineraryRecalculationEnabledNavigationOptions.recalculation — RecalculationOptions.Disabled turns it off
SessionConfig.isUserLocationProjectionOnItineraryEnabledNavigationOptions.projection — ProjectionOptions.Disabled turns it off
SessionConfig.isUserLocationProjectionOnGraphEnabledSessionConfig.graphProjection — ProjectionOptions() turns it on
NavigationOptions.userPositionThresholdRecalculationOptions.indoorOffRouteDistance — outdoorOffRouteDistance is new
NavigationOptions.navigationRecalculationTimeIntervalRecalculationOptions.minimumInterval
navigationManager.startNavigation(
destination = destination,
options = NavigationOptions(
projection = ProjectionOptions.Disabled,
recalculation = RecalculationOptions(indoorOffRouteDistance = 20.0, minimumInterval = 10.seconds)
)
)

The user's location is projected only within a maximum distance of the route, 15 meters indoors and 50 outdoors by default: ProjectionOptions.indoorMaxDistance and outdoorMaxDistance. 1.0.0-beta.2 projected it however far the user was, so a user who left the route stayed drawn on it. Now the user indicator leaves the route beyond that distance, a location the itinerary does not project is tried on the graph when SessionConfig.graphProjection is enabled, and the navigation info counts the distance between the user and the itinerary. To keep a user on the route however far they are, set both distances to Double.POSITIVE_INFINITY.

The user-location settings are properties of UserLocationManager, not of a config, so they can follow a location source swapped at runtime — a source that delivers in bursts needs a longer stale timeout than GPS. A new value takes effect at the next fix. MapViewConfig is no longer public API, and configure and WemapMap lose their config parameter; set the two values on mapView.userLocationManager once the map has loaded — from onLoaded with Compose:

1.0.0-beta.2v1.0
MapViewConfig.switchesLevelsAutomaticallyOnUserMovementsUserLocationManager.switchesLevelsAutomatically
MapViewConfig.staleStateTimeoutUserLocationManager.staleStateTimeout — out-of-range values are clamped when set
mapView.configure(session, config)mapView.configure(session)
WemapMap(session, config = …)WemapMap(session)
WemapMap(
session = session,
onLoaded = { mapView ->
mapView.userLocationManager.staleStateTimeout = 10.seconds
mapView.userLocationManager.switchesLevelsAutomatically = false
}
)

How the AR view draws a navigation is a property of its ARNavigationManager, style, not a config: it can be set again at any time — to move the directional arrow clear of a bottom sheet, for instance — and a new style applies to the navigation already shown. It stays per AR view, not per navigation, because a navigation started from the map is drawn by the AR view too. GeoARViewConfig is no longer public API, and configure and WemapGeoAR lose their config parameter; set the style on geoARView.navigationManager once the view has loaded — from onLoaded with Compose:

1.0.0-beta.2v1.0
GeoARViewConfigARNavigationStyle (com.getwemap.sdk.geoar.managers) — out-of-range values are clamped when set
GeoARViewConfig.navigationVisibilityDistanceARNavigationStyle.visibilityDistance
GeoARViewConfig.DirectionalArrow.xPercentageOfView / yPercentageOfViewARNavigationStyle.DirectionalArrow.horizontalPosition / verticalPosition
geoARView.configure(session, config)geoARView.configure(session)
WemapGeoAR(session, config = …)WemapGeoAR(session)
WemapGeoAR(
session = session,
onLoaded = { arView ->
arView.navigationManager.style = ARNavigationStyle(
directionalArrow = ARNavigationStyle.DirectionalArrow(verticalPosition = .7f)
)
}
)

Watch out (Java callers): SessionConfig and RecalculationOptions carry a Duration property, so Kotlin mangles their generated copy() and componentN() into names like copy-45ZY6uE. Build these from Kotlin.

4 · Update your Coordinate and level usage​

Rule: Coordinate is an immutable value type holding its own latitude and longitude — it no longer wraps a Location — and levels are a Levels value rather than a List<Float>.

// before
val coordinate = Coordinate(someLocation, listOf(0f, 1f))
val accuracy = coordinate.accuracy // Float?
val location = coordinate.location // Location
val time = coordinate.time

// after
val coordinate = Coordinate(someLocation, Levels.Range(0f..1f))
val accuracy = coordinate.horizontalAccuracy // Double, 0.0 or negative means "no accuracy"
val location = coordinate.toLocation()
val time = coordinate.timestamp
v0.xv1.0
levels: List<Float> (empty meant outdoor)levels: Levels (Levels.Outdoor by default)
Coordinate(location, levels, heightFromFloor, heightFromGround)same shape, levels is a Levels and the heights are Double?
Coordinate(latitude, longitude, levels: List<Float>)Coordinate(latitude, longitude, levels: Levels, altitude, bearing, horizontalAccuracy, timestamp, heightFromFloor, heightFromGround)
—Coordinate(latitude, longitude, level: Float, altitude) and (latitude, longitude, range: ClosedRange<Float>, altitude) convenience constructors
accuracy: Float?horizontalAccuracy: Double — non-optional
time: Longtimestamp: Long
location: LocationtoLocation()
copy(location, levels, …)copy(latitude, longitude, levels, …) — takes latitude and longitude, not a Location

Levels is a sealed class with Levels.Outdoor, Levels.Single(level) and Levels.Range(range) (a ClosedRange<Float>), plus fromArray(List<Float>), toList(), union, contains, intersects, intersection, diff and the isOutdoor / isSingle / isRange predicates. Segment.levels and the graph Edge.levels are Levels too. fromArray throws Levels.InitializationError, itself a sealed hierarchy of InvalidLevelsCount, WrongRangeBoundsOrder and RangeBoundsEqual — match with is.

No longer public API: the Coordinate.ecef and cartesian properties, ecefToEusRot, eusToEcefRot and the fromECEF / fromCartesian / fromPoint factories, plus the LocationFactory object. ecefToEnuRot and enuToEcefRot are gone outright, with no internal equivalent. Coordinate.equals(lhs, rhs, eps, epsAlt) is removed: its tolerant comparison is the public isApproximatelyEqual(other, tolerance, altitudeTolerance), and equals is exact.

Level moved from core to map — com.getwemap.sdk.core.model.entities.Level is now com.getwemap.sdk.map.buildings.Level. Its copy() was removed (its constructor was already internal in v0.x), so a Level can only come from a Building.

Watch out: toLocation() allocates a fresh Location on every call — hold the result rather than calling it in a loop.

5 · Replace listeners with Flows​

iOS calls this step "Replace delegates with AsyncStream". Same change, different mechanism.

Rule: delete the listener registration and collect the Flow of the same name, scoped to the view's lifecycle.

// before
pointOfInterestManager.addListener(object : PointOfInterestManagerListener {
override fun onPointOfInterestSelected(poi: PointOfInterest) { /* … */ }
override fun onPointOfInterestUnselected(poi: PointOfInterest) { /* … */ }
})

// after
viewLifecycleOwner.lifecycleScope.launch {
repeatOnLifecycle(Lifecycle.State.STARTED) {
pointOfInterestManager.selectionUpdates.collect { update ->
if (update.selected.isNotEmpty()) { /* … */ }
}
}
}
v0.x listenerv1.0 flows
LocationSource.listener (LocationSourceListener)coordinates / attitudes / errors, extensions imported from com.getwemap.sdk.core.location; implementing a source: step 11
INavigationManager.addListener / removeListenernavigationEvents (sealed NavigationEvent — Started / Stopped / Arrived / Recalculated) / navigationInfoUpdates / errors
IPointOfInterestManager.addListener / removeListenerselectionUpdates (PointOfInterestSelectionUpdate) / touchedPois
BuildingManager.addListener / removeListenerfocusedBuildings / activeLevelChanges / errors
UserLocationManager and ARLocationManager listenerscoordinates / attitudes / errors
UserLocationManager.coordinateFlowcoordinates
WemapVPSARCoreLocationSourceListener / …Observersee step 8
view loading callbackssee step 7

UserLocationManager and ARLocationManager implement the new read-only UserLocationProvider (coordinates / attitudes / errors / lastCoordinate).

Watch out: in a Fragment, collect from viewLifecycleOwner.lifecycleScope, not lifecycleScope. The Fragment outlives its view, so a collector on the Fragment's own scope keeps running against a torn-down view and holds the managers alive with it. repeatOnLifecycle(Lifecycle.State.STARTED) is what makes the collector stop at ON_STOP and restart at ON_START; without it a plain launch { … collect { } } keeps collecting in the background. Every screen in the sample apps uses exactly this shape.

Watch out: the state flows — focusedBuildings, loadPhases, locationStates, states, scanStatuses, backgroundScanStatuses, cameraTrackingStates and cameraStates(…) — replay their current value to a new collector; coordinates and attitudes replay the latest fix while the location source runs; the event flows do not. If you were relying on a listener being called back with the current state at registration time, read the matching property (getVisiblePois(), getNavigationInfo(), …) instead. The full contract is in Collecting the SDK's streams.

6 · Update the renamed calls and types​

iOS calls this step "Await instead of subscribing". Android's asynchronous calls were already suspend in v0.x, so nothing changes there — but the same call sites are hit by the renaming themes below.

Rule: the whole public surface was normalized to Kotlin idiom in one release. Most of it is mechanical.

Acronyms are no longer all-caps​

POI → Poi, VPS → Vps, GPS → Gps, URL → Url, ID → Id, ECEF → Ecef.

// before
pointOfInterestManager.addPOI(poi)
pointOfInterestManager.hideAllPOIs()
val selected = pointOfInterestManager.getSelectedPOI()

// after
pointOfInterestManager.addPoi(poi)
pointOfInterestManager.hideAllPois()
val selected = pointOfInterestManager.getSelectedPoi()
v0.xv1.0
getPOIs, addPOI, addPOIs, removePOI, removePOIsgetPois, addPoi, addPois, removePoi, removePois
showPOI, hidePOI, showPOIs, hidePOIs, showAllPOIs, hideAllPOIsshowPoi, hidePoi, showPois, hidePois, showAllPois, hideAllPois
getSelectedPOI, getSelectedPOIs, unselectPOI, unselectAllPOIsgetSelectedPoi, getSelectedPois, unselectPoi, unselectAllPois
selectPOI, centerToPOIselectPoi, centerToPoi
sortPOIsByGraphDistance, sortPOIsByDurationsortPoisByGraphDistance, sortPoisByDuration
GPSLocationSourceGpsLocationSource
WemapVPSARCoreLocationSourceVpsARCoreLocationSource
isVPSAvailableAt, distanceToVPSCoverageFromisVpsAvailableAt, distanceToVpsCoverageFrom
PointOfInterest.imageURL / mediaURL / mediaThumbnailURLimageUrl / mediaUrl / mediaThumbnailUrl

AR and other two-letter acronyms stay uppercase (VpsARCoreLocationSource, GeoARView, ARNavigationManager).

Interfaces no longer carry an I prefix​

Every interface is now named for the role, with no prefix; where a class already had the bare name, it is the class that was qualified — *Impl where the interface has one implementation (NavigationManagerImpl), the distinguishing axis where it has two (DirectionsServiceRemote beside DirectionsServiceLocal). None of those classes is customer API: most are internal, and the four that are public for cross-module reasons (NavigationManagerImpl, PointOfInterestManagerImpl, ItineraryProviderImpl, AbstractReferenceCounter) carry @InternalWemapApi, so they can be renamed again in any 1.x.

// before
val manager: INavigationManager = session.navigationManager
fun observe(provider: IUserLocationProvider) { … }

// after
val manager: NavigationManager = session.navigationManager
fun observe(provider: UserLocationProvider) { … }

The public ones, in full: INavigationManager, IPointOfInterestManager, IUserLocationProvider, ILoadPhaseProvider, IItineraryProvider, IPointOfInterestService, IMapNavigationManager, IMapPointOfInterestManager, IPackdataService, IARNavigationManager, IARPointOfInterestManager — drop the I from each. Nothing else about them changed.

The compact-logging contract is renamed​

IStringConvertibleCompact → CompactStringConvertible, and its toStringCompact() → toCompactString(). The implementors are unchanged: Coordinate, PointOfInterest, PointOfInterestType, Itinerary, TravelMode, NavigationOptions, ItinerarySearchRules, ItineraryOptions and LineOptions.

NavigationInfo now implements it too, in place of its shortDescription property:

// before
textView.text = info.shortDescription

// after
textView.text = info.toCompactString()

Every public Float scalar is a Double​

Coordinate.bearing, Coordinate.heightFromFloor, Coordinate.heightFromGround, Coordinate.bearingTo, Coordinate.destination, Attitude.accuracy, Heading.accuracy, Itinerary.duration, Leg.duration, Step.duration, NavigationInfo.remainingTime, NavigationOptions.arrivedDistanceThreshold, RecalculationOptions.indoorOffRouteDistance (was NavigationOptions.userPositionThreshold), SimulationOptions.horizontalAccuracy.

Level values stay Float (Levels.Single(0f), Level.id). So do the render-space values of ARNavigationStyle.DirectionalArrow — horizontalPosition, verticalPosition, distanceFromCamera and scale — which are screen fractions, scene metres and a model scale passed straight to the AR renderer's Float APIs, as on iOS. Its real-world distances, targetDistance and targetAltitude, are Double.

Time is kotlin.time.Duration​

Time-valued members lost their unit suffix and take a Duration:

v0.xv1.0
NavigationOptions.navigationRecalculationTimeInterval (raw)RecalculationOptions.minimumInterval (Duration)
CoreConstants POI timeoutSessionConfig.pointsOfInterestLoadingTimeout (Duration)
MapConstants.STALE_TIMEOUT_MILLISECONDSUserLocationManager.staleStateTimeout (Duration)
VPSControllerConstants.BACKGROUND_SCAN_TIME_INTERVALVpsControllerConfig.backgroundScanTimeInterval (Duration)
INavigationManager.infoUpdatePeriod + infoUpdateTimeUnitnavigationInfoUpdatesInterval (one Duration)
SimulationOptions.dispatchPeriod + timeUnittimeInterval (one Duration); repeatDelay is a Duration
startNavigation(…, timeout)timeout is a Duration

Because Duration is a Kotlin value class, these members are not accessible from Java.

Enum-like types are value classes​

Every public enum but the two closed types is a value class, with its constants in PascalCase. A when over one needs an else branch: a 1.x minor release may add a constant, and the compiler asks for the branch that handles it. The same holds for every public sealed hierarchy but LoadPhase and Levels.

// before
when (status) {
ScanStatus.STARTED -> showScanning()
ScanStatus.STOPPED -> hideScanning()
}

// after
when (status) {
ScanStatus.Started -> showScanning()
ScanStatus.Stopped -> hideScanning()
else -> hideScanning()
}
v0.xv1.0
Environment.DEV, PRODEnvironment.Dev, Prod
DistanceFormula.HAVERSINE, HAVERSINE_WITH_LEVELS, HAVERSINE_WITH_ALTITUDEHaversine, HaversineWithLevels, HaversineWithAltitude
Incline.UP, DOWNIncline.Up, Down
PointOfInterestType.CATEGORY, PICTURE, VIDEO, valueCategory, Picture, Video, rawValue
Step.Direction.STRAIGHT, SLIGHT_RIGHT, U_TURN, …Straight, SlightRight, UTurn, …
TravelMode.Preference.DEFAULT, SAFEST, FASTEST, TOURISMDefault, Safest, Fastest, Tourism
SelectionMode.SINGLE, MULTIPLEPointOfInterestSelectionMode.Single, Multiple
CameraChangeReason.PROGRAMMATIC, GESTURE, USER_TRACKINGProgrammatic, Gesture, UserTracking
MapUpdateFrequency.ON_END, CONTINUOUSOnEnd, Continuous
UserLocationState.NORMAL, STALENormal, Stale
VpsARCoreLocationSource.ScanStatus.STARTED, STOPPEDStarted, Stopped
VpsARCoreLocationSource.NotPositioningReason.*, DegradedPositioningReason.*the same names in PascalCase: TooFarFromNavigation, NoRelocalization, None, …

A value class has no entries, values(), valueOf(), name or ordinal, and is not java.io.Serializable: to keep one in a Bundle or SavedStateHandle, store its toString() and map it back yourself. The types the backend sends — Step.Direction, Incline, TravelMode.Preference — expose the raw value as rawValue, and so does PointOfInterestType, as an Int, where 1.0.0-beta.2 named it value. A travel mode the backend adds decodes to the new TravelMode.Unknown.

Errors are sealed class hierarchies​

Match with is, not by identity.

// before
if (error === NavigationError.noActiveNavigation) { … }

// after
if (error is NavigationError.NoActiveNavigation) { … }
v0.xv1.0
NavigationError.noActiveNavigation and siblingsNavigationError.NoActiveNavigation, FailedToAddNavigation, FailedToRemoveNavigation, FailedToRetrieveUserLocation, NavigationAlreadyExists and FailedToRecalculateNavigation
LocationSourceError.trackingLostLocationSourceError.TrackingLost
ItineraryServiceErrorDirectionsServiceError — NoItinerariesFound(reason), NotSupportedTravelMode, InvalidRules, and the new RequestFailed(code, reason) and GraphUnavailable
WemapVPSARCoreLocationSourceErrorVpsARCoreLocationSourceError — ConnectionTimeout, NotConnectedToInternet, SlowConnectionDetected, FailedToDownloadVpsCoverage, FailedToDownloadLevelsMapping, FailedToCalculateDistanceToVpsCoverage, Unknown
Retrofit's HttpException, from a request a Wemap backend answers with a failed HTTP statusWemapError.RequestFailed(statusCode, reason), reason being the server's description when its body carries one; a VPS failure still arrives wrapped in VpsARCoreLocationSourceError
WemapVPSARCoreLocationSourceError.tiltTooHighnot an error any more: VpsARCoreLocationSource.scanIssues is ScanIssue.DevicePointedTooLow while a scan points too low

Names aligned with the iOS SDK​

A few names changed so that the same call reads the same on both platforms:

v0.xv1.0
SelectionModePointOfInterestSelectionMode
WemapMapView.locationManageruserLocationManager, named after its UserLocationManager type. GeoARView.locationManager keeps its name
UserLocationViewStateStyle.bearingColorheadingColor — the cone shows which way the device points, not the direction of travel
NavigationInstructionsHandler.getContextForLocale(locale, context) + step.getNavigationInstructions(localizedContext)step.getNavigationInstructions(context, locale)

Watch out: getNavigationInstructions takes locale second, before includeStreetNames. A call that passed includeStreetNames by position no longer compiles; name it.

Services and managers: ids bound once, results renamed​

v0.xv1.0
IItineraryProvider.graph(id), ruleNames(graphId)graph(), ruleNames() — the session binds the ids
IItineraryProvider.itineraries(…, mapId)itineraries(…) — no mapId
itinerariesInfoToMultipleDestinations(origin, pois, mapID)itinerariesInfoToMultipleDestinations(origin, destinations, travelMode, searchRules) returning List<CoordinateWithItineraryInfo>; itinerariesInfoToMultiplePois(…) is new
IPointOfInterestService.pointsOfInterestById(mapId, poiId)pointsOfInterest(id) / pointsOfInterest()
PointOfInterestWithInfo (a Pair typealias)PointOfInterestWithItineraryInfo
ItineraryManager.itinerariesdrawnItineraries
ItineraryManager.getItineraries(…)computeItineraries(…)
ItineraryManager.searchRuleNames(graphId)searchRuleNames()
ItinerarySearchRules in core.model.services.parameterscore.model.services
ItineraryInfo in core.model.services.responsescore.model.services
NavigationInfoHandler() (public constructor)session.navigationInfoHandler
PointOfInterestManager.filterByTag(tag), filterByTags(tags, matchMode), TagMatchModetagFilter = PointOfInterestTagFilter.tag(tag), .anyOf(tags) / .allOf(tags)
PointOfInterestManager.removeFilters()tagFilter = null

MapNavigationManager.startNavigation gained a trailing cameraMode: Int? on every overload, and its itineraryOptions parameter is nullable — null keeps the current options, a value replaces them.

Watch out: MapPointOfInterestManager.defaultZoom is no longer public. It was a settable knob in v0.x; pass zoom to selectPoi / centerToPoi instead. Their zoom is a Double?; without one, the map zooms in to 18 only when it is further out, where it used to set 18 either way, and a tap on a POI keeps the zoom.

Watch out: the old filters added up — filterByTag("a") then filterByTag("b") kept the POIs carrying both — while setting tagFilter replaces the filter in place. Combine tags in one PointOfInterestTagFilter, nesting all and any as needed. It also applies to POIs added after it was set, which the old filters did not.

7 · Views: LoadPhase and non-null managers​

Rule: wait for the view with awaitLoaded() (or collect loadPhases), then use its managers directly.

// before
mapView.getMapViewAsync { view, map, style, data ->
view.navigationManager.startNavigation(…)
}
if (mapView.isLoaded) { … }

// after
lifecycleScope.launch {
runCatching { mapView.awaitLoaded() }
.onSuccess { mapView.navigationManager.startNavigation(…) }
.onFailure { error -> /* the map failed to load */ }
}
v0.xv1.0
WemapMapView.getMapViewAsync(OnMapViewReadyCallback) and the lambda overloadloadPhases: StateFlow<LoadPhase> + suspend fun awaitLoaded()
GeoARView.getARViewAsync(OnGeoARViewReadyCallback) and the lambda overloadsame
OnMapViewReadyCallback, OnGeoARViewReadyCallbackremoved
WemapMapView.isLoaded / GeoARView.isLoadedloadPhase.isReady / loadPhase.isLoading / loadPhase.error
WemapMapView.mapData / GeoARView.mapDataremoved — see step 2
WemapMapView.map (settable)read-only

LoadPhase is Loading / Ready / Failed(error), with isLoading, isReady and error. awaitLoaded() is an extension on LoadPhaseProvider, so it needs import com.getwemap.sdk.core.awaitLoaded; it returns the concrete view type, as the old callback did.

Failures are now reported. A map that fails to load settles Failed; in v0.x it logged and told nobody, and there was nothing to await. A points-of-interest download failure or timeout settles Failed as well, and in that case every manager stays built and usable. MapError.FailedToLoadMap is the error MapLibre failures carry.

The view drives its own lifecycle. WemapMapView and GeoARView observe a Lifecycle — auto-discovered from the view tree, or assigned to mapView.lifecycle, or handed to the constructor as sharedLifecycle. Delete your onCreate / onStart / onResume / onPause / onStop / onSaveInstanceState / onLowMemory / onDestroy forwarding.

Watch out: those inherited MapLibre methods still compile — WemapMapView extends MapLibre's MapView, so they cannot be hidden. While a lifecycle is set they are logged and ignored. Leaving the forwarding in place is silent dead code, not an error.

Watch out: isLoaded was false after a failure, but it was also false while loading, so its closest equivalent is loadPhase.isReady for the success check and !loadPhase.isLoading for "has settled".

Watch out: one view of each kind per session. A session holds one map-renderer slot and one AR-renderer slot, so a second WemapMapView on the same session evicts the first, which keeps drawing while no manager drives it.

The Compose map binds a camera position, not the camera. MapCameraPositionState.position is a MapCameraPosition — Automatic, Camera(state), Fit(bounds, padding), FollowUser(bearing) or Idle — and the map carries out each one you set. It writes into the state only when the intent changes: Idle when something else moves the camera (a gesture, an interrupted animation, a level change while following, code or a widget moving it), FollowUser when the SDK starts following the user, as startNavigation does. Setting a position is immediate; animate(position) animates it. Read the camera itself with onCameraChange:

1.0.0-beta.2v1.0
MapCameraPositionState.position: MapCameraState?position: MapCameraPosition — MapCameraPosition.Camera(state) for a camera
MapCameraPositionState(position: MapCameraState?)MapCameraPositionState(position: MapCameraPosition), Automatic by default
reading cameraPositionState.position for the cameraWemapMap(onCameraChange = { camera -> … })
WemapMap(cameraUpdateFrequency = …)WemapMap(cameraChangeFrequency = …), for onCameraChange
WemapMap(initialCamera = camera)WemapMap(initialCameraPosition = MapCameraPosition.Camera(camera))
following the user through userLocationManager.cameraModeposition = MapCameraPosition.FollowUser(…) — the mode still works
val positionState = rememberMapCameraPositionState()
val scope = rememberCoroutineScope()

WemapMap(session = session, cameraPositionState = positionState, onCameraChange = { camera -> save(camera) })

Button(onClick = { scope.launch { positionState.animate(MapCameraPosition.FollowUser()) } }) { Text("Locate me") }

A position that is saved and restored, through rememberMapCameraPositionState, is no longer the camera the user left: after a pan it is Idle, and the map reopens on its data. Keep the camera onCameraChange delivers — it is Parcelable, so rememberSaveable keeps it as it is — and reopen with initialCameraPosition = MapCameraPosition.Camera(saved).

Watch out: do not read a manager off mapView / geoARView in a Fragment's onDestroyView. ON_DESTROY reaches the view lifecycle before that callback, so the view is already torn down and every manager getter throws. Nothing view-owned needs undoing there.

8 · If you use positioning (VPS or GPS)​

Rule: construct the source with the session and a VpsConfig, and collect its flows instead of registering a listener.

// before
VPSControllerConstants.BACKGROUND_SCAN_DISTANCE_THRESHOLD = 20.0
StateManagerConstants.DEGRADED_DISTANCE_THRESHOLD = 60.0
val source = WemapVPSARCoreLocationSource(context, mapData)
source.addListener(vpsListener)

// after
val source = VpsARCoreLocationSource(
context, session,
VpsConfig(
controller = VpsControllerConfig(backgroundScanDistanceThreshold = 20.0),
stateManager = VpsStateManagerConfig(degradedDistanceThreshold = 60.0)
)
)
viewLifecycleOwner.lifecycleScope.launch {
repeatOnLifecycle(Lifecycle.State.STARTED) {
launch { source.states.collect { state -> /* … */ } }
launch { source.scanStatuses.collect { status -> /* … */ } }
}
}

VpsConfig composes VpsLocationSourceConfig, VpsControllerConfig, VpsStateManagerConfig, VpsStaticPositionDetectorConfig and VpsConveyingDetectorConfig — under the parameter names locationSource, controller, stateManager, staticPositionDetector and conveyingDetector — replacing VPSControllerConstants and StateManagerConstants.

WemapVPSARCoreLocationSourceListener and WemapVPSARCoreLocationSourceObserver are removed in favour of states, scanStatuses, backgroundScanStatuses, cameraTrackingStates, userLocalizationUpdates and errors. listenerExecutor, observers and vpsListeners are gone with them.

The State enum became a sealed class, folding the reasons in:

// before
if (source.state == State.DEGRADED_POSITIONING &&
source.degradedPositioningReason == DegradedPositioningReason.…) { … }

// after
val state = source.state
if (state is State.DegradedPositioning && state.reason == …) { … }
v0.xv1.0
State.NOT_POSITIONING + notPositioningReasonState.NotPositioning(reason)
State.DEGRADED_POSITIONING + degradedPositioningReasonState.DegradedPositioning(reason)
State.ACCURATE_POSITIONINGState.AccuratePositioning
comparing to enum constantsis State.X, or the state.isAccurate / state.isLost predicates
trackingFailureReasonthe cameraTrackingStates flow of CameraTrackingState, merging ARCore's TrackingState and TrackingFailureReason
GPSLocationSource(context, mapData)GpsLocationSource(context, session)

CameraTrackingState.copy() and UserLocalizationUpdate.copy() were removed — both types are produced by the SDK only, and their constructors were already internal. Destructuring and the property getters are unaffected.

Watch out: a source your app starts stays your app's to stop. The SDK reference-counts its own start and stop requests, so a view disabling its location component no longer stops a source it did not start. Conversely, do not call start() / stop() on a session-shared source from inside a view callback.

9 · If you use offline maps​

Rule: get a packdata service from the session, then open the downloaded package as a session.

// before
val manager: IPackdataManager = …
val packdata = manager.downloadPackdata(mapID = 19158)
val mapData = manager.loadMapData(File(packdata.filePath))
mapView.mapData = mapData

// after
val service = MapSession.createPackdataService(context, mapId = 19158, environment = Environment.Prod)
val packdata = service.downloadPackdata()
val session = MapSession.create(context, offlineZip = File(packdata.filePath), config = SessionConfig())
mapView.configure(session)
v0.xv1.0
IPackdataManagerPackdataService, from MapSession.createPackdataService(context, mapId, environment)
downloadPackdata(mapID), isNewPackdataAvailable(mapID, eTag)downloadPackdata(), isNewPackdataAvailable(eTag) — the map id is bound at construction
loadMapData(zip)MapSession.create(context, offlineZip, config)

Packdata still carries filePath, eTag, version and fileName — filePath is a String, so wrap it in a File for MapSession.create. The context names your app in the download's User-Agent, as a session's requests do.

10 · If you use GeoAR​

Rule: same as the map — session in, LoadPhase out, and the navigation look set on the navigation manager.

// before
geoARView.mapData = mapData
geoARView.getARViewAsync { view -> view.navigationManager.startNavigation(…) }

// after
geoARView.configure(session)
lifecycleScope.launch {
runCatching { geoARView.awaitLoaded() }
.onSuccess {
geoARView.navigationManager.style = ARNavigationStyle(stepInstructionAltitude = 2.0)
geoARView.navigationManager.startNavigation(…)
}
.onFailure { error -> /* … */ }
}

GeoARView.configure takes a CoreSession — a MapSession is one, so a screen with both views passes the same instance to each.

ARConstants and ARConstants.DirectionalArrow became ARNavigationStyle and ARNavigationStyle.DirectionalArrow (step 3); ARConstants itself is internal now. GeoARView.mapData, isLoaded and getARViewAsync are gone (step 7).

GeoARView is a FrameLayout that holds a SceneView rather than extending one, so everything it used to inherit — engine, scene, view, renderer, materialLoader, modelLoader, childNodes, addChildNode, skybox, collisionSystem, cameraNode, startRecording and the rest of SceneView's surface — is no longer reachable through it, and GeoNode / GeoCameraNode are gone with it. The AR scene is driven through pointOfInterestManager, navigationManager and locationManager.

Custom POIs are added through the AR view only. addPoi, addPois, removePoi and removePois left PointOfInterestManager for ARPointOfInterestManager, so mapView.pointOfInterestManager.addPoi(poi) no longer compiles. It never drew anything on the map while returning true; call it on geoARView.pointOfInterestManager instead. The map will gain them back once it draws custom POIs.

ARPointOfInterestManager.setScaleDistanceRatioForFixedSize is removed. The ratio is fixed, as on iOS; isFixedSize is unchanged.

Watch out: GeoARView.destroy() is idempotent in v1 but the Compose wrapper also calls it — if you drive the view yourself, destroy() is still yours to call exactly once at teardown.

Watch out: GeoARView is final. If you subclassed it, move the behaviour to the caller or to a wrapping FrameLayout.

11 · If you implement a custom LocationSource​

Rule: keep implementing LocationSource, through on hooks the SDK calls: onStart(listener), onStop() and onRelease(). Report through the LocationSourceListener the SDK hands to onStart, instead of a listener property it sets. The app keeps calling start(), stop() and deinit(), which the SDK now owns.

// before
class MyLocationSource : LocationSource {
override var listener: LocationSourceListener? = null
override val supportsHeading = true
override val isStarted get() = started
fun report(c: Coordinate) { listener?.onCoordinateChanged(c) }
override fun start() { … }
override fun stop() { … }
override fun deinit() { … }
}

// after
class MyLocationSource(override val coreSession: CoreSession) : LocationSource {
private var listener: LocationSourceListener? = null
override val supportsAttitude = true
fun report(c: Coordinate) { listener?.onCoordinateChanged(c) } // unchanged
override fun onStart(listener: LocationSourceListener) { this.listener = listener; … }
override fun onStop() { listener = null; … }
override fun onRelease() { … }
}

mapView.userLocationManager.locationSource = MyLocationSource(session) // unchanged
v0.xv1.0
LocationSource.listener, set by the SDKthe listener passed to onStart
start()implement onStart(listener); call the start() extension
stop()implement onStop(); call the stop() extension
deinit()implement onRelease(); call the deinit() extension
isStartedkept by the SDK; nothing to implement
—coreSession, the session the source reports to
LocationSource.supportsHeadingsupportsAttitude, false by default
SimulationOptions.simulateHeadingsimulatesAttitude
  • A coordinate you report is processed like the SDK's own sources': projected on the navigation's itinerary, or on the map's graph, when projection is enabled.
  • coordinates, attitudes and errors are the session's streams on every source, yours included, and are extensions on LocationSource: import them from com.getwemap.sdk.core.location, as start(), stop() and deinit().
  • The SDK starts and stops the source as its views need it, and hands every start a new listener. The previous one stops forwarding, as does the listener of a source that was stopped, by the SDK or by your stop(), or replaced, so a provider callback that arrives late is dropped. The listener can be called from any thread.
  • Report attitudes only when supportsAttitude is true: otherwise the SDK reports the device sensors' own, and the two would interleave.

The assignment point is unchanged: mapView.userLocationManager.locationSource for the map and geoARView.locationManager.locationSource for AR.

Watch out: drive a source with start(), stop() and deinit(), never by calling its on hooks yourself. deinit() stops the source, removes it from the map and AR views of its session, then calls its onRelease(), the same way for the SDK's sources and yours.

The SDK's manager, provider and service interfaces are not for implementing. They may gain members in a minor release, which would break an implementation outside the SDK, so implementing one needs @OptIn(InternalWemapApi::class) and comes with no compatibility guarantee. Calling them needs no opt-in.

InterfaceModule
UserLocationProvider, LoadPhaseProvider, PointOfInterestManager, NavigationManager, PointOfInterestService, ItineraryProvidercore
MapPointOfInterestManager, MapNavigationManager, PackdataServicemap
ARPointOfInterestManager, ARNavigationManagergeo-ar

12 · Symbols that are no longer public API​

Rule: these were public in v0.x and are not part of the supported surface any more. There is no customer-facing replacement for any of them — if your app imports one, plan the migration off it.

They are gated by @InternalWemapApi, a @RequiresOptIn(level = ERROR) marker, and/or moved into an *.internal.* package that the generated documentation suppresses. Reaching one now fails the build with "This declaration is experimental and its usage should be marked with @InternalWemapApi".

  • MapData and MapDataSerializer
  • CoreConstants
  • LocationFactory
  • Coordinate.ecef / cartesian / ecefToEusRot / eusToEcefRot, and the fromECEF / fromCartesian / fromPoint factories (step 4)
  • IItineraryService and the Directions wire types — ItineraryParameters, ItinerariesParametersMultiDestinations, IItineraryParametersBase, ItinerariesResponse, ItineraryInfoResponse, ItinerariesInfoResponse, Status, StatusCode, RuleNames — internal rather than gated, except ItinerariesResponse and Status; IItineraryParametersBase is removed
  • MapConstants.VISUAL_DEBUGGER_CONFIG, CoreConstants.INCLUDE_PROJECTION_DISTANCE_INTO_ACCURACY and ARConstants.VISUAL_DEBUGGER_ENABLED (step 3)
  • the GeoARView camera-provider members — bindCameraProjection, bindCameraCapture, startCameraCapture, unbindCamera, onFrame, onCameraProjectionChanged, viewParameters (step 10)
  • GeoARView.addGeoNode and geoCamera, and the GeoNode / GeoCameraNode types themselves — internal, not gated, because GeoARView no longer extends SceneView (step 10)
  • GeoComponent
  • everything else that was still public in an *.internal.* package: the graph types (Edge, Vertex, Graph and their Properties), LocationSourceManager / LocationSources, NavigationManager, PointOfInterestManager, SystemAttitudeSource / AttitudeSourceListener, CameraCaptureProvider / CameraCaptureDelegate / ViewParameters, FileService, PointOfInterestRenderer, ReferenceCounter / ReferenceCounter, ItineraryProvider, ConveyingBuffer, Inclination, Status, LocalServiceBase, every *Serializer, GeoUtils / MathUtils / GeoConstants / PointOfInterestIdGenerator, Polygon.contains / distanceTo and MultiPolygon.contains / distanceTo, and — in map — StyleData, MapAttitudeEngine and StringGenerator
  • the rest of the Double math port, which stays in com.getwemap.sdk.core.internal.math — Double2, Double4, Bool2/3/4, Mat2/3/4, VectorComponent, MatrixColumn, QuaternionComponent, RotationsOrder, and the top-level functions over every math type, Quaternion and Double3 included (normalize, inverse, cross, slerp…). The Quaternion and Double3 types themselves are not in this list: see Moved, not gated below.
  • the helpers on MapLibre's geojson types — Point.toCoordinate() / toLocation() / distanceTo / destination / bearing, BoundingBox.center, Location.toPoint() / copy(), BoundingBox.toLatLngBounds() in map — and Coordinate.point. Use Coordinate's own latitude / longitude, distanceTo, destination and bearingTo
  • TrackingState.isTracking in wemap-vps-arcore; compare with TrackingState.TRACKING
  • Heading.fromDeviceAttitude; read a heading with Attitude.toHeading()
  • NavigationInstructionsHandler; pass a locale to Step.getNavigationInstructions (step 6)
  • the string-resource lookups Step.Direction.horizontalDirectionLocalizableId / turnSharpnessLocalizableId and Step.Kind.localizableKey; read the text from getNavigationInstructions
  • Itinerary.legsSegments
  • PointOfInterestSelectionMode.next()
  • ARPointOfInterestManager.looksAtCamera (0.x lookAtCamera) and MapPointOfInterestManager.defaultZoom
  • Incline.localizableId and Incline.toStepDirection()

Moved, not gated: Quaternion and Double3 are now com.getwemap.sdk.core.math.Quaternion / …core.math.Double3, and need no opt-in. Attitude.quaternion is the reason: gating the type left the property readable but unusable. Update the import, and you can read q.w/x/y/z and use the types' own operators (q * other, q * vector). The free functions over them (normalize, slerp, cross…) are gated, as on iOS. The members that route through a still-gated type — the Double2 swizzles (xy/rg/st), xyzw, the VectorComponent/QuaternionComponent accessors, equals(…, delta) and toMatrix() — keep the marker. Attitude.headingDegrees / headingRadians / toHeading() are unchanged and still need nothing.

Moved, not gated: PaginationContainer is now com.getwemap.sdk.core.model.entities.PaginationContainer. It is what PointOfInterestService.pointsOfInterest() returns, so it is genuinely public API and only its package was wrong — update the import; nothing else about it changed. (iOS has always had it in Core/Sources/Model/Entities.)

No longer data classes: Itinerary and NavigationInfo. Destructuring one (val (a, b) = info) or calling its copy or componentN no longer compiles; read its properties.

Removed outright: PointOfInterest.customerID, NavigationInstructions.direction (read Step.direction), Coordinate.ecefToEnuRot / enuToEcefRot.

Read-only, built by the SDK: Tag, UseTags, Category, ItineraryInfo and NavigationInstructions stay public, but their constructors and copy() are not — the SDK produces them, from the map's configuration, a route or a step, and you read them.

Created only by the SDK now: you still receive these, but can no longer build or copy() them yourself — Itinerary (except from segments, below), Leg, Destination, CoordinateWithItineraryInfo, PointOfInterestWithItineraryInfo, Packdata, Segment, LegSegment (build segments with LegSegment.fromCoordinates(…)), Heading (read one from Attitude.toHeading()) and Step.Direction.fromAngle. Destructuring and the property getters are unaffected. Segment can no longer be subclassed either: a class of your own extending it does not compile. To give VpsARCoreLocationSource an itinerary from your own map, create it with Itinerary.fromSegments(origin, destination, segments, transitMode).

No longer serializable: the models are not @Serializable any more, so the SDK's wire format is not part of its API. Attitude, Category, Destination, Incline, Itinerary, ItineraryInfo, ItinerarySearchRules, Leg, Level, Packdata, PaginationContainer, PointOfInterest and its ExtraMedia, Step with its Kind and Direction, Tag, TravelMode.Preference and UseTags have no serializer(), and GeoJsonItinerarySerializer, ItinerarySerializer, QuaternionSerializer and Step.Kind.Serializer are gone. To keep one between launches, store the values you need in a type of your own — for a Packdata, its eTag, version and fileName, since the file is what MapSession.create(context, file, config) reads. To give a location source an itinerary from your own map, build it with Itinerary.fromSegments(…) rather than decoding GeoJSON.

PointOfInterest.externalData is a JSON String? instead of a kotlinx JsonElement: the free-form data your map attaches to a point of interest, which you decode with the JSON library of your choice (Json.parseToJsonElement(poi.externalData) keeps the old type). One you set yourself must be valid JSON. The SDK no longer brings kotlinx-serialization onto your compile classpath, so declare it yourself if you use it.

Now public: PointOfInterest.ExtraMedia(type, url), so a point of interest you create in code can carry extra medias.

Removed from the public API: PointSpan, and the Point extensions that took one — bounds(span) and the + / - operators. Nothing public returned one.

Changes that compile but behave differently​

Nothing in this list produces a compiler error. Check each one against your app.

ChangeWhat to do
The views drive their own lifecycleyour mapView.onStart() / onResume() / … forwarding is logged and ignored — delete it (step 7)
A map that fails to load settles LoadPhase.FailedawaitLoaded() throws instead of never returning — handle it
isLoaded was false while loading and after a failureloadPhase.isReady for success, !loadPhase.isLoading for "has settled"
A coordinate's time is encoded in Unix secondsit was milliseconds on Android; if you persisted or forwarded encoded coordinates, re-check the unit
MapCameraState equality is exact, and ignores lastChangeReasona camera you built and the one the map reports after applying it differ by float noise, so compare camera positions instead; equal states hash the same
The user-location indicator greys the moment tracking is lostit no longer stays blue for staleStateTimeout
startNavigation sets the camera mode itselfit follows with compass when navigation starts
A second WemapMapView or GeoARView on one session evicts the firstone view of each kind per session; a second map needs its own
SimulationOptions.repeatDelay defaults to 2 secondsa repeating simulation restarts sooner than 0.x's 5 seconds; pass repeatDelay = 5.seconds to keep the old pause
LocationSource.deinit() unregisters the source from its sessionyour manual locationSource = null at teardown is now redundant
A source your app started is no longer stopped by a viewthe SDK reference-counts only its own requests — stop what you started
NavigationInfo, Itinerary, Leg and TravelMode print a summarytoString() no longer dumps the itinerary geometry — read leg, legs, coordinates or steps directly, or toCompactString() for a log line
Two Itinerary instances are equal only when they are the same instancean itinerary computed twice over the same route gives two unequal ones — keep the instance you added to remove it from the map or to compare it with the navigated one; two NavigationInfo snapshots no longer compare by value either
Coordinate's equals is exacttwo coordinates that differ by float noise, such as a computed projection and a stored point, are no longer equal; use isApproximatelyEqual(other, tolerance, altitudeTolerance) for those. A HashSet or HashMap of coordinates is now reliable
The state flows replay, the event flows do nota listener that used to be called back at registration has no equivalent on an event flow — read the property
A Flow completes when its owner endsa collect on a destroyed view's or a deinitialized source's stream returns instead of suspending forever; a StateFlow never completes
A step direction, incline, travel mode, preference or POI type the backend adds no longer fails the responseit reaches your when's else branch — make sure that branch does something sensible
Calling the SDK off the main thread throwscreating a session, reading a view's managers, starting or stopping a location source or a navigation, selecting or unselecting a POI and setting the selection mode fail at once with an IllegalStateException; make those calls on the main thread
A backend's failed HTTP status throws WemapError.RequestFailed(statusCode, reason)a catch matching Retrofit's HttpException no longer catches it; match WemapError.RequestFailed
ItineraryProvider.itineraries throws when no route existsDirectionsServiceError.NoItinerariesFound replaces the empty list; handle it where you tested isEmpty()
Route computations and requests time outthe itinerary request of startNavigation has its timeout, 30 seconds by default; computeItineraries, sortPoisByGraphDistance, sortPoisByDuration and ItineraryProvider throw a java.net.SocketTimeoutException after 30 seconds, or, on an offline map, once a longer computation ends; every other request fails after 20 seconds without data, up from 10
The location is projected onto the route only within a maximum distance15 meters indoors and 50 outdoors by default; beyond it the user indicator leaves the route. Raise ProjectionOptions.indoorMaxDistance / outdoorMaxDistance to keep the previous behaviour
selectPoi and centerToPoi without a zoom never zoom outthey zoom in to 18 only when the map is further out; tapping a POI recenters without changing the zoom. Pass a zoom to force one
Out-of-range config values are moved into their documented rangea timeout, threshold, distance or VPS setting outside the range its documentation states is clamped and logged instead of used as given, or crashing, and a RecalculationOptions.minimumInterval below 5 seconds is raised to 5 seconds; check the log if a value seems ignored

"I'm getting this error"​

ErrorGo to
Duplicate class org.maplibre.android… with a MapLibre plugin such as android-plugin-annotation-v9Step 1
Unresolved reference: WemapCoreSDK / WemapMapSDKStep 2
Unresolved reference: ServiceFactory / DependencyManagerStep 2
Unresolved reference: mapData on a viewStep 2
Cannot access 'MapData': it is internal / unresolved after an import cleanupStep 2, Step 12
Suspend function 'create' should be called only from a coroutineStep 2
Val cannot be reassigned on a config propertyStep 3
Unresolved reference: CoreConstants / MapConstants / ARConstantsStep 3
Unresolved reference: Prod on EnvironmentStep 3
Type mismatch: inferred type is List<Float> but Levels was expectedStep 4
Unresolved reference: accuracy on CoordinateStep 4
Unresolved reference: location on CoordinateStep 4
Unresolved reference: Level after importing from core.model.entitiesStep 4
Unresolved reference: addListener on a managerStep 5
Unresolved reference: PointOfInterestManagerListenerStep 5
Unresolved reference: addPOI / getPOIs / selectPOI (any all-caps acronym)Step 6
Type mismatch: inferred type is Float but Double was expectedStep 6
Type mismatch: inferred type is Long but Duration was expectedStep 6
Incompatible types: NavigationError and NavigationError.CompanionStep 6
Unresolved reference: ItineraryServiceErrorStep 6
No parameter with name 'itineraryRecalculationEnabled' found and the likeStep 3
Unresolved reference: filterByTag / filterByTags / removeFiltersStep 6
Unresolved reference: TagMatchModeStep 6
Unresolved reference: getMapViewAsync / getARViewAsyncStep 7
Unresolved reference: isLoadedStep 7
Unresolved reference: awaitLoadedStep 7 — add import com.getwemap.sdk.core.awaitLoaded
Unresolved reference: WemapVPSARCoreLocationSourceStep 8
Unresolved reference: NOT_POSITIONING / notPositioningReasonStep 8
Unresolved reference: IPackdataManagerStep 9
This class cannot be extended on GeoARViewStep 10
This class or interface requires opt-in to be implementedStep 11
Destructuring declaration initializer of type NavigationInfo must have a 'component1()' function (or Itinerary)Step 12
'listener' overrides nothing in a custom LocationSourceStep 11
'supportsHeading' overrides nothingStep 11
'start' overrides nothing (or 'stop', 'deinit', 'isStarted'), or does not implement abstract member 'coreSession' (or 'onStart', 'onStop') in a custom LocationSourceStep 11
Unresolved reference 'coordinates' (or attitudes, errors, start, stop, deinit) on a location sourceStep 11 — import the extension
This declaration is experimental … @InternalWemapApiStep 12
Cannot access '<init>': it is internal on Tag, UseTags, ItineraryInfo and the likeStep 12
Cannot access '<init>': it is internal on Itinerary, Destination, LegSegment and the likeStep 12
Unresolved reference: setScaleDistanceRatioForFixedSizeStep 10
Unresolved reference: serializer on an SDK model, or GeoJsonItinerarySerializerStep 12

Reference: renamed, moved and removed API​

Sorted by old name.

v0.x symbolv1.0 replacementStep
ARConstantsARNavigationStyle3
Attitude.accuracy: Float?Double?6
Coordinate.accuracyCoordinate.horizontalAccuracy (Double)4
Coordinate.ecefToEnuRot / enuToEcefRotremoved12
Coordinate.levels: List<Float>Coordinate.levels: Levels4
Coordinate.locationCoordinate.toLocation()4
Coordinate.timeCoordinate.timestamp4
CoreConstantsSessionConfig3
DependencyManagerCoreSession / MapSession2
Environment.Prod() / IEnvironmentEnvironment.Prod (enum)3
GPSLocationSourceGpsLocationSource6, 8
Heading.fromDeviceAttitudeAttitude.toHeading()12
GeoJsonItinerarySerializerremoved — Itinerary.fromSegments(…)12
HttpException (Retrofit), from a failed requestWemapError.RequestFailed6
IARNavigationManagerARNavigationManager6
IARPointOfInterestManagerARPointOfInterestManager6
IItineraryProviderItineraryProvider6
IItineraryProvider.graph(id)graph()6
ILoadPhaseProviderLoadPhaseProvider6
Incline.localizableId / toStepDirection()removed12
IMapNavigationManagerMapNavigationManager6
IMapPointOfInterestManagerMapPointOfInterestManager6
IMapPointOfInterestManager.defaultZoom (settable)removed — pass zoom to selectPoi / centerToPoi6, 12
INavigationManagerNavigationManager6
IPackdataManagerPackdataService9
IPointOfInterestManagerPointOfInterestManager6
IPointOfInterestManager.getPOIs()getPois()6
IPointOfInterestServicePointOfInterestService6
IPointOfInterestService.pointsOfInterestById(mapId, poiId)pointsOfInterest(id)6
IStringConvertibleCompactCompactStringConvertible6
ItineraryManager.getItineraries(…)computeItineraries(…)6
ItineraryManager.itinerariesdrawnItineraries6
ItineraryServiceErrorDirectionsServiceError6
IUserLocationProviderUserLocationProvider6
Level (core.model.entities)Level (map.buildings), no copy()4
LocationSource.listenercoordinates / attitudes / errors5, 11
LocationSource.supportsHeadingsupportsAttitude11
LocationSourceError.trackingLostLocationSourceError.TrackingLost6
MapConstants.STALE_TIMEOUT_MILLISECONDSUserLocationManager.staleStateTimeout (Duration)3, 6
MapDatasession.mapId / mapCenter / isVpsEnabled2, 12
NavigationError.noActiveNavigationNavigationError.NoActiveNavigation6
NavigationInfo.shortDescriptionNavigationInfo.toCompactString()6
NavigationInfoHandler()session.navigationInfoHandler6
NavigationInstructions.directionStep.direction12
NavigationInstructionsHandler.getContextForLocaleStep.getNavigationInstructions(context, locale)6, 12
OnMapViewReadyCallback / OnGeoARViewReadyCallbackloadPhases / awaitLoaded()7
PointOfInterest.customerIDremoved12
PointOfInterest.imageURLimageUrl6
PointOfInterestManager.addPoi / addPois / removePoi / removePoisthe same, on ARPointOfInterestManager only10
PointOfInterestManager.filterByTag(…) / filterByTags(…)PointOfInterestManager.tagFilter6
PointOfInterestManager.removeFilters()tagFilter = null6
PointOfInterestManagerListenerselectionUpdates / touchedPois5
PointOfInterestWithInfoPointOfInterestWithItineraryInfo6
SelectionModePointOfInterestSelectionMode6
ServiceFactoryCoreSession / MapSession2
SimulationOptions.simulateHeadingsimulatesAttitude11
State (enum)State (sealed)8
StateManagerConstantsVpsStateManagerConfig3, 8
TagMatchModePointOfInterestTagFilter6
toStringCompact()toCompactString()6
UserLocationViewStateStyle.bearingColorheadingColor6
version_name (string resource)WemapSDKs.version1
VPSControllerConstantsVpsControllerConfig3, 8
WemapCoreSDK.instanceCoreSession2
WemapMapSDK.mapData(id, token)MapSession.create(context, mapId, token, config)2
WemapMapView.getMapViewAsyncawaitLoaded() / loadPhases7
WemapMapView.isLoadedloadPhase7
WemapMapView.locationManageruserLocationManager6
WemapVPSARCoreLocationSourceVpsARCoreLocationSource6, 8
WemapVPSARCoreLocationSourceErrorVpsARCoreLocationSourceError6
WemapVPSARCoreLocationSourceListener / …Observerstates / scanStatuses / errors / …5, 8

Getting help​

Sample apps: wemap-sdk-sample-apps-android. Anything unclear or missing here — contact the Wemap team.