File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
src/Fable.ReactGoogleMaps Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff 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 ]
You can’t perform that action at this time.
0 commit comments