๐Ÿš€What's New In v8?

Overview

Here's some highlights:

Unbounded horizontal scrolling (by monsieurtanuki)

Keyboard controls for map gestures

Performance improvements

We've also made other changes to improve the experience for your users. Checkout the CHANGELOG for the curated changes, and the full commit listing for all the small details.

Migration

Most uses of Point<double> replaced by Offset & Size, Bounds<double> by Rect, and Bounds<int> by (IntegerBounds)

With the exception of some areas, uses of 'dart:math' objects, such as Point, have been replaced by equivalents from 'dart:ui' and Flutter libraries. There's multiple reasons for this:

  • These classes have been described as legacy since Feb 2024 in Dart/Flutter, and will be deprecated in future

  • This reduces internal casting (which we did a whole lot) and usage of generic types (which are inefficient), which has increased performance by around a millisecond or three (in a simple example)

  • The tooling and functionality provided by Dart/Flutter reduce the amount we need to maintain internally (reducing duplication), and work better together (such as easily building Rects from Offsets and Sizes

This breaks a large number of coordinate handling functions, such as those converting between geographic coordinates and screen space coordinates (the changed ones) in the MapCamera. We've also renamed some of these functions to remove references to 'point' and replace them with 'offset'.

Most migrations should be self explanatory. If necessary, you can view the PR to see what happened to a method you were using - there's very likely a close replacement! Some methods have been moved to internal usage only, but there's always easy alternatives.

Some external libraries still use the previous objects, and some of our use-cases are just not yet ready to be replaced by these options yet, so you may still find some of the old objects hiding around the codebase. IntegerBounds is internal only.

TileLayer.tileSize replaced by tileDimension

Just changing the argument identifier should be enough - we've just restricted the type to be an integer. You can't get tiles in fractional pixels anyway!

This renaming is also persisted throughout the internals.

Last updated

Was this helpful?