Skip to content
This repository was archived by the owner on Nov 30, 2018. It is now read-only.
This repository was archived by the owner on Nov 30, 2018. It is now read-only.

Styling agm-marker labels #2021

Open
Open
@zolastro

Description

@zolastro

Is there a way to style the labels that appear just on top the agm-marker? In my case, I would like to add a shadow to the text, but this doesn't seem to work. If I add the styling for the whole agm-map, I get the desired result, but some text like addresses and street view is also affected.

I've also tried this approach, but it doesn't work either:

agm-marker { text-shadow: -1px 0 #fff, 0 1px #fff, 1px 0 #fff, 0 -1px #fff; }

Some suggestions?

Here is part of the actual HTML code that I'm currently using.

<agm-map
    [latitude]="coordinates.latitude"
    [longitude]="coordinates.longitude"
    [zoom]="10">
         <agm-marker
            class="shadow-text"
            *ngFor="let location of pois"
            [markerClickable]="true"
            [latitude]="location.geoLocation.latitude"
            [longitude]="location.geoLocation.longitude"
            [label]="location.title"
     ></agm-marker>
</agm-map>

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions