问题描述
我正在研究谷歌地图 (agm),我使用了带有航点属性的 agm 方向标签。因为一切正常,我面临的唯一问题是当我点击任何路标标记时,它会在信息窗口中显示该特定标记的地址。那么如何在我从 API 获得的信息窗口中显示一些其他信息。我正在尝试 [infowindow] = "infowindow"
但我不知道如何使用 infowindow 界面的 setcontent 方法。我也尝试使用 agm-marker,但在那里我的航路点不起作用,所以我切换回 agm-direction。
任何帮助将不胜感激。我附上了一些 SS 。谢谢。
{
export interface InfoWindow extends MVCObject {
constructor(opts?: InfoWindowOptions): void;
close(): void;
getContent(): string | Node;
getPosition(): LatLng;
getZIndex(): number;
open(map?: GoogleMap,anchor?: MVCObject): void;
setContent(content: string | Node): void;
setoptions(options: InfoWindowOptions): void;
setPosition(position: LatLng | LatLngLiteral): void;
setZIndex(zIndex: number): void;
}
<agm-map id="map1" [mapTypeControl]="true">
<agm-direction [infowindow]="infowindow" id="map1" [origin]="origin" [destination]="destination"
[waypoints]="actualWaypoints">
</agm-direction>
</agm-map>
}
on click i am getting address instead i want to some other info from API
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)