Flutter Google Maps插件的自定义标记 [英] Custom markers with Flutter Google Maps plugin

查看:390
本文介绍了Flutter Google Maps插件的自定义标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用官方 Flutter Google Maps插件显示自定义标记在地图上?根据文档找不到任何方法.

Is there a way to display custom markers with the official Flutter Google Maps plugin on the map? Can't find any way to do it based on the documentation.

推荐答案

我正在使用:

controller.addMarker(MarkerOptions(
  icon: BitmapDescriptor.fromAsset("images/restaurant.png"),
  position: LatLng(40.017870, -105.278350),
));

它在Android上运行良好,但在iOS上不运行.

It works fine on Android, but it doesn't work on iOS.

这篇关于Flutter Google Maps插件的自定义标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆