-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Feature Description
Currently you need to pass in the visibility of the marker in the options input. It is a lot more intuitive to have an input where you can change that.
<map-marker *ngFor="let marker of markers; trackBy: markerTrackerFn" [options]="{ visible: !marker.hide }"></map-marker>
instead of:
<map-marker *ngFor="let marker of markers; trackBy: markerTrackerFn" [visible]="!marker.hide"></map-marker>
Use Case
We are adding a large amount of markers to google maps and you can select to show only a portion of those markers. Instead of creating the markers again we want to change the visibility of the marker so you don't have to wait a long time. Using the Google Maps API this worked quite fast but it is really slow with using @angular/google-maps
. We think that this is happening because of Angular change detection and/or that it redraws the markers everytime a new variable is passed in, in the options, in our case the visibility variable.
Nevertheless if this is the issue, it is still a lot more intuitive to control this via direct input than the options.