Skip to content

Commit 01ecbce

Browse files
authored
Merge pull request fullstackreact#285 from jackpilowsky/patch-3
Update readme.md
2 parents f2c11e5 + 541d528 commit 01ecbce

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,27 @@ If no `position` is passed in the `props`, the marker will default to the curren
273273

274274
You can also pass any other `props` you want with the `<Marker />`. It will be passed back through marker events.
275275

276+
The marker component can also accept a child InfoMarker component for situations where there is only 1 marker and 1 infowindow.
277+
278+
```javascript
279+
<Marker
280+
title="Location"
281+
id={1}
282+
position={markerCenter}
283+
draggable={true}
284+
onDragend={this.moveMarker.bind(this)}
285+
>
286+
<InfoWindow
287+
visible={showInfoWindow}
288+
style={styles.infoWindow}
289+
>
290+
<div className={classes.infoWindow}>
291+
<p>Click on the map or drag the marker to select location where the incident occurred</p>
292+
</div>
293+
</InfoWindow>
294+
</Marker>
295+
```
296+
276297
### Events
277298

278299
The `<Marker />` component listens for events, similar to the `<Map />` component.

0 commit comments

Comments
 (0)