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
226 stars 125 forks source link

Add support for 'setPadding' #258

Open stefanschaller opened 1 year ago

stefanschaller commented 1 year ago

Since padding for the viewport is useful for centering the content, it would be helpful to add the setPadding to this package. Example: https://maplibre.org/maplibre-gl-js-docs/example/offset-vanishing-point-with-padding/

The documentation for the native side: https://maplibre.org/maplibre-gl-js-docs/api/map/#map#setpadding

Example: (Native)

        mapView = MapView(context, options)

        mapView.setPadding(20, 20, 10, 60)

It would be great to use it like that:

maplibreMapController.setPadding(left: 20, right: 20, bottom: 20, top: 20);

artemmmon commented 1 year ago

Any updates? Really need this feature.

m0nac0 commented 1 year ago

Looks like we could use