@mapvx/react-native
v1.1.5
Published
React Native SDK for MapVX indoor/outdoor navigation
Maintainers
Readme
@mapvx/react-native
React Native SDK for MapVX indoor/outdoor navigation. Supports iOS, Android, and Web (via Expo).
Installation
npm install @mapvx/react-native
# or
yarn add @mapvx/react-native
# or
pnpm add @mapvx/react-nativeQuick Start
import { MapVXSDK, MVXMap, useLocation, useNavigation } from '@mapvx/react-native';
// Initialize the SDK
const sdk = MapVXSDK.initialize({ apiKey: 'YOUR_API_KEY' });
// Use the map component
function App() {
return <MVXMap style={{ flex: 1 }} />;
}API
SDK
MapVXSDK- Singleton SDK class (use.initialize(), notnew)
Hooks
| Hook | Description |
|------|-------------|
| useLocation | Access user location |
| usePlace | Get place details |
| useSubPlaces | Get sub-places of a place |
| usePlaceSearch | Search for places |
| useRoute | Calculate routes |
| useNavigation | Turn-by-turn navigation |
| useMap | Map instance and controls |
| useFloors | Floor selection and management |
Components
| Component | Description |
|-----------|-------------|
| MVXMap | Main map view |
| Marker | Map marker |
| FloorSelector | Floor picker UI |
| MapContextProvider | Map context provider |
Utilities
logger,setDebugMode,isDebugMode- Logging utilitiesgetPlatform,isIOS,isAndroid,isWeb,isNative,platformSelect- Platform helpers
Platform Support
| Platform | Support | |----------|---------| | iOS | Native module | | Android | Native module | | Web | Expo web |
Documentation
For detailed documentation, visit mapvx.com.
License
UNLICENSED
