You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently trying to make a screenshot of my MapWidget.
I've used https://pub.dev/packages/screenshot package which can only take a snapshot of native AndroidView and not the UIKitView (iOS). There is an ongoing issue with the screen capture which uses RenderRepaintBoundary. The last trace of it is here: flutter/flutter#97853.
I really need to make a screenshot of the map on iOS platform.
Classes generated by pigeon inside map_interfaces.dart contain:
MapSnapshot - /// An image snapshot of a map rendered by `map snapshotter`.
MapSnapshotter -/// MapSnapshotter exposes functionality to capture static map images.
and that basically all the information I've found about them. Whenever I try to instantiate them, I am getting PlatformException(channel-error, Unable to establish connection on channel., null, null)
I've also looked up into official documentation for Android and iOS and have found some implementation in kotlin and swift. For iOS the latest mention in official documentation is for MapBox SDK v9.
Swift code for the problem I'm trying to solve:
MapSnapshotter.Options snapShotOptions = new MapSnapshotter.Options(500, 500);
snapShotOptions.withRegion(mapboxMap.getProjection().getVisibleRegion().latLngBounds);
snapShotOptions.withStyle(mapboxMap.getStyle().getUrl());
MapSnapshotter mapSnapshotter = new MapSnapshotter(this, snapShotOptions);
mapSnapshotter.start(new MapSnapshotter.SnapshotReadyCallback() {
@Override
public void onSnapshotReady(MapSnapshot snapshot) {
// Display, share, or use bitmap image how you'd like
Bitmap bitmapImage = snapshot.getBitmap();
}
});
I've tried to reproduce this Swift code in flutter, but the package seems to missing the required APIs.
The text was updated successfully, but these errors were encountered:
@gangoappdev try using Static Images API from Mapbox (https://docs.mapbox.com/api/maps/static-images/). It worked well for me. You can exactly match the viewport of what the user sees in the app. Also, the API allows drawing vectors on the map and putting images (deployed on CDN).
Hi all, thank you for your interest in snapshotter, we've implemented snapshotting capabilities in #512 and #513 which should be a part of the next beta release.
I am currently trying to make a screenshot of my MapWidget.
I've used https://pub.dev/packages/screenshot package which can only take a snapshot of native AndroidView and not the UIKitView (iOS). There is an ongoing issue with the screen capture which uses RenderRepaintBoundary. The last trace of it is here: flutter/flutter#97853.
I really need to make a screenshot of the map on iOS platform.
Classes generated by pigeon inside map_interfaces.dart contain:
MapSnapshot -
/// An image snapshot of a map rendered by `map snapshotter`.
MapSnapshotter -
/// MapSnapshotter exposes functionality to capture static map images.
and that basically all the information I've found about them. Whenever I try to instantiate them, I am getting
PlatformException(channel-error, Unable to establish connection on channel., null, null)
I've also looked up into official documentation for Android and iOS and have found some implementation in kotlin and swift. For iOS the latest mention in official documentation is for MapBox SDK v9.
Swift code for the problem I'm trying to solve:
I've tried to reproduce this Swift code in flutter, but the package seems to missing the required APIs.
The text was updated successfully, but these errors were encountered: