Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular agm使标记群集分开_Angular_Google Maps_Agm - Fatal编程技术网

Angular agm使标记群集分开

Angular agm使标记群集分开,angular,google-maps,agm,Angular,Google Maps,Agm,我正在制作一个使用agm(谷歌地图)的网站 我已经成功地将标记聚类,这很好 但是,我希望标记单独聚类,这是否可行 例如,目前地图上有智能标记和旅行标记,它们将所有标记组合为一组,但是否可以将它们仅组合在一起 下面的代码显示了我正在创建的两个集群。我想这两个集群分别 <div ng-if="showTravellers" > <agm-marker-cluster [minimumClusterSize]= "minCluste

我正在制作一个使用agm(谷歌地图)的网站

我已经成功地将标记聚类,这很好

但是,我希望标记单独聚类,这是否可行

例如,目前地图上有智能标记和旅行标记,它们将所有标记组合为一组,但是否可以将它们仅组合在一起

下面的代码显示了我正在创建的两个集群。我想这两个集群分别



<div ng-if="showTravellers" >
      <agm-marker-cluster    [minimumClusterSize]= "minClusterSize"> 

          <agm-marker *ngFor="let m of intelligenceAlerts;let i = index;" [visible]="showIntelligence"  [latitude]="m.latitude" [longitude]="m.longitude" [iconUrl]= 'getTheIcon(m.riskId)'  >
            <agm-snazzy-info-window [maxWidth]="600" maxHeight="200px" [closeWhenOthersOpen]="true" backgroundColor="getTheColor(m.colour);">
                <ng-template>
                    <mat-form-field appearance="standard">
                        <mat-card> <h3><b>{{m.colour}}</b> </h3></mat-card>
                  <mat-card> <h3><b>{{m.title}}</b> </h3></mat-card>
                  <mat-card> <p>{{m.notes}} </p></mat-card>
                   <button>Description</button> <button>Start Date</button><button>End Date</button><button>Notes</button>
                 </mat-form-field>
                </ng-template>
               </agm-snazzy-info-window> 
         </agm-marker>
    </agm-marker-cluster>
    </div>



     <agm-marker-cluster    [minimumClusterSize]= "minClusterSize" > 

        <agm-marker *ngFor="let m of travelAlerts;let i = index;" [visible]="showTravellers" [latitude]="m.latitude" [longitude]="m.longitude" [iconUrl]= 'traveller'  >
          <agm-snazzy-info-window [maxWidth]="600" maxHeight="200px" [closeWhenOthersOpen]="true" >
              <ng-template>
                  <mat-form-field appearance="standard">
                      <mat-card> <h3><b>{{m.colour}}</b> </h3></mat-card>
                <mat-card> <h3><b>{{m.title}}</b> </h3></mat-card>
                <mat-card> <p>{{m.notes}} </p></mat-card>
                
               </mat-form-field>
              </ng-template>
             </agm-snazzy-info-window> 
       </agm-marker>

  </agm-marker-cluster>
     

{{m.color}}
{{m.title}}
{{m.notes}}

说明开始日期结束日期注释 {{m.color}} {{m.title}} {{m.notes}}


谢谢

您可以尝试暂时删除“已标记”的标记,然后在某个缩放级别/聚集发生后将其重新添加。例如: