@@ -11,7 +11,7 @@ import {
1111 OWN_POSTION_MARKER_ID ,
1212} from './types' ;
1313import { LatLng } from 'react-leaflet' ;
14- import { NativeSyntheticEvent , Platform , StyleSheet , View } from 'react-native' ;
14+ import { NativeSyntheticEvent , Platform , StyleSheet } from 'react-native' ;
1515import {
1616 WebViewError ,
1717 WebViewMessageEvent ,
@@ -197,25 +197,23 @@ const LeafletView: React.FC<LeafletViewProps> = ({
197197 } , [ initialized , zoom , sendMessage ] ) ;
198198
199199 return (
200- < View style = { styles . container } >
201- < WebView
202- containerStyle = { styles . webview }
203- ref = { webViewRef }
204- javaScriptEnabled = { true }
205- onLoadEnd = { onLoadEnd }
206- onLoadStart = { onLoadStart }
207- onMessage = { handleMessage }
208- domStorageEnabled = { true }
209- startInLoadingState = { true }
210- onError = { onError }
211- originWhitelist = { [ '*' ] }
212- renderLoading = { renderLoading }
213- source = { LEAFLET_HTML_SOURCE }
214- allowFileAccess = { true }
215- allowUniversalAccessFromFileURLs = { true }
216- allowFileAccessFromFileURLs = { true }
217- />
218- </ View >
200+ < WebView
201+ containerStyle = { styles . container }
202+ ref = { webViewRef }
203+ javaScriptEnabled = { true }
204+ onLoadEnd = { onLoadEnd }
205+ onLoadStart = { onLoadStart }
206+ onMessage = { handleMessage }
207+ domStorageEnabled = { true }
208+ startInLoadingState = { true }
209+ onError = { onError }
210+ originWhitelist = { [ '*' ] }
211+ renderLoading = { renderLoading }
212+ source = { LEAFLET_HTML_SOURCE }
213+ allowFileAccess = { true }
214+ allowUniversalAccessFromFileURLs = { true }
215+ allowFileAccessFromFileURLs = { true }
216+ />
219217 ) ;
220218} ;
221219
@@ -231,9 +229,6 @@ const styles = StyleSheet.create({
231229 flex : 1 ,
232230 ...StyleSheet . absoluteFillObject ,
233231 } ,
234- webview : {
235- flex : 1 ,
236- } ,
237232} ) ;
238233
239234export default LeafletView ;
0 commit comments