Skip to content

Commit 89f161a

Browse files
committed
Adding getPosition back in
1 parent 4aafc87 commit 89f161a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/Fable.ReactGoogleMaps/Fable.Helpers.ReactGoogleMaps.fs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,6 @@ let GoogleMapComponent: RCom = import "GoogleMapComponent" "./mapComponent.js"
150150
let googleMap (props:Props.IMapProperties list) : React.ReactElement =
151151

152152
R.from GoogleMapComponent (keyValueList CaseRules.LowerFirst props) []
153+
154+
155+
let getPosition (options: obj) : Fable.Import.JS.Promise<Fable.Import.Browser.Position> = importMember "./location.js"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export function getPosition (options) {
2+
return new Promise(function (resolve, reject) {
3+
navigator.geolocation.getCurrentPosition(resolve, reject, options);
4+
});
5+
}

0 commit comments

Comments
 (0)