AGM cluster image change
I m using AGM map. I can able to change the cluster image. But I want to change cluster image dynamically. I have four buttons. For each button I have different colour images. Need to show the image based on the button click.
@silpa-kanthan could you please provide an example, to make clear what isn't working how it should work?
@jigfox sorry for the late reply
<agm-map #gm
[streetViewControl]="true"
[zoom]="zoomValue"
style="height: 82vh; background-position: 50% 50%"
[latitude]="mainLatitude"
[longitude]="mainLongitude"
>
<agm-marker-cluster imagePath="assets/images/{{category}}/m">
<agm-marker
*ngFor="let marker of mapList"
[latitude]="marker.Latitude"
[longitude]="marker.Longitude"
[iconUrl]="'assets/images/pg.png'">
</agm-marker>
</agm-marker-cluster>
</agm-map>
this is my code. In this I need to change the cluster image path dynamically. {{category}} - based on the button click the category value and cluster image path changes but the image not changing
Is it possible for you to provide the code? Where category gets changed, this way I could try to reproduce your problem
@jigfox ,
template code,
- Category1 {{Category1Count}}
- Category2 {{Category2Count}}
- Category3 {{Category3Count}}
public category = 'categoryone';
getCategory1() { this.category = 'categoryone'; }
getCategory2() { this.category = 'categorytwo'; }
getCategory3() { this.category = 'categorythree'; }
I would also like this to be possible. I would like to have different cluster icon based on conditions/properties found in the array of markers.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.