Skip to content

docs: clarify that Position.heading carries course over ground (#1187)#1783

Merged
mvanbeusekom merged 1 commit into
Baseflow:mainfrom
aki1770-del:docs-position-heading-course-over-ground
Jun 8, 2026
Merged

docs: clarify that Position.heading carries course over ground (#1187)#1783
mvanbeusekom merged 1 commit into
Baseflow:mainfrom
aki1770-del:docs-position-heading-course-over-ground

Conversation

@aki1770-del

Copy link
Copy Markdown
Contributor

Resolves #1187.

As discussed in #1187, Position.heading is named "heading" but actually carries course over ground (the direction of travel), not compass heading. In the issue, @mvanbeusekom proposed a documentation clarification rather than a breaking rename, and invited a PR.

This updates the dartdoc of Position.heading in geolocator_platform_interface to explain that the value is course over ground (distinct from compass heading), and that the heading name is retained for backward compatibility.

The documented native sources are accurate:

  • Android: geolocator_android/.../LocationMapper.java maps heading from Location.getBearing().
  • iOS: geolocator_apple/.../LocationMapper.m maps heading from CLLocation.course.

This is documentation-only — no code, signature, or serialization changes; the heading field name and behaviour are unchanged, so it is non-breaking.

Per your request in the issue:

  • Bumped geolocator_platform_interface 4.2.64.2.7.
  • Added a ## 4.2.7 CHANGELOG entry. I left the existing ## NEXT flutter_lints ^5.0.0 entry under NEXT so you can cut that on your own cadence — happy to fold it into this release instead if you'd prefer.

Verification (geolocator_platform_interface, Flutter 3.45 / Dart 3.11):

  • dart format — clean (no changes)
  • flutter analyze — No issues found!
  • flutter test — All tests passed! (115/115)

Branched from main per your note that the repo no longer uses a develop branch.

…low#1187)

Position.heading is named "heading" but actually carries course over
ground (direction of travel), not compass heading. Update the dartdoc to
explain this; keep the heading name for backward compatibility.

The value comes from Location.getBearing() on Android and
CLLocation.course on iOS.

Bump geolocator_platform_interface to 4.2.7 and add a CHANGELOG entry, as
requested by the maintainer in Baseflow#1187.

@mvanbeusekom mvanbeusekom left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is awesome, thank you so much!

@mvanbeusekom mvanbeusekom merged commit 9f4725e into Baseflow:main Jun 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Position.heading is mis-named

2 participants