使用Flutter在Google地图中添加标记 [英] Add marker in google maps with Flutter

查看:374
本文介绍了使用Flutter在Google地图中添加标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设法在flutter应用程序中创建了一个Google地图,并且能够使用纬度和经度显示我的位置以及标记.有谁知道如何为Google地图中已经存在的业务创建标记?我应该传递给标记什么来识别已经存在于Google地图中的业务???谢谢

I have managed to create a google map in my flutter app and I am able to show my location and also markers using latitude and longitude. Does anyone know how to create a marker for a business which already exist in google map? What should I pass to the marker to identify a business which is already in google map??? Thanks

推荐答案

您可以使用地点搜索自动完成服务以查找现有业务,然后将在geometry.location中从结果中获得的经/纬度坐标传递到标记的位置,以便将标记放置在该业务的位置,如这些链接的示例所示.

You can use a Place Search or Autocomplete service to find an existing business, and then pass the lat/lng coordinates you get from the results, in geometry.location, to a marker's position so that the marker is placed on that business' location, as demonstrated in those linked examples.

希望这会有所帮助!

这篇关于使用Flutter在Google地图中添加标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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