-
Notifications
You must be signed in to change notification settings - Fork 159
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
[Bug Report]: 关于MBaiduMap组件,添加Marker #2125
Labels
Milestone
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Masa.Blazor version
1.7.0
Describe the bug
我使用MBaiduMap组件,按照实例子中的方式,添加Marker点,无反应,怎么办?
顺便问一下,Marker能不能自定义图标??
<MBaiduMap Height="540" @ref=_map
DarkThemeId="9828881e7efb0182edb48236a3b53293"
Style="width:90%; left:5%"
Zoom="15" EnableScrollWheelZoom
Center="new(116.403622f,39.918145f)">
</MBaiduMap>
@code {
private MBaiduMap? _map;
private MBaiduMarker? _addExampleMarker;
private async Task AddMarker()
{
if (_addExampleMarker is null)
_addExampleMarker = new()
{
Point = new(116.403874f, 39.911919f),
Title = "天安门",
};
if (await _map.ContainsOverlayAsync(_addExampleMarker))
return;
await _map.AddOverlayAsync(_addExampleMarker);
}
}
Expected Behavior
No response
Steps To Reproduce
No response
Reproduction code
No response
.NET version
No response
What browsers are you seeing the problem on?
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: