diff --git a/samples/HelloMap/HelloMap/App.fs b/samples/HelloMap/HelloMap/App.fs index 4c228d6..f19d597 100644 --- a/samples/HelloMap/HelloMap/App.fs +++ b/samples/HelloMap/HelloMap/App.fs @@ -24,8 +24,6 @@ module App = | MapClicked _ -> model, Cmd.none | MarkerClicked _ -> model, Cmd.none - let map () = Map() - let mapWithRegion () = Map(MapSpan.FromCenterAndRadius(Position(47.640663, -122.1376177), Distance.FromMiles(250.))) @@ -123,11 +121,9 @@ module App = .strokeColor (Color.Black.ToFabColor()) } - let view (_: Model) = Application( (TabbedPage("HelloMap") { - ContentPage("Map", map ()) ContentPage("Region", mapWithRegion ()) ContentPage("Pins", mapWithPins ()) ContentPage("Circle", mapWihCircleElement ()) diff --git a/src/Map.fs b/src/Map.fs index b0a6894..8c1742e 100644 --- a/src/Map.fs +++ b/src/Map.fs @@ -58,15 +58,11 @@ module MapBuilders = /// The Map control is a cross-platform view for displaying and annotating maps /// The region of a map to display when a map is loaded can be set by passing a MapSpan. - static member inline Map<'msg>(?requestRegion: MapSpan) = - match requestRegion with - | Some mapSpan -> - WidgetBuilder<'msg, IMap>( - Map.WidgetKey, - AttributesBundle(StackList.one (Map.RequestedRegion.WithValue(mapSpan)), ValueNone, ValueNone) - ) - | None -> - WidgetBuilder<'msg, IMap>(Map.WidgetKey, AttributesBundle(StackList.empty (), ValueNone, ValueNone)) + static member inline Map<'msg>(requestRegion: MapSpan) = + WidgetBuilder<'msg, IMap>( + Map.WidgetKey, + AttributesBundle(StackList.one (Map.RequestedRegion.WithValue(requestRegion)), ValueNone, ValueNone) + ) /// The Map control is a cross-platform view for displaying and annotating maps /// The region of a map to display when a map is loaded can be set by passing a MapSpan.