-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
plotlyjs v2.16: Add bounds to mapbox subplots (plotly/plotly.js#6339)
- Loading branch information
Showing
3 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
src/Plotly.NET/Layout/ObjectAbstractions/Map/MapboxBounds.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
namespace Plotly.NET.LayoutObjects | ||
|
||
open Plotly.NET | ||
open DynamicObj | ||
open System | ||
open System.Runtime.InteropServices | ||
|
||
/// <summary></summary> | ||
type MapboxBounds() = | ||
|
||
inherit DynamicObj() | ||
|
||
/// <summary> | ||
/// Returns a new MapboxBounds object with the given styles | ||
/// </summary> | ||
/// <param name="East">Sets the maximum longitude of the map (in degrees East) if `west`, `south` and `north` are declared.</param> | ||
/// <param name="North">Sets the maximum latitude of the map (in degrees North) if `east`, `west` and `south` are declared.</param> | ||
/// <param name="South">Sets the minimum latitude of the map (in degrees North) if `east`, `west` and `north` are declared.</param> | ||
/// <param name="West">Sets the minimum latitude of the map (in degrees North) if `east`, `west` and `north` are declared.</param> | ||
static member init | ||
( | ||
[<Optional; DefaultParameterValue(null)>] ?East: float, | ||
[<Optional; DefaultParameterValue(null)>] ?North: float, | ||
[<Optional; DefaultParameterValue(null)>] ?South: float, | ||
[<Optional; DefaultParameterValue(null)>] ?West: float | ||
) = | ||
MapboxBounds() | ||
|> MapboxBounds.style ( | ||
?East = East, | ||
?North = North, | ||
?South = South, | ||
?West = West | ||
) | ||
|
||
/// <summary> | ||
/// Returns a function that applies the given styles to a MapoxBounds object. | ||
/// </summary> | ||
/// <param name="East">Sets the maximum longitude of the map (in degrees East) if `west`, `south` and `north` are declared.</param> | ||
/// <param name="North">Sets the maximum latitude of the map (in degrees North) if `east`, `west` and `south` are declared.</param> | ||
/// <param name="South">Sets the minimum latitude of the map (in degrees North) if `east`, `west` and `north` are declared.</param> | ||
/// <param name="West">Sets the minimum latitude of the map (in degrees North) if `east`, `west` and `north` are declared.</param> | ||
static member style | ||
( | ||
[<Optional; DefaultParameterValue(null)>] ?East: float, | ||
[<Optional; DefaultParameterValue(null)>] ?North: float, | ||
[<Optional; DefaultParameterValue(null)>] ?South: float, | ||
[<Optional; DefaultParameterValue(null)>] ?West: float | ||
) = | ||
(fun (mapboxBounds: MapboxBounds) -> | ||
|
||
East |> DynObj.setValueOpt mapboxBounds "east" | ||
North |> DynObj.setValueOpt mapboxBounds "north" | ||
South |> DynObj.setValueOpt mapboxBounds "south" | ||
West |> DynObj.setValueOpt mapboxBounds "west" | ||
|
||
mapboxBounds) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters