I’ve been trying to integrate a Google Map iframe into my React Native app, but I’m encountering issues. I’ve attempted to use the react-native-webview library, following the documentation, but it hasn’t worked as expected. My goal is simply to display an office address on a Google Map within my app.
my code :-
import { WebView } from 'react-native-webview';
<WebView
originWhitelist={['*']}
source={{ html: '<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3022" width="600" height="450" style="border:0;" allowfullscreen="" loading="lazy"></iframe>' }}
/>
I tried RenderHTML also but it didn’t work for me.
2
Answers
I tried Your code but give me error
so I tried my code it’s look good
Hope this above code working fine
iframe in webview doesn’t work for me in simulator or virtual device, try running in physical device or test after creating a release build ! its working fine