# 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](/v6/usage/options.md). 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 [/pages/PHCyJci0lnfcS8LgyvNw#2.-hooking-into-inherited-state](https://docs.fleaflet.dev/v6/usage/pages/PHCyJci0lnfcS8LgyvNw#2.-hooking-into-inherited-state "mention").

{% content-ref url="/pages/UW2gppPcXFfE46FRhWT6" %}
[Control Camera](/v6/usage/programmatic-control/controller.md)
{% endcontent-ref %}

{% content-ref url="/pages/1cm3wsG3oD7AXsU6fMJk" %}
[Get Camera](/v6/usage/programmatic-control/get-camera.md)
{% endcontent-ref %}

{% content-ref url="/pages/sl4eSFK5ZvCyp3fur4r8" %}
[Listen To Events](/v6/usage/programmatic-control/listen-to-events.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fleaflet.dev/v6/usage/programmatic-control.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
