Skip to content

Commit 3a31610

Browse files
committed
chore: polish example and add link in the market layer article
1 parent 61e7714 commit 3a31610

File tree

2 files changed

+23
-11
lines changed

2 files changed

+23
-11
lines changed

components/map/layers/marker.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,3 +317,7 @@ The `MapLayerMarkerSettingsTooltip` tag allows you to fine-tune the content, app
317317
}
318318
}
319319
````
320+
321+
## See Also
322+
323+
* [How to Change Map Marker Colors](slug://map-kb-change-marker-colors)

knowledge-base/map-customize-marker-colors.md renamed to knowledge-base/map-change-marker-colors.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: How to Customize Map Marker Colors
2+
title: How to Change Map Markers Colors
33
description: Learn how to customize the appearance of map markers by setting and changing their colors in a Blazor application.
44
type: how-to
5-
page_title: How to Customize Map Marker Colors
6-
slug: map-kb-customize-marker-colors
5+
page_title: How to Change Map Markers Colors
6+
slug: map-kb-change-marker-colors
77
tags: map, markers
88
res_type: kb
99
ticketid: 1675518
@@ -75,12 +75,17 @@ To change the color of specific markers, target them based on their titles using
7575
</TelerikMap>
7676
7777
<style>
78-
.my-map .k-marker[title="San Francisco, CA"] {
79-
color: blue;
78+
/* targets the default state */
79+
.my-map .k-marker[title="@MarkerData1[0].Title"],
80+
/* targets the hover state */
81+
.my-map .k-marker[data-title="@MarkerData1[0].Title"] {
82+
color: @MarkerData1[0].Color;
8083
}
81-
82-
.my-map .k-marker[title="Austin, TX"] {
83-
color: green;
84+
/* targets the default state */
85+
.my-map .k-marker[title="@MarkerData2[0].Title"],
86+
/* targets the hover state */
87+
.my-map .k-marker[data-title="@MarkerData2[0].Title"] {
88+
color: @MarkerData2[0].Color;
8489
}
8590
</style>
8691
@@ -95,7 +100,8 @@ To change the color of specific markers, target them based on their titles using
95100
new MarkerModel()
96101
{
97102
LatLng = new double[] { 30.268107, -97.744821 },
98-
Title = "Austin, TX"
103+
Title = "Austin, TX",
104+
Color = "#008000"
99105
}
100106
};
101107
@@ -104,14 +110,16 @@ To change the color of specific markers, target them based on their titles using
104110
new MarkerModel()
105111
{
106112
LatLng = new double[] { 37.7749, -122.4194 },
107-
Title = "San Francisco, CA"
113+
Title = "San Francisco, CA",
114+
Color = "#0000FF"
108115
}
109116
};
110117
111118
public class MarkerModel
112119
{
113-
public double[] LatLng { get; set; }
120+
public double[]? LatLng { get; set; }
114121
public string Title { get; set; } = null!;
122+
public string Color { get; set; } = null!;
115123
}
116124
}
117125
````

0 commit comments

Comments
 (0)