微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何在agm-direction标签中替换infowindow的地址信息?

如何解决如何在agm-direction标签中替换infowindow的地址信息?

我正在研究谷歌地图 (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 举报,一经查实,本站将立刻删除。