flutter_map Docs
Project Links💝 Support Us
v7
v7
  • flutter_map
  • 🏗️Why Choose flutter_map?
  • 💝Supporters
  • ✏️Credits & Contributing
  • Getting Started
    • How Does It Work?
      • Raster vs Vector Tiles
    • Installation
    • Examples
    • v7 Information
  • Usage
    • Base Widget
    • Options
      • Interaction Options
      • Custom CRSs
    • Layers
    • Programmatic Interaction
      • Controllers & Cameras
      • External Custom Controllers
      • Listen To Events
    • Full API Reference
  • Layers
    • Tile Layer
      • Tile Providers
      • WMS Usage
    • Marker Layer
    • Polygon Layer
    • Polyline Layer
    • Circle Layer
    • Overlay Image Layer
    • Attribution Layer
    • Layer Interactivity
      • Hit Testing Behaviour
  • Tile Servers
    • Using Google Maps
    • Using Mapbox
    • Using Thunderforest
    • Using Tracestrack
    • 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
Powered by GitBook

© flutter_map Authors & Maintainers

On this page
  • RichAttributionWidget
  • SimpleAttributionWidget

Was this helpful?

Export as PDF
  1. Layers

Attribution Layer

PreviousOverlay Image LayerNextLayer Interactivity

Last updated 9 months ago

Was this helpful?

Before publishing your app to users, you should credit any sources you use, according to their Terms of Service.

There are two built in methods to provide attribution, RichAttributionWidget and SimpleAttributionWidget, but you can also build your own using a simple Align widget.

You must comply with the appropriate restrictions and terms of service set by your tile server. Failure to do so may lead to any punishment, at the tile server's discretion.

This library and/or the creator(s) are not responsible for any violations you make using this package.

The OpenStreetMap Tile Server (as used above) ToS can be . Other servers may have different terms.

Please consider crediting flutter_map. It helps us to gain more awareness, which helps make this project better for everyone!

RichAttributionWidget

An animated, interactive attribution layer that supports both logos/images (displayed permanently) and text (displayed in a popup controlled by an icon button adjacent to the logos).

It is heavily customizable (in both animation and contents), and designed to easily meet the needs of most ToSs out of the box.

children: [
  RichAttributionWidget(
    animationConfig: const ScaleRAWA(), // Or `FadeRAWA` as is default
    attributions: [
      TextSourceAttribution(
        'OpenStreetMap contributors',
        onTap: () => launchUrl(Uri.parse('https://openstreetmap.org/copyright')),
      ),
    ],
  ),
],

For more information about configuration and all the many options this supports, see the in-code API documentation.

SimpleAttributionWidget

We also provide a more 'classic' styled box, similar to those found on many web maps. These are less customizable, but might be preferred over RichAttributionWidget for maps with limited interactivity.

children: [
  SimpleAttributionWidget(
    source: Text('OpenStreetMap contributors'),
  ),
],
found here
LogoRichAttributionWidget class - flutter_map library - Dart API
LogoSimpleAttributionWidget class - flutter_map library - Dart API
Closed RichAttributionWidget
Opened RichAttributionWidget, as in the example app
SimpleAttributionWidget, as in the example app
A white box with attribution text displayed over a map
An icon and a button displayed over a map, in the bottom right corner