## version-6.0 ### API Reference # API Reference ## Latest Version Mappedin SDK for React Native v6.0.0-alpha.12 ## Previous Versions ### Getting Started # Getting Started > > Mappedin SDK for React Native enables integration of Mappedin's indoor mapping and navigation capabilities into React Native applications. This SDK provides a native wrapper around Mappedin's web-based mapping technology using a WebView for cross-platform compatibility. Mappedin SDK for React Native uses the `react-native-webview` package to display the map. This getting started guide demonstrates how to start a project using Mappedin SDK for React Native. Following this guide results in a working demo with a map that you can interact with (zoom, pan, rotate etc). ## Requirements Mappedin SDK for React Native v6 supports the following: - React 16.8.0+ - React Native 0.60.0+ - React Native WebView 11.0.0+ - Expo 39+ > Mappedin SDK for React Native v6 is available as @mappedin/react-native-sdk@alpha in NPM. > You can find the Mappedin React Native demo application on Github at https://github.com/mappedin/react-native ## Coding with AI Mappedin SDK for React Native provides an llms-mappedin-react-native.txt file that can be used to help with coding when using Large Language Models (LLMs). ## MapView The MapView component contains the DOM element of the 3D map and the context wrapper for control of the map. Components which reference the 3D map must be children of the `MapView` component to have access to the context. ```tsx import React from "react"; import { View, StyleSheet } from "react-native"; import { MapView } from "@mappedin/react-native-sdk"; // See Demo API key Terms and Conditions // Demo Key & Maps: https://developer.mappedin.com/docs/demo-keys-and-maps const App = () => { return ( ); }; const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: "#f0f8ff", }, }); export default App; ``` ## useMap The useMap hook returns an object containing an instance of MapViewControl and Mappedin.MapData. This hook can be used after the map has been loaded and rendered. `useMap` must be used in a child component of MapView. Use the MapViewControl instance to access the map's methods and properties. ```tsx function MyCustomComponent() { const { mapView, mapData } = useMap(); return mapData.getByType('space').map(space => { return