Skip to content

Commit 8b09942

Browse files
committed
Bit more README
1 parent 522de20 commit 8b09942

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

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.2.0</Version>
4+
<Version>0.2.1</Version>
55
<TargetFramework>netstandard2.0</TargetFramework>
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>
77
</PropertyGroup>

src/Fable.ReactGoogleMaps/README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,26 @@ Fable bindings and helpers for [react-google-map](https://github.com/tomchentw/r
77
npm install --save react-google-maps # or
88
yarn add react-google-maps
99

10-
paket add Fable.ReactGoogleMap --project [yourproject]
10+
paket add Fable.ReactGoogleMap --project [yourproject]
11+
12+
## Usage
13+
14+
In your css add the following:
15+
16+
.maploadercontainer,
17+
.mapcontainer {
18+
height: calc(100vh - 18rem);
19+
width: 100%;
20+
}
21+
22+
and in your F# code you can create the map like this:
23+
24+
let defaultCenter:Position = { lat = 40.6892494 ; lng = -74.0445004 }
25+
26+
let myMap =
27+
googleMap [
28+
MapProperties.ApiKey googleMapApiKey
29+
MapProperties.MapContainer "mapContainer"
30+
MapProperties.DefaultZoom 9
31+
MapProperties.DefaultCenter defaultCenter
32+
MapProperties.Center defaultCenter ]

0 commit comments

Comments
 (0)