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

FM v6 is coming soon #12

Closed
JaffaKetchup opened this issue Oct 4, 2023 · 3 comments
Closed

FM v6 is coming soon #12

JaffaKetchup opened this issue Oct 4, 2023 · 3 comments

Comments

@JaffaKetchup
Copy link

The next version of flutter_map is coming soon, with breaking changes for all users and plugins!

Expected CHANGELOG: https://github.com/fleaflet/flutter_map/blob/release-prep/CHANGELOG.md
Likely to be merged PR with significant impacts: fleaflet/flutter_map#1615
Release prep PR: fleaflet/flutter_map#1632
New documentation (path liable to change): https://docs.fleaflet.dev/v/v6-1
Expected migration instructions, suitable for most users: https://docs.fleaflet.dev/v/v6-1/getting-started/migrating-to-v6
List of commits since v5 (more to come): fleaflet/flutter_map@v5.0.0...master

@androidseb
Copy link
Owner

@JaffaKetchup thanks for letting me know!

I had already upgraded my code, waiting for the V6 to land to finalize the dependency declaration:
#11

Great work to you and the flutter_map team, the changes you made recently are allowing for cleaner code on my end, I'm looking forward to doing this 🙂

@androidseb
Copy link
Owner

I published a new version of flutter_map_floating_marker_titles using flutter_map ^6.0.0.

@JaffaKetchup thanks to you and the team for the nice refactors around both accessing the map view state and removing nonRotatedChildren: this allowed me to introduce a new FloatingMarkerTitlesLayer Widget to be used a layer directly inside the FlutterMap widget layers, instead of having to create a wrapper widget.

Users of this library now have two options for creating floating marker titles:

// With the FlutterMapWithFMTO widget as a FlutterMap wrapper
FlutterMapWithFMTO(
  floatingTitles: floatingTitles,
  fmtoOptions: fmtoOptions,
  // ... other than the 2 above option, this widget takes
  // exactly the same props as the FlutterMap widget.
  options: MapOptions(
    center: LatLng(0, 0),
    zoom: 13,
  ),
  children: [
    TileLayer(
      urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
    ),
  ],
)

// Or with the FloatingMarkerTitlesLayer widget as a FlutterMap layer
FlutterMap(
  options: MapOptions(
    center: LatLng(0, 0),
    zoom: 13,
  ),
  children: [
    TileLayer(
      urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
    ),
    FloatingMarkerTitlesLayer(
      floatingTitles: floatingTitles,
      fmtoOptions: fmtoOptions,
    ),
  ],
)

I'll close this issue now, since it's resolved with the latest version of this library.

@JaffaKetchup
Copy link
Author

That looks a lot better! One of the reasons we did this :)

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

No branches or pull requests

2 participants