Skip to content

Commit 971f628

Browse files
committed
Add onMapReady
1 parent 5e1a5ff commit 971f628

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ class MapView extends Component {
1313
center: null,
1414
};
1515

16-
handleMapMounted = map => (this.map = map);
16+
handleMapMounted = map => {
17+
this.map = map;
18+
this.props.onMapReady && this.props.onMapReady();
19+
};
1720

1821
animateToRegion(coordinates) {
1922
this.setState({ center: { lat: coordinates.latitude, lng: coordinates.longitude } });

0 commit comments

Comments
 (0)