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 ability to port building highlighting feature #2827

Merged
merged 1 commit into from
Mar 8, 2021

Conversation

ShanMa1991
Copy link
Contributor

@ShanMa1991 ShanMa1991 commented Feb 23, 2021

Description

This Pr is to add the ability to high light choose building after long press in 3D, solving the #728 The opacity would be varied with zoom level. The building would also appear in certain zoom level.

  • add building highlighting feature
  • allow a series of buildings to highlight after long press

Implementation

Add the calling functions of mapView.highlightBuildings(at:, in 3D:) to highlight the chosen waypoint. Do query the feature at the waypoint on map view to find the id of the corresponding building. Then add one fillExtrusionLayer and filter the layer based on the building id.

It would allow the building from 3D changing to 2D in DayStyle and NightStyle. The color of building would also change from blue to red when NightStyle is chosen.

Screenshots or Gifs

As the below .gif, it allow a series of long press to choose multiple buildings to highlight, the color of the building would change under different circumstances.
highlighting

It also allow the end of route the puck located at the waypoint and change 3D to 2D, behavior same as the 1.x.
building

@ShanMa1991 ShanMa1991 added feature New feature request. UI Work related to visual components, Android Auto, Camera, 3D, voice, etc. iOS labels Feb 23, 2021
@ShanMa1991 ShanMa1991 self-assigned this Feb 23, 2021
@ShanMa1991 ShanMa1991 marked this pull request as ready for review February 24, 2021 05:20
@ShanMa1991 ShanMa1991 requested a review from a team February 24, 2021 05:23
Copy link
Contributor

@MaximAlien MaximAlien left a comment

Choose a reason for hiding this comment

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

Overall looks good. Please squash all existing commits before instead of merging all of them.

@MaximAlien
Copy link
Contributor

Suggested changelog entry:

* `NavigationMapView.highlightBuildings(at:in3D:)` was renamed to `NavigationMapView.highlightBuildings(at:in3D:completion:)`. ([#2827](https://github.com/mapbox/mapbox-navigation-ios/pull/2827))

@ShanMa1991
Copy link
Contributor Author

Suggested changelog entry:

* `NavigationMapView.highlightBuildings(at:in3D:)` was renamed to `NavigationMapView.highlightBuildings(at:in3D:completion:)`. ([#2827](https://github.com/mapbox/mapbox-navigation-ios/pull/2827))

Thanks for the suggestion, I'll update the changelog.

@ShanMa1991 ShanMa1991 merged commit 7166160 into release-v2.0 Mar 8, 2021
@ShanMa1991 ShanMa1991 deleted the shan-highlighting-728 branch March 8, 2021 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request. UI Work related to visual components, Android Auto, Camera, 3D, voice, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants