File tree Expand file tree Collapse file tree 3 files changed +31
-10
lines changed
src/Fable.ReactGoogleMaps Expand file tree Collapse file tree 3 files changed +31
-10
lines changed Original file line number Diff line number Diff line change @@ -12,15 +12,10 @@ module Coordinates =
1212 abstract member lat: unit -> float
1313 abstract member lng: unit -> float
1414
15- type [<Pojo>] Position =
16- {
17- lat: float
18- lng: float
19- }
20- interface LatLng with
21- member this.lat () = this.lat
22- member this.lng () = this.lng
23-
15+ type [<Pojo>] Position = {
16+ lat: float
17+ lng: float
18+ }
2419
2520 let newPos lat lng =
2621 { lat = lat
Original file line number Diff line number Diff line change @@ -92,3 +92,29 @@ let myMap =
9292 // ..
9393 MapProperties.Clusterer clustered ]
9494```
95+
96+
97+ ## Getting properties from the map
98+
99+ It's possible to retrieve properties like current center or current bounds from the GoogleMaps component. You need to use a MapRef like the following:
100+
101+ ``` fs
102+
103+ let mutable mapRef = MapRef null
104+ let setMapRef (ref:obj) =
105+ mapRef <- MapRef ref
106+
107+ // ...
108+
109+
110+ let myMap =
111+ googleMap [
112+ MapProperties.ApiKey googleMapApiKey
113+ // ..
114+ MapProperties.SetRef setMapRef ]
115+
116+ // ...
117+
118+ let bounds = mapRef.GetBounds()
119+
120+ ```
Original file line number Diff line number Diff line change 1- ### 0.3.0
1+ ### 0.3.1
22
33* Initial release
You can’t perform that action at this time.
0 commit comments