Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public Task SetOptions(PolylineOptions options)
 {
     return(_jsRuntime.InvokeWithDefinedGuidAndMethodAsync <bool>(
                "googleMapPolylineJsFunctions.invoke",
                _guid.ToString(),
                "setOptions",
                options));
 }
Exemplo n.º 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());
            }
        }
Exemplo n.º 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;
 }
Exemplo n.º 5
0
 public Task SetOptions(PolylineOptions options)
 {
     return(_jsObjectRef.InvokeAsync(
                "setOptions",
                options));
 }