示例#1
0
        /// <summary>
        /// Create a polyline using the passed PolylineOptions, which specify both the path of the polyline and the stroke style to use when drawing the polyline.
        /// </summary>
        public async static Task <Polyline> CreateAsync(IJSRuntime jsRuntime, PolylineOptions opts = null)
        {
            var jsObjectRef = await JsObjectRef.CreateAsync(jsRuntime, "google.maps.Polyline", opts);

            var obj = new Polyline(jsObjectRef, opts);

            return(obj);
        }
示例#2
0
 public Task SetOptions(PolylineOptions options)
 {
     return(_jsRuntime.InvokeWithDefinedGuidAndMethodAsync <bool>(
                "googleMapPolylineJsFunctions.invoke",
                _guid.ToString(),
                "setOptions",
                options));
 }
示例#3
0
        /// <summary>
        /// Create a polyline using the passed PolylineOptions, which specify both the path of the polyline and the stroke style to use when drawing the polyline.
        /// </summary>
        public Polyline(IJSRuntime jsRuntime, PolylineOptions opts = null)
            : base(jsRuntime)
        {
            if (opts != null)
            {
                _map = opts.Map;

                _jsRuntime.InvokeWithDefinedGuidAsync <bool>(
                    "googleMapPolylineJsFunctions.init",
                    _guid.ToString(),
                    opts);
            }
            else
            {
                _jsRuntime.InvokeWithDefinedGuidAsync <bool>(
                    "googleMapPolylineJsFunctions.init",
                    _guid.ToString());
            }
        }
示例#4
0
 /// <summary>
 /// Create a polyline using the passed PolylineOptions, which specify both the path of the polyline and the stroke style to use when drawing the polyline.
 /// </summary>
 private Polyline(JsObjectRef jsObjectRef, PolylineOptions opts = null)
 {
     _jsObjectRef = jsObjectRef;
     _map         = opts?.Map;
 }
示例#5
0
 public Task SetOptions(PolylineOptions options)
 {
     return(_jsObjectRef.InvokeAsync(
                "setOptions",
                options));
 }