/// <summary> /// Create a rectangle using the passed RectangleOptions, which specify the bounds and style. /// </summary> /// <param name="opts"></param> public static async Task <Rectangle> CreateAsync(IJSRuntime jsRuntime, RectangleOptions opts = null) { var jsObjectRef = await JsObjectRef.CreateAsync(jsRuntime, "google.maps.Rectangle", opts); var obj = new Rectangle(jsObjectRef, opts); return(obj); }
public Task SetOptions(RectangleOptions options) { return(_jsRuntime.InvokeWithDefinedGuidAndMethodAsync <bool>( "googleMapRectangleJsFunctions.invoke", _guid.ToString(), "setOptions", options)); }
/// <summary> /// Create a rectangle using the passed RectangleOptions, which specify the bounds and style. /// </summary> /// <param name="opts"></param> public Rectangle(IJSRuntime jsRuntime, RectangleOptions opts = null) : base(jsRuntime) { if (opts != null) { _map = opts.Map; _jsRuntime.InvokeWithDefinedGuidAsync <bool>( "googleMapRectangleJsFunctions.init", _guid.ToString(), opts); } else { _jsRuntime.InvokeWithDefinedGuidAsync <bool>( "googleMapRectangleJsFunctions.init", _guid.ToString()); } }
/// <summary> /// Create a rectangle using the passed RectangleOptions, which specify the bounds and style. /// </summary> /// <param name="opts"></param> internal Rectangle(JsObjectRef jsObjectRef, RectangleOptions opts = null) { _jsObjetRef = jsObjectRef; _map = opts?.Map; }
public Task SetOptions(RectangleOptions options) { return(_jsObjetRef.InvokeAsync( "setOptions", options)); }