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 Plugins
      • Tile Providers
      • Layers
      • Caching Providers
  • Thanks
    • 💝Supporters
    • ✏️Credits & Contributing
Powered by GitBook

© flutter_map Authors & Maintainers

On this page
  • via User Gestures
  • via Programmatic Interation

Was this helpful?

Edit on GitHub
Export as PDF
  1. Usage

Programmatic Interaction

PreviousLayersNextControllers & Cameras

Was this helpful?

There's two ways to interact with the map - that is to control it, as well as receive data from it - and it's current viewport, aka. 'camera'.

via User Gestures

The first way is through user interaction, where they perform gestures (such as drags/pans), and the map reacts automatically to those gestures to change the camera view of the map.

These are usually restricted by Options. It is possible to disable all input, either by disabling all gestures, or by wrapping the map with something like IgnorePointer.

via Programmatic Interation

However, the map camera can also be controlled by calling methods on a controller, and its state read by getting values from an exposed camera.

Changing the state of MapOptions.initial* will not update the map camera. It may only be updated through a MapController.

For more information, see:

Controllers & Cameras