如何摆脱Google Map方向服务的标记? [英] How to get rid of `Google Map direction service's` markers?

查看:119
本文介绍了如何摆脱Google Map方向服务的标记?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google地图方向服务 Api有两个副作用

1-它将 Markers 自动添加到来源和目的地。



2-它添加了两个 InfoWindow 添加到新的标记,包含它们的地址。 $ b



任何想法如何摆脱这些标记和他们的infoBubble?

解决方案

添加suppressMarkers:对 DirectionsRendererOptions

  suppressMarkers |布尔型|禁止标记的渲染。 


The Google map Direction Service Api has two "side effects",

1- it adds Markers automatically to origin and destination.

2- it adds two InfoWindow to the new Markers, containing their addresses.

Any idea how to get rid of theese Markers and their infoBubble?

解决方案

Add suppressMarkers: true to the DirectionsRendererOptions

suppressMarkers | boolean |Suppress the rendering of markers.

这篇关于如何摆脱Google Map方向服务的标记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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