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

Add example for new location layer functionality #117

Merged
merged 2 commits into from
Jul 1, 2021

Conversation

ShanMa1991
Copy link
Contributor

@ShanMa1991 ShanMa1991 commented Jun 15, 2021

This pr is to fix #115 to create example for new location layer functionality. It would allow the developers to provide custom user location style for navigation, including the default userCourseView, and the puck2D, puck3D.

Example of using the Curiosity 3D model as below:

puck3D

@ShanMa1991 ShanMa1991 self-assigned this Jun 15, 2021
@ShanMa1991 ShanMa1991 requested review from a team, 1ec5 and MaximAlien June 15, 2021 22:33
@MaximAlien
Copy link
Contributor

This is not related to this example, but can you check why 3D puck is rendered below maneuver arrow?

Screen Shot 2021-06-17 at 10 43 55 AM

@ShanMa1991
Copy link
Contributor Author

ShanMa1991 commented Jun 17, 2021

@MaximAlien
Thanks for pointing out the problem of the 3D puck layer.
I created a ticket in mapbox/mapbox-navigation-ios#3098 to track the issue. And I also created a ticket in MapboxMaps iOS repo and provided examples to reproduce.

@ShanMa1991 ShanMa1991 linked an issue Jun 29, 2021 that may be closed by this pull request
@ShanMa1991
Copy link
Contributor Author

The puck layer position issue has been fixed in mapbox/mapbox-navigation-ios#3106

@ShanMa1991 ShanMa1991 force-pushed the shan/userLocationStyle-example-115 branch from 130e130 to 6d69dfd Compare June 29, 2021 23:45
@ShanMa1991 ShanMa1991 force-pushed the shan/userLocationStyle-example-115 branch from 7b77383 to 07f1aa4 Compare June 30, 2021 18:32
@ShanMa1991 ShanMa1991 requested a review from 1ec5 June 30, 2021 18:33
Copy link
Contributor

@1ec5 1ec5 left a comment

Choose a reason for hiding this comment

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

This is so cool! If you don’t mind, it’d be nice to see a screenshot of the updated 3D puck in action. Maybe for a future enhancement, we can set a Red Planet style or something. 😁


func setupPuck3D() {
// It's required to provide a `Puck3DConfiguration` to the `UserLocationStyle.puck3D`, a `gltf` 3D asset will be used as the `Model` source.
// The model source is from NASA's curiosity(clean) in https://github.com/nasa/NASA-3D-Resources/blob/master/3D%20Models/Curiosity%20(Clean)/MSL_clean.blend
Copy link
Contributor

Choose a reason for hiding this comment

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

Let’s link to the permalink just in case the file gets renamed or moved in the future:

Suggested change
// The model source is from NASA's curiosity(clean) in https://github.com/nasa/NASA-3D-Resources/blob/master/3D%20Models/Curiosity%20(Clean)/MSL_clean.blend
// NASA's Curiosity rover from https://github.com/nasa/NASA-3D-Resources/blob/463f2b2941e3e95acfcbb12f783070e9d92ee267/3D%20Models/Curiosity%20(Clean)/MSL_clean.blend

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion. I added a gif example of the Curiosity in SF ☝️

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

Successfully merging this pull request may close these issues.

Create example for new location layer functionality.
3 participants