We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b26a1df commit b28e5d5Copy full SHA for b28e5d5
1 file changed
src/Marker.js
@@ -3,10 +3,12 @@ import { Marker } from 'react-google-maps';
3
4
class MapViewMarker extends Component {
5
render() {
6
+ const { description, title, coordinate, ...rest } = this.props;
7
return (
8
<Marker
- 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 }}
+ {...rest}
10
+ title={description ? `${title}\n${description}` : title}
11
+ position={{ lat: coordinate.latitude, lng: coordinate.longitude }}
12
/>
13
);
14
}
0 commit comments