Skip to content

Commit 0396742

Browse files
committed
document searchbox
1 parent f1f709b commit 0396742

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
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.3.0</Version>
4+
<Version>0.3.1</Version>
55
<TargetFramework>netstandard2.0</TargetFramework>
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>
77
</PropertyGroup>

src/Fable.ReactGoogleMaps/README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ let myMap =
3838
MapProperties.Center defaultCenter ]
3939
```
4040

41-
## Traffic Layer
41+
### Traffic Layer
4242

4343
Google Maps allows you to activate the traffic layer. The map component has a simple property for that:
4444

@@ -51,7 +51,21 @@ let myMap =
5151
MapProperties.ShowTrafficLayer true ]
5252
```
5353

54-
## Markers
54+
### SearchBox
55+
56+
If you want to show a searchbox in Google Maps then use the following properties:
57+
58+
59+
```fs
60+
let myMap =
61+
googleMap [
62+
MapProperties.ApiKey googleMapApiKey
63+
// ..
64+
MapProperties.SearchBoxText "Search"
65+
MapProperties.ShowSearchBox true ]
66+
```
67+
68+
### Markers
5569

5670
If you want to show markers on the map then you can create them like this:
5771

@@ -73,7 +87,7 @@ let myMap =
7387
MapProperties.Markers markers ]
7488
```
7589

76-
## MarkerClusterer
90+
### MarkerClusterer
7791

7892
The map component allows you to use a [MarkerClusterer](https://tomchentw.github.io/react-google-maps/#markerclusterer):
7993

@@ -94,7 +108,7 @@ let myMap =
94108
```
95109

96110

97-
## Getting properties from the map
111+
### Getting properties from the map
98112

99113
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:
100114

0 commit comments

Comments
 (0)