Skip to content
New issue

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

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

Already on GitHub? # to your account

feat: Feature state #3741

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

davor-bauk-sh
Copy link

@davor-bauk-sh davor-bauk-sh commented Jan 16, 2025

Description

Adds support for setting, getting, and removing feature state (issue #1807).

await this._map.setFeatureState('my-feature-id', { 'my-state-key': true }, 'my-source-id', 'my-source-layer-id');
await this._map.getFeatureState('my-feature-id', 'my-source-id', 'my-source-layer-id');
await this._map.removeFeatureState('my-feature-id', 'my-state-key', 'my-source-id', 'my-source-layer-id');

Notes

I had trouble building the Android example project, which I solved by adding this to /example/android/settings.gradle:

includeBuild('../android')

Checklist

  • I've read CONTRIBUTING.md
  • I updated the doc/other generated code with running yarn generate in the root folder
  • I have tested the new feature on /example app.
    • In V11 mode/ios
    • In New Architecture mode/ios
    • In V11 mode/android
    • In New Architecture mode/android
  • I added/updated a sample - if a new feature was implemented (/example)

Screenshot OR Video

iOS:

feature-state-ios-oldarch-scaled.mp4

iOS (v11):

feature-state-ios-oldarch-v11-scaled.mp4

iOS (New Architecture):

feature-state-ios-newarch-scaled.mp4

iOS (v11, New Architecture):

feature-state-ios-newarch-v11-scaled.mp4

Android:

feature-state-oldarch-scaled.mp4

Android (v11):

feature-state-oldarch-v11-scaled.mp4

Android (New Architecture):

feature-state-newarch-scaled.mp4

Android (v11, New Architecture):

feature-state-newarch-v11-scaled.mp4

@davor-bauk-sh davor-bauk-sh marked this pull request as ready for review February 27, 2025 23:50
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants