> For the complete documentation index, see [llms.txt](https://docs.fleaflet.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fleaflet.dev/usage/basics/unbounded-horizontal-scrolling.md).

# Unbounded Horizontal Scrolling

Since v8 & v8.2, flutter\_map supports unbounded horizontal (longitudinally) scrolling for the default map projection. This means users can keep scrolling left and right (when North is up) and never hit an edge! Feature layers, such as the `PolygonLayer`, can also take advantage of this functionality.

<figure><img src="https://852902308-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSFuYRJZsfLx0EidjdMud%2Fuploads%2FCd9jceqcowllsDuEuZkd%2FBasic%20Multi-World%20Screenshot.png?alt=media&amp;token=24277919-707a-4aab-9e97-cedf206ba636" alt=""><figcaption></figcaption></figure>

## Enabling/disabling unbounded horizontal scrolling

Within the codebase, unbounded horizontal scrolling is referred to as `replicatesWorldLongitude`, and is set on the CRS/projection level.

The default projection, `Epsg3857`, enables the functionality by default.

<details>

<summary>Disabling unbounded horizontal scrolling</summary>

To disable the functionality, change the projection. If you want to keep using `Epsg3857`, create the following class, and pass it to `MapOptions.crs`:

```dart
class Epsg3857NoRepeat extends Epsg3857 {
  const Epsg3857NoRepeat();

  @override
  bool get replicatesWorldLongitude => false;
}
```

</details>

## Constraining the camera vertically/latitudinally

It's now possible to remove the grey edges that appear at the top and bottom of the map when zoomed far out.

To do this, set the `MapOptions.cameraConstraint` parameter:

```dart
FlutterMap(
    options: MapOptions(
      cameraConstraint: const CameraConstraint.containLatitude(),
    ),
    children: [],
),
```

## Feature layers & multi-worlds

Each square of map that is repeated longitudinally is referred to as a "world". By default, the feature layers (for example, `PolygonLayer`, `PolylineLayer`, `CircleLayer`, and `MarkerLayer`) will repeat their features across the layers, so that each world looks identical.

In the `PolylineLayer` & `PolygonLayer`, this can be disabled by setting the `drawInSingleWorld` property.

<div><figure><img src="https://852902308-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSFuYRJZsfLx0EidjdMud%2Fuploads%2FTp2javjQECyWd5sUaZss%2FdrawInSingleWorld%20disabled.png?alt=media&amp;token=75c0de86-cf05-43bc-bd85-9f4e6ad09472" alt=""><figcaption><p><code>drawInSingleWorld: false</code> (default)</p></figcaption></figure> <figure><img src="https://852902308-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSFuYRJZsfLx0EidjdMud%2Fuploads%2FrUDsoIkIB0dl5Ahyjb91%2FdrawInSingleWorld%20enabled.png?alt=media&amp;token=94f1767c-1e94-40c6-9680-8e3c0ff1c354" alt=""><figcaption><p><code>drawInSingleWorld: true</code></p></figcaption></figure></div>
