|
|
@ -1,5 +1,5 @@ |
|
|
|
import React, { useState, useEffect } from "react"; |
|
|
|
import { View } from "react-native"; |
|
|
|
import { View, Linking } from "react-native"; |
|
|
|
import WebView from "react-native-webview"; |
|
|
|
import { |
|
|
|
setViewCode, |
|
|
@ -56,8 +56,6 @@ export default function OpenStreetMap({ |
|
|
|
renderOptions: dataOptionsToShow, |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// console.log(markersList)
|
|
|
|
useEffect(() => { |
|
|
|
if (markersList && mapRef) { |
|
|
|
deleteAllMarkers(mapRef); |
|
|
@ -91,7 +89,13 @@ export default function OpenStreetMap({ |
|
|
|
javaScriptEnabled={true} |
|
|
|
source={{ html: webviewContent }} |
|
|
|
injectedJavaScript={viewFunction} |
|
|
|
|
|
|
|
onShouldStartLoadWithRequest={(event) => { |
|
|
|
if (event.url.slice(0, 4) === "http") { |
|
|
|
Linking.openURL(event.url); |
|
|
|
return false; |
|
|
|
} |
|
|
|
return true; |
|
|
|
}} |
|
|
|
/> |
|
|
|
)} |
|
|
|
{!isForm && ( |
|
|
|