flutter_map Docs
Project Links๐Ÿ’ Support Us
v8
v8
  • flutter_map
  • Why & How
    • ๐ŸŒŸShowcase & Case Studies
    • โ”How Does It Work?
      • Raster vs Vector Tiles
    • ๐Ÿ‘€Demo & Examples
  • Getting Started
    • ๐Ÿš€What's New In v8?
    • Installation
  • Usage
    • Base Widget
      • Unbounded Horizontal Scrolling
    • Options
      • Interaction Options
      • Custom CRSs
    • Layers
    • Programmatic Interaction
      • Controllers & Cameras
      • External Custom Controllers
      • Listen To Events
    • Full API Reference
  • Layers
    • Tile Layer
      • Tile Providers
      • Built-In Caching
    • Marker Layer
    • Polygon Layer
    • Polyline Layer
    • Circle Layer
    • Overlay Image Layer
    • Attribution Layer
    • Layer Interactivity
      • Hit Testing Behaviour
  • Tile Servers
    • Using OpenStreetMap (direct)
    • Using Mapbox
    • Using Google Maps
    • Using Tracestrack
    • Using Thunderforest
    • Using Stadia Maps
    • Using Lima Labs
    • Using Bing Maps
    • Offline Mapping
    • Other Options
  • Plugins
    • Plugins List
    • Creating A Plugin
      • Creating New Tile Providers
      • Creating New Layers
  • Thanks
    • ๐Ÿ’Supporters
    • โœ๏ธCredits & Contributing
Powered by GitBook

ยฉ flutter_map Authors & Maintainers

On this page
  • Overview
  • Migration

Was this helpful?

Edit on GitHub
Export as PDF
  1. Getting Started

What's New In v8?

Overview

Here's some highlights:

Unbounded horizontal scrolling (by monsieurtanuki)

We're repeating the trend from v7, and introducing yet another feature that's been continuously requested for longer than we can remember ๐Ÿ˜‚!

Thanks to the hard work of external contributors, you can now pan and fling across the anti-meridian as much as you want (when using the default map projection only).

Feature layers (such as polygons) also work across all 'worlds'. Improvements to this are still ongoing as of v8.1.1.

This feature was bounty-funded, thanks to our generous Supporters! We hope to open more bounties in future.

Keyboard controls for map gestures

Maybe not quite as highly requested as horizontal scrolling, we've now also added buttery-smooth keyboard controls! On web and desktop platforms, these are important for accessibility and general usability.

Supports arrow & WASD keys for panning, QE keys for rotation, and RF keys for zoom. All key handlers are based on the physical layout of the QWERTY keyboard, so users using other keyboards will be able to use whichever keys are physically located in the same position. These are all optionally controllable via KeyboardOptions for MapOptions - only arrow keys are enabled by default.

Performance improvements

We've also fixed a major performance bug with simplification on Polygon/lineLayers. If you previously disabled simplification to workaround the bug and improve performance, we recommend considering re-enabling it.

Also thanks to the community, we've reworked some internals to reduce overheads and reduce the number of different objects.

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

Migrating to v8 should be pain-free for most apps, but some major changes are likely for plugins.

Some breaking changes have been made. The amount of migration required will depend on how much your project uses more advanced functionality. Basic apps are unlikely to require migration.

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.

PreviousDemo & ExamplesNextInstallation

Last updated 1 month ago

Was this helpful?

Most uses of replaced by & , by , and 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:

  • 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'.

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.

These classes have been described as in Dart/Flutter, and will be

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

Most migrations should be self explanatory. If necessary, you can 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.

๐Ÿš€
Point<double>
Offset
Size
Bounds<double>
Rect
Bounds<int>
legacy since Feb 2024
deprecated in future
which are inefficient
view the PR
flutter_map | Flutter PackageDart packages
CHANGELOG
Comparing v7.0.2...master ยท fleaflet/flutter_mapGitHub
Full Commit Listing
Logo
Logo