-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
There was a problem hiding this 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
useImperativeHandle( | ||
ref, | ||
() => ({ | ||
flyTo: (location: [number, number], animationDuration?: number) => cameraRef.current?.flyTo(location, animationDuration), | ||
}), | ||
[], | ||
); | ||
|
||
// Initialize Mapbox on first mount | ||
useEffect(() => { | ||
Mapbox.setAccessToken(accessToken); | ||
}, []); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
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