Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set color to mgl-marker #382

Open
magnut0 opened this issue Aug 22, 2022 · 4 comments
Open

Set color to mgl-marker #382

magnut0 opened this issue Aug 22, 2022 · 4 comments

Comments

@magnut0
Copy link

magnut0 commented Aug 22, 2022

How do you set the color property to default marker?
image
image

@l0rdsami
Copy link

Have you by chance found a solution for this?

@magnut0
Copy link
Author

magnut0 commented Nov 12, 2022

Have you by chance found a solution for this?

Yes. I used my own SVG markers.
<ng-container *ngFor="let log of scheduleDetails.eventLogs"> <mgl-marker #myMarker [lngLat]="[log.longitude, log.latitude]"> <img [src]="'../../../../assets/img/map/' + getMarkerColor(log)" /> </mgl-marker> <mgl-popup [marker]="myMarker" [anchor]="'bottom'" [closeOnClick]="false" [offset]="17"> <div class="mglPopup"> {{ log.eventAddress }} <br /> {{ log.date | date: 'MM/dd/yy hh:mm a' }} <br /> {{ getType(log) }} </div> </mgl-popup> </ng-container>

@l0rdsami
Copy link

That's the only solution I found as well, thanks for the snippet

@csimpi
Copy link

csimpi commented Nov 13, 2022

Same here, would be great to set the color

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants