Closed YogliB closed 5 years ago
Hi, please add renderOptions
with suppressMarkers: true
HTML
<agm-map [latitude]="lat" [longitude]="lng">
<agm-direction
[origin]="origin"
[destination]="destination"
[markerOptions]="markerOptions"
[renderOptions]="renderOptions"
>
</agm-direction>
</agm-map>
TS
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
public lat = 24.799448;
public lng = 120.979021;
public origin: any = 'No. 1, Section 1, Taiwan Avenue, Central District, Taichung, Taiwan';
public destination: any = 'No. 1 Guanqian Road, North District, Taichung City';
// add renderOptions
public renderOptions = {
suppressMarkers: true,
};
public markerOptions = {
origin: { infoWindow: 'ORIGIN' },
destination: { infoWindow: 'DESTINATION' },
waypoints: { infoWindow: 'WAYPOINT' },
};
}
I tried following this answer, but the infoWindow stays the default option (address).
Live example