# Programmatic Control

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](https://docs.fleaflet.dev/v6/usage/options "mention"). It is possible to disable all input, either by disabling all gestures, or by wrapping the map with something like `IgnorePointer`.

## via Programmatic Means

When using programmatic means, there's two methods to most things, dependent on whether the context is within a `FlutterMap` (ie. usually a layer) or not.

If within `FlutterMap`'s context, the methods usually cause automatic rebuilding. As well as the pages below, also see [#2.-hooking-into-inherited-state](https://docs.fleaflet.dev/v6/plugins/making-a-plugin/creating-new-layers#2.-hooking-into-inherited-state "mention").

{% content-ref url="programmatic-control/controller" %}
[controller](https://docs.fleaflet.dev/v6/usage/programmatic-control/controller)
{% endcontent-ref %}

{% content-ref url="programmatic-control/get-camera" %}
[get-camera](https://docs.fleaflet.dev/v6/usage/programmatic-control/get-camera)
{% endcontent-ref %}

{% content-ref url="programmatic-control/listen-to-events" %}
[listen-to-events](https://docs.fleaflet.dev/v6/usage/programmatic-control/listen-to-events)
{% endcontent-ref %}
