Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does Mapbox currently provide the ability to add markers as widgets? If not, are there any plans to support the use of widgets as markers on the map in future updates? #826

Open
amitind49 opened this issue Jan 6, 2025 · 0 comments

Comments

@amitind49
Copy link

amitind49 commented Jan 6, 2025

I'm using PointAnnotationManager to create a marker. To create a custom marker right now I'm doing a widget to Uint8List. I expect that any other better way to use widget as marker on mapbox skd?

  static Future<Uint8List> widgetToIcon(GlobalKey globalKey) async {
    RenderRepaintBoundary boundary =
    globalKey.currentContext?.findRenderObject() as RenderRepaintBoundary;
    ui.Image image = await boundary.toImage();
    ByteData? byteData = await image.toByteData(format: ui.ImageByteFormat.png);
    return byteData!.buffer.asUint8List();
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant