mapbox / mapbox/mapbox-maps-flutter
Scale bar settings not updating correctly
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 380
- Forks
- 204
- PR merge metrics
- No merged PRs in 30d
Description
Description:
When updating the scale bar settings on a Mapbox map using the following code:
await mapboxMap?.scaleBar.updateSettings(ScaleBarSettings(
// position: scaleBarPosition,
enabled: true,
textSize: 22,
height: 60,
marginBottom: 20,
marginLeft: 20,
marginTop: 40,
marginRight: 40,
));
t = await mapboxMap?.scaleBar.getSettings();
print("scaleBar.getSettings: ${t?.textSize}");
The expected result is that the textSize property of the scale bar settings is updated to 22. However, when retrieving the scale bar settings using mapboxMap?.scaleBar.getSettings(), the textSize property returns null.
Steps to reproduce:
- Update the scale bar settings using the code above.
- Retrieve the scale bar settings using
mapboxMap?.scaleBar.getSettings(). - Observe that the
textSizeproperty returnsnull.
Expected result:
The textSize property of the scale bar settings should be updated to 22.
Actual result:
The textSize property of the scale bar settings returns null.
same for height ...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with ScaleBarSettings and the scaleBar.updateSettings/getSettings calls shown in the report. Check why textSize and height do not round-trip, then verify that getSettings returns 22 and 60 after the update.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100