-
Notifications
You must be signed in to change notification settings - Fork 818
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
Add more flexibility to markers #1580
Comments
technically you can do this. You just need to add https://github.com/ackerapple/agm-overlays
|
I can confirm the above works @tbnovaes 💪 |
@MathiasHC I tried the @IsaacSomething solutions, but what happened to me was that I had the default marker pin, and over that the overlay... so I end up with 2 pins, the one I wanted and the one I didn't want. |
You can just make the marker icon source in |
@IsaacSomething Okay, I'll try it, thank you! Anyway I still think it would be a good addition to the marker to have it. Installing a new package just for that is not the best solution. EDIT: setting |
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. |
Thanks a lot :) <agm-map *ngIf="location"
[(latitude)]="location.latitude"
[(longitude)]="location.longitude"
[(zoom)]="location.zoom"
[(mapTypeId)]="location.mapType"
[zoomControl]="location?.zoomControl ? location.zoomControl : false"
[scrollwheel]="location?.scrollwheel ? location.scrollwheel : false"
[mapTypeControl]='location?.mapTypeControl ? location.mapTypeControl : false'
[streetViewControl]='location?.streetViewControl ? location.streetViewControl : false'
[fullscreenControl]="location?.fullscreenControl ? location.fullscreenControl : false">
<agm-marker *ngFor="let m of location?.markers;"
[(latitude)]="m.latitude"
[(longitude)]="m.longitude"
[label]="m.label"
[iconHeight]="20"
[iconWidth]="20"
[markerDraggable]="m.draggable">
<agm-overlay
[(latitude)]="m.latitude"
[(longitude)]="m.longitude">
<div>
<i *ngIf="!isBase64(m.iconUrl)" [class]="m.iconUrl" [style.color]="m.color" style="height: 20px; width: 20px;"></i>
<img *ngIf="isBase64(m.iconUrl)" [src]="m.iconUrl" height="20" width="20">
</div>
</agm-overlay>
</agm-marker>
</agm-map> |
As of now, the only way to add markers is by using an image. It would be great to be able to also use icons (Eg.: font awesome) and to set colors.
The text was updated successfully, but these errors were encountered: