Beispiel #1
0
 public async Task SetLabel(MarkerLabel label)
 {
     var result = await _jsRuntime.InvokeWithDefinedGuidAndMethodAsync <object>(
         "googleMapMarkerJsFunctions.invoke",
         _guid.ToString(),
         "setLabel",
         label);
 }
Beispiel #2
0
        public async Task SetLabelText(string labelText)
        {
            OneOf <string, MarkerLabel> markerLabel = await GetLabel();

            if (markerLabel.IsT1)
            {
                MarkerLabel label = markerLabel.AsT1;
                label.Text = labelText;
                await SetLabel(label);
            }
            else
            {
                await SetLabel(labelText);
            }
        }