Change individual markers in google maps directions api V3

前端 未结 2 1285
北恋
北恋 2020-12-04 14:37

I\'m looking to change the marker icons when using the DirectionsRender within a google map. I\'ve figured out from here how to change both the markers to the same icon, but

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-04 15:04

    Do as they say on that page you linked to:

    • Set the suppressMarkers option to true to prevent the default start and end markers from showing
    • Create the images for the two new markers
    • Create the markers with the position set to the start and end positions, and the icon set to the ones you created

提交回复
热议问题