See NavCore in Action

The SDK now centers on a structured engine API, typed events, reactive subscriptions, and complete Expo and React web showcases.

V2 showcase

React web and Expo examples are available in the SDK.

Use the docs page to jump into the current examples.

What the demo covers

Structured State

Inspect position, navigation, status, and meta fields without flattening everything into UI state.

Route Loading

Load OSRM, Valhalla, OpenRouteService, or Mapbox provider results directly with engine.loadRoute().

Expo Location

Feed Expo location objects through updateFromExpoLocation() or the NavCoreProvider React Native hooks.

Pro Companions

Layer ETA, voice cues, geofencing, dead reckoning, and parallel-road resolution onto the same NavCoreState.

Interactive Example Surfaces

React Web Showcase

MapLibre route rendering, simulator playback, voice cues, ETA, geofences, and live state inspection.

View details

Expo Showcase

React Native hooks, Expo location permission flow, route loading, start/stop controls, and structured state display.

View details

Headless Testing

Use @ingissa/navcore-headless and @ingissa/navcore-simulator to assert arrival and off-route behavior in CI.

View details

Migration Helper

Use flattenState() only where legacy screens still expect the v1 state shape.

View details

See the v2 API

import { NavCore, OSRMDirectionsProvider } from '@ingissa/navcore-core';

const provider = new OSRMDirectionsProvider({
  baseUrl: 'https://router.project-osrm.org',
});

const result = await provider.getRoute(waypoints, {
  profile: 'driving',
  steps: true,
});

const engine = new NavCore({ profile: 'vehicle' });
engine.loadRoute(result);
engine.startNavigation();

const unsubscribe = engine.subscribe((state) => {
  const coord = state.position.snappedCoord;
  if (!coord) return;

  updateMarker({
    longitude: coord[0],
    latitude: coord[1],
    bearing: state.position.bearing,
    remainingMeters: state.navigation.distanceToDestination,
    lifecycle: state.status.lifecycleState,
  });
});

engine.on('offRouteChanged', ({ isOffRoute, state }) => {
  if (isOffRoute) requestNewRoute(state.navigation.routeIndex);
});