mapbox / mapbox/mapbox-maps-android

Use VieportTransition instead of DefaultViewTransition in MapViewportState methods

Open
#2,684 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged feature :green_apple: ticketed
Dominant language
Kotlin
Stars
578
Forks
161
PR merge metrics
No merged PRs in 30d

Description

New Feature

Add the possibility to use a VieportTransition when using MapViewportState methods instead of a DefaultViewTransition only.

public fun transitionToOverviewState(
    overviewViewportStateOptions: OverviewViewportStateOptions,
    defaultTransitionOptions: DefaultViewportTransitionOptions = DefaultViewportTransitionOptions.Builder()
      .build(), // Here, use a ViewportTransition
    completionListener: CompletionListener? = null
  ) 

Why

In map V10, we could specify a ViewportTransition when we wanted to have a transition to a certain state.

However, in V11, using MapViewportState, we cannot specify a ViewportTransition but only a DefaultViewportTransition.

We cannot do an immediate transition when we don't want to have an animation.

We could possibility have more use cases unlock by using a ViewportTransition and not only a DefaultViewTransition

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the MapViewportState methods, including transitionToOverviewState, and inspect how they currently accept DefaultViewportTransitionOptions. Compare those signatures with ViewportTransition and the V10 behavior described in the issue; done means the methods can accept a ViewportTransition, including an immediate transition when no animation is wanted.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.