Google Maps を拡張し、開発者がマップ上にカスタムウィジェットベースのマーカーを配置できるようにするFlutterパッケージです。標準のマーカーとは異なり、このパッケージではアイコン、アバター、インタラクティブな要素など、任意のFlutterウィジェットをマップマーカーとして使用できます。Google Mapsプラグインとシームレスに統合され、Android、iOS、Webプラットフォームをサポートしています。単なる画像やテキストを超えた、豊富で動的な、またはインタラクティブなマーカーコンテンツが必要なアプリに最適です。
You need to insert the list of WidgetMarker to use widget markers.
Make sure that you still need to use onTap method when you use gestures.
class WidgetMarker {
WidgetMarker({
required this.position,
required this.markerId,
required this.widget,
this.onTap,
}) : assert(markerId.isNotEmpty);
final LatLng position;
/// Keep this unique, otherwise it will not appear.
final String markerId;
/// Gestures of widget is disabled.
/// Use this callback instead.
final VoidCallback? onTap;
final Widget widget;
}
If you have any requests or questions, feel free to ask on github.
Contributors ✨
Thanks goes to these wonderful people (emoji key):