Browse Source

Attempt to solve marker issues caused a navigation problem

master
analuizaff 3 years ago
parent
commit
4a500458e3
  1. 2
      src/app/components/map/LeafLetMap.js
  2. 8
      src/app/navigation/AppNavigator.js

2
src/app/components/map/LeafLetMap.js

@ -92,7 +92,7 @@ async function insertMarker(mapRef, ID, coordinate, icon) {
mapRef.injectJavaScript(` mapRef.injectJavaScript(`
var customIcon = L.divIcon({ var customIcon = L.divIcon({
className: 'marker-class', className: 'marker-class',
html: ${buildIcon(icon)},
html: \`<body>${icon}</body>\`,
iconSize: 70 iconSize: 70
}); });

8
src/app/navigation/AppNavigator.js

@ -8,6 +8,8 @@ import MessagesNavigator from "./MessagesNavigator";
import ForecastNavigator from "./ForecastNavigator"; import ForecastNavigator from "./ForecastNavigator";
import NewListingButton from "./NewListingButton"; import NewListingButton from "./NewListingButton";
import SharingDataOptionsNavigator from "./SharingDataOptionsNavigator"; import SharingDataOptionsNavigator from "./SharingDataOptionsNavigator";
import SharingDataNavigator from "./SharingDataNavigator";
import routes from "./routes";
const Tab = createBottomTabNavigator(); const Tab = createBottomTabNavigator();
@ -43,11 +45,7 @@ const AppNavigator = () => (
tabBarButton: () => ( tabBarButton: () => (
<NewListingButton <NewListingButton
onPress={() => onPress={() =>
navigation.reset({
index: 0,
routes: [{ name: "SharingData" }],
})
}
navigation.navigate(routes.SHARING_DATA)}
/> />
), ),
tabBarIcon: ({ color, size }) => ( tabBarIcon: ({ color, size }) => (

Loading…
Cancel
Save