How to get rid of `Google Map direction service's` markers?

。_饼干妹妹 提交于 2019-12-03 00:49:50

问题


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?


回答1:


Add suppressMarkers: true to the DirectionsRendererOptions

suppressMarkers | boolean |Suppress the rendering of markers.


来源:https://stackoverflow.com/questions/18033713/how-to-get-rid-of-google-map-direction-services-markers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!