Skip to content

Commit

Permalink
fix: set location on asset map upon load
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgiegerich94 committed Apr 28, 2022
1 parent 88c09bd commit 646e4b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
7 changes: 1 addition & 6 deletions components/MapView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@ const Maps = ({ organization }) => {
await getData('assetMapRegion').then((data) => {
if (isSubscribed) {
if (!data) {
setRegion({
latitude: 18.4861,
longitude: -69.9312,
latitudeDelta: 0.0922,
longitudeDelta: 0.0421,
});
handleLocation();
} else {
setRegion(data);
}
Expand Down
11 changes: 4 additions & 7 deletions domains/DataCollection/Assets/ViewAssets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@ const ViewAssets = ({ organization, switchAssetPage }) => {
await getData('assetMapRegion').then((data) => {
if (isSubscribed) {
if (!data) {
setRegion({
latitude: 18.4861,
longitude: -69.9312,
latitudeDelta: 0.0922,
longitudeDelta: 0.0421,
});
handleLocation();
} else {
setRegion(data);
}
Expand Down Expand Up @@ -91,7 +86,9 @@ const ViewAssets = ({ organization, switchAssetPage }) => {
coordinate={marker.location}
title={`${marker.name || ''}`}
// description={`Collector: ${marker.surveyingOr}`}
onPress={() => setSelectedMarker(marker)}
onPress={() => {setSelectedMarker(marker)
console.log('hooho')
}}
/>
)
))}
Expand Down

0 comments on commit 646e4b2

Please sign in to comment.