{marker.content}
@@ -92,8 +92,8 @@ export default class ClosureListeners extends Component {
- {marker.showInfo ? this._render_InfoWindow(ref, marker) : null}
+ onClick={this.handleMarkerClick.bind(this, marker)}>
+ {marker.showInfo ? this.renderInfoWindow(ref, marker) : null}
);
})}
diff --git a/examples/gh-pages/scripts/components/events/GettingProperties.js b/examples/gh-pages/scripts/components/events/GettingProperties.js
index 0276ca07..db17006a 100644
--- a/examples/gh-pages/scripts/components/events/GettingProperties.js
+++ b/examples/gh-pages/scripts/components/events/GettingProperties.js
@@ -14,7 +14,7 @@ export default class GettingProperties extends Component {
content: "Change the zoom level",
}
- _handle_zoom_changed () {
+ handleZoomChanged () {
const zoomLevel = this.refs.map.getZoom();
if (zoomLevel !== this.state.zoomLevel) {
// Notice: Check zoomLevel equality here,
@@ -40,7 +40,7 @@ export default class GettingProperties extends Component {
ref="map"
defaultCenter={myLatLng}
zoom={zoomLevel}
- onZoomChanged={::this._handle_zoom_changed}>
+ onZoomChanged={::this.handleZoomChanged}>
+ onCenterChanged={::this.handleMapCenterChanged}>
+ onClick={::this.handleMarkerClick} />
);
}
diff --git a/examples/gh-pages/scripts/components/places/SearchBox.js b/examples/gh-pages/scripts/components/places/SearchBox.js
index 4622af0d..68eed9a2 100644
--- a/examples/gh-pages/scripts/components/places/SearchBox.js
+++ b/examples/gh-pages/scripts/components/places/SearchBox.js
@@ -35,14 +35,14 @@ export default class SearchBoxExample extends Component {
markers: []
}
- _handle_bounds_changed () {
+ handleBoundsChanged () {
this.setState({
bounds: this.refs.map.getBounds(),
center: this.refs.map.getCenter()
});
}
- _handle_places_changed () {
+ handlePlacesChanged () {
const places = this.refs.searchBox.getPlaces();
const markers = [];
@@ -76,13 +76,13 @@ export default class SearchBoxExample extends Component {
}
}}
defaultZoom={15}
- onBoundsChanged={::this._handle_bounds_changed}
+ onBoundsChanged={::this.handleBoundsChanged}
ref="map">