我在角度应用程序中使用ng-map.在我的地图我使用方向,但我不需要A和B点.请帮我隐藏这些标记.
我有一个 solution
但它没有帮助ng-map.
那是我怎么说的.
我有一个 solution
但它没有帮助ng-map.
那是我怎么说的.
<ng-map zoom="14" center="1135 Karamea-Kohaihai Rd,Kahurangi National Park,Tasman" style="height:90%" > <directions draggable="true" panel="p2" travel-mode="DRIVING" origin="1135 Karamea-Kohaihai Rd,Tasman" destination="Pier St,Jackson Bay,West Coast,New Zeland" suppressMarkers='true'> </directions> <custom-marker id="start" position="1135 Karamea-Kohaihai Rd,Tasman"> <div> Start point </div> </custom-marker> <custom-marker id="end" position="Pier St,New Zeland"> <div> Ends point </div> </custom-marker> </ng-map>
或者我可能没有正确使用它.
检查这个plunker.
救命
如果添加,标记图标将不会显示
< direction>中的suppress-markers =“true”如下.
<ng-map zoom="14" center="1135 Karamea-Kohaihai Rd,Tasman" style="height:90%" > <directions draggable="true" suppress-markers="true" panel="p2" travel-mode="DRIVING" origin="1135 Karamea-Kohaihai Rd,Tasman" destination="Pier St,New Zeland" suppressMarkers='true'> </directions> <custom-marker id="start" position="1135 Karamea-Kohaihai Rd,Tasman"> <div> Start point </div> </custom-marker> <custom-marker id="end" position="Pier St,New Zeland"> <div> Ends point </div> </custom-marker> </ng-map>
要么
options.suppressMarkers = true;就在var renderer = new google.maps.DirectionsRenderer(options)之前;在ng-map.js中