Skip to content

Commit b11a817

Browse files
committed
Trying to fix getGeoPosition
1 parent 242bcba commit b11a817

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,11 @@ let googleMap (props:Props.IMapProperties list) : React.ReactElement =
153153

154154
open Fable.Import.JS
155155

156-
let getGeoPosition () =
156+
let getGeoPosition () : Promise<Coordinates.Position> =
157157
Promise.Create (fun resolve reject ->
158158
let onSucces (position:Browser.Position) =
159-
resolve (Coordinates.newPos position.coords.latitude position.coords.longitude )
159+
let pos = Coordinates.newPos position.coords.latitude position.coords.longitude
160+
resolve pos
160161
let onError (posError:Browser.PositionError) =
161162
reject (System.Exception("Could not determine location", System.Exception(sprintf "%A" posError)))
162163

src/Fable.ReactGoogleMaps/Fable.ReactGoogleMaps.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<Version>0.1.0</Version>
4+
<Version>0.1.1</Version>
55
<TargetFramework>netstandard2.0</TargetFramework>
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>
77
</PropertyGroup>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
### 0.1.0
1+
### 0.1.1
22

33
* Initial release

0 commit comments

Comments
 (0)