但我不想在地图上关闭点击请帮忙。它有一个名为closeOnMapClick
的属性,但它不起作用,
<agm-snazzy-info-window closeWhenOthersOpen="true" [isOpen]="i == selected ? markerFlag : false" [latitude]="list.Latitude"
[longitude]="list.Longitude" closeOnMapClick="false">
<template>
</template>
<agm-snazzy-info-window>
答案 0 :(得分:0)
您在上述财产周围缺少信息:
<agm-snazzy-info-window [closeWhenOthersOpen]="true" [isOpen]="i == selected ?
markerFlag : false" [latitude]="list.Latitude"
[longitude]="list.Longitude" [closeOnMapClick]="false">
<template>
<!-- Something -->
</template>
<agm-snazzy-info-window>
答案 1 :(得分:0)
下面的解决方案
<agm-map style="position: inherit; top: 10;width: 870px;height: 460px" [latitude]="Latitude" [longitude]="Longitude" [scrollwheel]="true"
[zoomControl]="true" [zoom]="zoom" [disableDefaultUI]="false" [mapTypeControl]="true" [zoomControl]="false" [clickableIcons]="false" [usePanning]="true">
<div id="marker" *ngFor="let list of maplistmarker, let i = index;">
<agm-marker [iconUrl]="list.ClarifiId == selected ? './assets/images/markerorange.png' : './assets/images/marker.png'" *ngIf="list.ClarifiId"
[latitude]="list.Latitude" [longitude]="list.Longitude" (markerClick)="markerClick(i,list.Latitude,list.ClarifiId,list.minrate,list.miles)"
[zIndex]="list.ClarifiId == selected ? 1: -1">