maplibre / flutter-maplibre-gl

Customizable, performant and vendor-free vector and raster maps, flutter wrapper for maplibre-native and maplibre-gl-js (fork of flutter-mapbox-gl/maps)
https://pub.dev/packages/maplibre_gl
Other
186 stars 106 forks source link

[Feature] Support EdgeInsets as `padding` on `setCameraBounds` #349

Closed razorness closed 7 months ago

razorness commented 7 months ago

Hello, thank you for this awesome package. I have a usecase where I use a large widget over a map which is displayed full screen. So, I need to set padding on setCameraBounds for earch side individually. It would be nice if this package could support EdgeInsets as padding option.

It is supported by Maplibre GL JS and CameraUpdateFactory.newLatLngBounds in Maplibre native.

razorness commented 7 months ago

However, found out that you can use animateCamera as well which supports values for each side.

m0nac0 commented 7 months ago

If you do not want an animation, you can also use moveCamera. I actually don't know if we need the setCameraBounds method anymore, since there is another, more general way to update the camera. Also there are no specific methods to update other camera properties.

razorness commented 7 months ago

Well, I think this can be closed. Nice move to add some docs.