Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement basic map view #16

Merged
merged 21 commits into from
Aug 11, 2023
Merged

Implement basic map view #16

merged 21 commits into from
Aug 11, 2023

Conversation

hayata-suenaga
Copy link
Contributor

@hayata-suenaga hayata-suenaga commented Aug 4, 2023

Details

This PR creates a cross-platform MapView component.

Related Issues

Expensify/App#22703

Manual Tests

The component is tested in this App PR. I can open a follow up PR to include automated tests on the library itself after high priority issues are done. However, I don't have a good idea on how to test visual elements on Map.

Linked PRs

Expensify/App#24306

@hayata-suenaga hayata-suenaga self-assigned this Aug 4, 2023
@neil-marcellini neil-marcellini self-requested a review August 10, 2023 19:08
@hayata-suenaga hayata-suenaga marked this pull request as ready for review August 11, 2023 19:06
Copy link
Contributor

@thienlnam thienlnam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, can’t speak much to the Mapbox stuff but left some comments regarding keeping conventions same as App styling

.eslintrc.js Outdated Show resolved Hide resolved
src/MapView/consts.ts Outdated Show resolved Hide resolved
src/MapView/utils.ts Outdated Show resolved Hide resolved
@thienlnam thienlnam merged commit 9ef450c into main Aug 11, 2023
@thienlnam thienlnam deleted the hayata-implement-MapView branch August 11, 2023 21:57
Comment on lines +36 to +47
useImperativeHandle(
ref,
() => ({
flyTo: (location: [number, number], animationDuration?: number) => cameraRef.current?.flyTo(location, animationDuration),
}),
[],
);

// Initialize Mapbox on first mount
useEffect(() => {
Mapbox.setAccessToken(accessToken);
}, []);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code caused Expensify/App#25732. Map box API doesn't seem to support flyTo well enough on native platforms.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's rather the issue with the libraries themself than a regression but yea we should have tested this thoroughly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants