From 7c489bd9dfcad720308a43786aa2d76024dfd635 Mon Sep 17 00:00:00 2001 From: Matt Brookes Date: Fri, 9 Oct 2015 20:03:54 +0100 Subject: [PATCH 1/2] Fix typo and copypasta. ####defaultCenter / ####center mport / import --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 407dee5..fcb3f45 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ Google maps api key. (Optional, but your map will be rate-limited with no key) `[lat, lng]` or `{ lat: lat, lng: ln}` Default lat/lng at which to center the map - changing this prop throws a warning -####defaultCenter (array or object) +####center (array or object) `[lat, lng]` or `{ lat: lat, lng: ln}` Lat/lng at which to center the map @@ -145,6 +145,9 @@ Example: ``` ####onBoundsChange (func) +``` +[centerLatLng.lat, centerLatLng.lng], zoom, bounds, marginBounds +``` ####onChildClick (func) ####onChildMouseEnter (func) ####onChildMouseLeave (func) @@ -237,7 +240,7 @@ render() { ### Adding a searchbox ```javascript -mport React from 'react'; +import React from 'react'; export default class SearchBox extends React.Component { static propTypes = { From bdf112a587000e2765690828d27e5abda25a143a Mon Sep 17 00:00:00 2001 From: Matt Brookes Date: Fri, 9 Oct 2015 20:24:23 +0100 Subject: [PATCH 2/2] onBoundsChange parameters --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fcb3f45..02bec95 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ createMapOptions: function (maps) { See "Custom map options example" in Examples below for a further example. ####onClick (func) -`{x, y, lat, lng, event}` +`(x, y, lat, lng, event)` The `event` prop in args is the outer div onClick event, not the gmap-api 'click' event. @@ -146,7 +146,11 @@ Example: ####onBoundsChange (func) ``` -[centerLatLng.lat, centerLatLng.lng], zoom, bounds, marginBounds +(center, zoom, bounds, marginBounds) +``` +``` +[lat, lng] = center; +[topLat, leftLng, bottomLat, rightLng] = bounds; ``` ####onChildClick (func) ####onChildMouseEnter (func)