Skip to content

Commit cd4534e

Browse files
authored
Merge pull request #78 from martinerko/feature-marker-title
Feature marker title
2 parents 996e170 + 9c70ac6 commit cd4534e

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ To place a marker on the Map, include it as a child of the `<Map />` component.
141141
className={'map'}
142142
zoom={14}>
143143
<Marker
144+
title={'The marker`s title will appear as a tooltip.'}
144145
name={'SOMA'}
145146
position={{lat: 37.778519, lng: -122.405640}} />
146147
<Marker

examples/components/withMarkers.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const WithMarkers = React.createClass({
1717
className={'map'}
1818
zoom={14}>
1919
<Marker
20+
title={'The marker`s title will appear as a tooltip.'}
2021
name={'SOMA'}
2122
position={{lat: 37.778519, lng: -122.405640}} />
2223
<Marker

src/components/Marker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class Marker extends React.Component {
4242

4343
renderMarker() {
4444
let {
45-
map, google, position, mapCenter, icon, label, draggable
45+
map, google, position, mapCenter, icon, label, draggable, title
4646
} = this.props;
4747
if (!google) {
4848
return null
@@ -58,6 +58,7 @@ export class Marker extends React.Component {
5858
position: position,
5959
icon: icon,
6060
label: label,
61+
title: title,
6162
draggable: draggable
6263
};
6364
this.marker = new google.maps.Marker(pref);

0 commit comments

Comments
 (0)