Map4dMap SDK for React Native
npm install react-native-map4d-mapOn iOS, install the native dependencies from your app's iOS directory:
cd ios && pod installRebuild your Android or iOS app after installation so the native modules are included.
The library includes a Map4dMap TurboModule codegen spec and native module implementations for Android and iOS. Native module lookup uses TurboModuleRegistry with a fallback to legacy NativeModules when the TurboModule is unavailable.
Map views continue to use native view managers through React Native's interoperability layer. Existing apps can keep using the exported map components and methods.
import React from 'react';
import {StyleSheet, View} from 'react-native';
import {MFMapView} from 'react-native-map4d-map';
export default function App() {
return (
<View style={styles.container}>
<MFMapView
style={styles.container}
mapType="roadmap"
showsBuildings={true}
/>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
});