Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1864ff2 commit 94e18beCopy full SHA for 94e18be
1 file changed
src/Fable.ReactGoogleMaps/README.md
@@ -144,11 +144,14 @@ let bounds = mapRef.GetBounds()
144
let setRef (ref:obj) =
145
let bounds = ReactGoogleMaps.Coordinates.newLatLngBounds()
146
147
- markerPositions
148
- |> List.fold (fun (acc:LatLngBounds) pos ->
149
- acc.extend(!^ pos)
150
- ) bounds
151
- |> (MapRef ref).FitBounds
+ let mapRef = (MapRef ref)
+
+ markerPositions
+ |> List.fold (fun (acc:LatLngBounds) pos ->
+ acc.extend(!^ pos)
152
+ ) bounds
153
+ |> fun mapBounds ->
154
+ mapRef.FitBounds(!^ mapBounds)
155
156
googleMap [ MapProperties.ApiKey googleMapApiKey
157
MapProperties.MapContainer "mapContainer"
0 commit comments