Ibr Dk
Ibr Dk

Reputation: 11

flutterMap remove the white stripes at the top and bottom

when using the flutter_map library, white stripes are displayed when scrolling the map up or down (https://i.sstatic.net/KGyhJ.png)

How to make the map height equal to the screen height when changing the max zoom and scrolling the problem remains

Upvotes: 1

Views: 125

Answers (1)

Nikita Mishkov
Nikita Mishkov

Reputation: 43

I found solution in flutter_map's example. Just add such cameraConstraint to MapOptions:

return FlutterMap(
  options: MapOptions(
    cameraConstraint: flutter_map.CameraConstraint.contain(
      bounds: flutter_map.LatLngBounds(
        const LatLng(-90, -180),
        const LatLng(90, 180),
      ),
    ),
  ),
)`

Upvotes: 1

Related Questions