Skip to content

Commit 8979c34

Browse files
committed
Add z-index for advanced marker #451
1 parent 9919208 commit 8979c34

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

Demos/Demo.Ui.Shared/Pages/MapAdvancedMarkerViewPage.razor.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ private async Task AddMarker()
5757
});
5858

5959
_advancedMarkerElements.Push(marker);
60+
//await marker.SetZIndex(15);
6061
await _bounds.Extend(mapCenter);
6162

6263
await marker.AddListener<MouseEvent>("click", e =>

GoogleMapsComponents/GoogleMapsComponents.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<RazorLangVersion>3.0</RazorLangVersion>
1616
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
1717
<PackageId>BlazorGoogleMaps</PackageId>
18-
<Version>4.14.0</Version>
18+
<Version>4.14.1</Version>
1919
<Authors>Rungwiroon</Authors>
2020
<Company>QueueStack Solution</Company>
2121
<Product>BlazorGoogleMaps</Product>

GoogleMapsComponents/Maps/AdvancedMarkerView.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@ public Task<int> GetZIndex()
5656
return _jsObjectRef.InvokeAsync<int>("getZIndex");
5757
}
5858

59+
/// <summary>
60+
/// Sets the z-index of the marker.
61+
/// </summary>
62+
/// <param name="zIndex"></param>
63+
/// <returns></returns>
64+
public Task SetZIndex(int? zIndex)
65+
{
66+
return _jsObjectRef.InvokePropertyAsync("zIndex", zIndex);
67+
}
68+
5969
/// <summary>
6070
/// Sets the position of the marker.
6171
/// </summary>

0 commit comments

Comments
 (0)