public Task <int> GetZoom()
 {
     return(JsRuntime.InvokeWithDefinedGuidAndMethodAsync <int>(
                "googleMapJsFunctions.invoke",
                DivId,
                "getZoom"));
 }
 /// <summary>
 /// Returns the position displayed at the center of the map.
 /// Note that this LatLng object is not wrapped.
 /// </summary>
 /// <returns></returns>
 public Task <LatLngLiteral> GetCenter()
 {
     return(JsRuntime.InvokeWithDefinedGuidAndMethodAsync <LatLngLiteral>(
                "googleMapJsFunctions.invoke",
                DivId,
                "getCenter"));
 }
 /// <summary>
 /// Sets the viewport to contain the given bounds.
 /// </summary>
 /// <param name="bounds"></param>
 /// <returns></returns>
 public Task FitBounds(LatLngBoundsLiteral bounds)
 {
     return(JsRuntime.InvokeWithDefinedGuidAndMethodAsync <object>(
                "googleMapJsFunctions.invoke",
                DivId,
                "fitBounds",
                bounds));
 }
 public Task SetZoom(int zoom)
 {
     return(JsRuntime.InvokeWithDefinedGuidAndMethodAsync <object>(
                "googleMapJsFunctions.invoke",
                DivId,
                "setZoom",
                zoom));
 }
 /// <summary>
 /// Controls the automatic switching behavior for the angle of incidence of the map.
 /// The only allowed values are 0 and 45.
 /// setTilt(0) causes the map to always use a 0° overhead view regardless of the zoom level and viewport.
 /// setTilt(45) causes the tilt angle to automatically switch to 45 whenever 45° imagery is available for the current zoom level and viewport, and switch back to 0 whenever 45° imagery is not available (this is the default behavior).
 /// 45° imagery is only available for satellite and hybrid map types, within some locations, and at some zoom levels. Note: getTilt returns the current tilt angle, not the value set by setTilt.
 /// Because getTilt and setTilt refer to different things, do not bind() the tilt property; doing so may yield unpredictable effects.
 /// </summary>
 /// <param name="tilt"></param>
 /// <returns></returns>
 public Task SetTilt(int tilt)
 {
     return(JsRuntime.InvokeWithDefinedGuidAndMethodAsync <object>(
                "googleMapJsFunctions.invoke",
                DivId,
                "setTilt",
                tilt));
 }
 public Task SetMapTypeId(MapTypeId mapTypeId)
 {
     return(JsRuntime.InvokeWithDefinedGuidAndMethodAsync <object>(
                "googleMapJsFunctions.invoke",
                DivId,
                "setMapTypeId",
                mapTypeId));
 }
 /// <summary>
 /// Sets the compass heading for aerial imagery measured in degrees from cardinal direction North.
 /// </summary>
 /// <param name="heading"></param>
 /// <returns></returns>
 public Task SetHeading(int heading)
 {
     return(JsRuntime.InvokeWithDefinedGuidAndMethodAsync <object>(
                "googleMapJsFunctions.invoke",
                DivId,
                "setHeading",
                heading));
 }
 public Task SetCenter(LatLngLiteral latLng)
 {
     return(JsRuntime.InvokeWithDefinedGuidAndMethodAsync <object>(
                "googleMapJsFunctions.invoke",
                DivId,
                "setCenter",
                latLng));
 }
        public async Task <MapTypeId> GetMapTypeId()
        {
            var mapTypeIdStr = await JsRuntime.InvokeWithDefinedGuidAndMethodAsync <string>(
                "googleMapJsFunctions.invoke",
                DivId,
                "getMapTypeId");

            return(Helper.ToEnum <MapTypeId>(mapTypeIdStr));
        }
示例#10
0
 /// <summary>
 /// Changes the center of the map by the given distance in pixels.
 /// If the distance is less than both the width and height of the map, the transition will be smoothly animated.
 /// Note that the map coordinate system increases from west to east (for x values) and north to south (for y values).
 /// </summary>
 /// <param name="x"></param>
 /// <param name="y"></param>
 /// <returns></returns>
 public Task PanBy(int x, int y)
 {
     return(JsRuntime.InvokeWithDefinedGuidAndMethodAsync <object>(
                "googleMapJsFunctions.invoke",
                DivId,
                "panBy",
                x,
                y));
 }