How to remove default A B markers on ngMap

99封情书 提交于 2019-12-03 13:24:49

Marker Icons won't show up if You add

suppress-markers="true" in <directions> as below.

<ng-map zoom="14"
        center="1135 Karamea-Kohaihai Rd, Kahurangi National Park, Tasman"
        style="height:90%" >
        <directions
          draggable="true"
          suppress-markers="true"
          panel="p2"
          travel-mode="DRIVING"
          origin="1135 Karamea-Kohaihai Rd, Kahurangi National Park, Tasman"
          destination="Pier St, Jackson Bay, West Coast, New Zeland" suppressMarkers='true'>
        </directions>
        <custom-marker id="start"
          position="1135 Karamea-Kohaihai Rd, Kahurangi National Park, Tasman">
          <div> Start point </div>
        </custom-marker>
        <custom-marker id="end"
          position="Pier St, Jackson Bay, West Coast, New Zeland">
          <div> Ends point </div>
        </custom-marker>
      </ng-map>

OR

options.suppressMarkers = true; just before var renderer = new google.maps.DirectionsRenderer(options); In ng-map.js

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