Skip to content

Commit b28e5d5

Browse files
committed
Add Marker props
1 parent b26a1df commit b28e5d5

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Marker.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ import { Marker } from 'react-google-maps';
33

44
class MapViewMarker extends Component {
55
render() {
6+
const { description, title, coordinate, ...rest } = this.props;
67
return (
78
<Marker
8-
title={this.props.description ? `${this.props.title}\n${this.props.description}` : this.props.title}
9-
position={{ lat: this.props.coordinate.latitude, lng: this.props.coordinate.longitude }}
9+
{...rest}
10+
title={description ? `${title}\n${description}` : title}
11+
position={{ lat: coordinate.latitude, lng: coordinate.longitude }}
1012
/>
1113
);
1214
}

0 commit comments

Comments
 (0)