Skip to content

Commit 94e18be

Browse files
Corrected readme with overload.
1 parent 1864ff2 commit 94e18be

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/Fable.ReactGoogleMaps/README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,14 @@ let bounds = mapRef.GetBounds()
144144
let setRef (ref:obj) =
145145
let bounds = ReactGoogleMaps.Coordinates.newLatLngBounds()
146146
147-
markerPositions
148-
|> List.fold (fun (acc:LatLngBounds) pos ->
149-
acc.extend(!^ pos)
150-
) bounds
151-
|> (MapRef ref).FitBounds
147+
let mapRef = (MapRef ref)
148+
149+
markerPositions
150+
|> List.fold (fun (acc:LatLngBounds) pos ->
151+
acc.extend(!^ pos)
152+
) bounds
153+
|> fun mapBounds ->
154+
mapRef.FitBounds(!^ mapBounds)
152155
153156
googleMap [ MapProperties.ApiKey googleMapApiKey
154157
MapProperties.MapContainer "mapContainer"

0 commit comments

Comments
 (0)