コード例 #1
0
 public Task SetPosition(LatLngLiteral position)
 {
     return(_jsRuntime.InvokeWithDefinedGuidAndMethodAsync <int>(
                "googleMapInfoWindowJsFunctions.invoke",
                Guid.ToString(),
                "setPosition",
                position));
 }
コード例 #2
0
 /// <summary>
 /// Sets the center of this circle.
 /// </summary>
 /// <param name="center"></param>
 public Task SetCenter(LatLngLiteral center)
 {
     return(_jsRuntime.InvokeWithDefinedGuidAndMethodAsync <bool>(
                "googleMapCircleJsFunctions.invoke",
                _guid.ToString(),
                "setCenter",
                center));
 }
コード例 #3
0
ファイル: Marker.cs プロジェクト: vladhorby/BlazorGoogleMaps
 public async Task SetPosition(LatLngLiteral latLng)
 {
     await _jsRuntime.InvokeWithDefinedGuidAndMethodAsync <object>(
         "googleMapMarkerJsFunctions.invoke",
         _guid.ToString(),
         "setPosition",
         latLng);
 }
コード例 #4
0
 /// <summary>
 /// Constructor with one or two given coordinate points.
 /// If the second point is null, the bounds are set to the first point.
 /// The points may be positioned arbitrarily.
 /// </summary>
 public LatLngBoundsLiteral(LatLngLiteral latLng1, LatLngLiteral latLng2 = null)
 {
     East  = latLng1.Lng;
     West  = latLng1.Lng;
     South = latLng1.Lat;
     North = latLng1.Lat;
     if (latLng2 != null)
     {
         Extend(latLng2);
     }
 }
コード例 #5
0
ファイル: Marker.cs プロジェクト: rezasfl/BlazorGoogleMaps
 public Task SetPosition(LatLngLiteral latLng)
 {
     return(_jsObjectRef.InvokeAsync(
                "setPosition",
                latLng));
 }
コード例 #6
0
ファイル: Circle.cs プロジェクト: willapp/BlazorGoogleMaps
 /// <summary>
 /// Sets the center of this circle.
 /// </summary>
 /// <param name="center"></param>
 public Task SetCenter(LatLngLiteral center)
 {
     return(_jsObjectRef.InvokeAsync("setCenter", center));
 }
コード例 #7
0
 /// <summary>
 /// Changes the center of the map to the given LatLng.
 /// If the change is less than both the width and height of the map, the transition will be smoothly animated.
 /// </summary>
 /// <param name="latLng"></param>
 /// <returns></returns>
 public Task PanTo(LatLngLiteral latLng)
 {
     return(_jsObjectRef.InvokeAsync("panTo", latLng));
 }
コード例 #8
0
 /// <summary>
 /// Extends this bounds to contain the given point.
 /// </summary>
 public Task Extend(LatLngLiteral point)
 {
     return(_jsObjectRef.InvokeAsync("extend", point));
 }
コード例 #9
0
 /// <summary>
 /// Returns true if the given lat/lng is in this bounds.
 /// </summary>
 public Task <bool> Contains(LatLngLiteral other)
 {
     return(_jsObjectRef.InvokeAsync <bool>("contains", other));
 }
コード例 #10
0
 /// <summary>
 /// Create or extend a LatLngBoundsLiteral with a given coordinate point.
 /// Using this method you can initialize a LatLngBoundsLiteral reference with null and call
 /// subsequently this method to extend the boundaries by given points.
 /// </summary>
 public static void CreateOrExtend(ref LatLngBoundsLiteral latLngBoundsLiteral, LatLngLiteral latLng)
 {
     if (latLngBoundsLiteral == null)
     {
         latLngBoundsLiteral = new LatLngBoundsLiteral(latLng);
     }
     else
     {
         latLngBoundsLiteral.Extend(latLng);
     }
 }
コード例 #11
0
 /// <summary>
 /// Extend these boundaries by a given coordinate point.
 /// </summary>
 public void Extend(LatLngLiteral latLng)
 {
     Extend(latLng.Lng, latLng.Lat);
 }
コード例 #12
0
 public Task Push(LatLngLiteral coordinate)
 {
     return(_jsObjectRef.InvokeAsync("push", coordinate));
 }
コード例 #13
0
        public async Task <Point> FromLatLngToPoint(LatLngLiteral literal)
        {
            var result = await _jsObjectRef.InvokeAsync <Point>("fromLatLngToPoint", literal);

            return(result);
        }