Skip to content

Commit 6f593f9

Browse files
Tsvetomir-Hrdimodi
andauthored
chore: apply suggestion
Co-authored-by: Dimo Dimov <[email protected]>
1 parent 503308a commit 6f593f9

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

knowledge-base/map-change-marker-colors.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,18 @@ To change the color of specific markers, target them based on their titles using
7474
</MapLayers>
7575
</TelerikMap>
7676
77-
@foreach (var mrk in MarkerData)
77+
<style>
78+
/* The first line is for the default marker style. The second one is for the hover state. */
79+
@foreach (MarkerModel marker in MarkerData)
7880
{
79-
<style>
80-
@* targets the default state *@
81-
.my-map .k-marker[title="@mrk.Title"],
82-
@* targets the hover state *@
83-
.my-map .k-marker[data-title="@mrk.Title"] {
84-
color: @mrk.Color;
85-
}
86-
</style>
81+
<text>
82+
.my-map .k-marker[title="@marker.Title"],
83+
.my-map .k-marker[data-title="@marker.Title"] {
84+
color: @marker.Color;
85+
}
86+
</text>
8787
}
88+
</style>
8889
8990
@code {
9091
private string[] Subdomains { get; set; } = new string[] { "a", "b", "c" };

0 commit comments

Comments
 (0)