[Google Maps] How do I hide the default markers of directions?

Forge Component
Published on 2018-10-18 by Labs
25 votes
Published on 2018-10-18 by Labs


How can I hide the markers "A" and "B" on direction.

I can't figure out where to apply the "suppressMarkers: true" parameter... but that's the parameter to turn off the markers.  If you can find the place to put it, please post.

In Javascript, it's this...

SyntaxEditor Code Snippet

    var myLatLng = {lat: 41.218624, lng: -73.748358};

    var myOptions = {
        zoom: 15,
        center: myLatLng,
        mapTypeId: google.maps.MapTypeId.ROADMAP

    map = new google.maps.Map(document.getElementById('myMap'), myOptions);
    directionsDisplay = new google.maps.DirectionsRenderer({map: map, suppressMarkers: true});

Also, have a look at this post.  No further help, just more info...