How to remove default AB markers on ngMap

I am using ng-map in my angular application. I use routes on my map, but I do not need points A and B. help me hide these markers. I got one solution but this does not help in the ng card. thts, s how i used it.

<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, 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 maybe I'm not using it correctly. check out this plunker . Help

+7
angularjs google-maps ng-map
source share
1 answer

Marker icons will not appear if you add

suppress-markers="true" in <directions> , as shown 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; before var renderer = new google.maps.DirectionsRenderer(options); In ng-map.js

+6
source share

All Articles